我在Jenkins中创建了一个Job,并在Maven中进行了一些目标(clean verify compile)。 但是,当我运行的作业有错误:手动依赖Maven和Jenkins
[ERROR] Failed to execute goal on project NameProject: Could not resolve dependencies for project NameProject:x:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.oracle:ojdbc14:jar:10.2.0.5, org.primefaces.themes:sentinel-theme:jar:2.1.2: Could not find artifact com.oracle:ojdbc14:jar:10.2.0.5 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我在Maven的
mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true
创造人工的依赖,但是詹金斯没有按”在pom中知道这种依赖关系。 当我在Maven中执行验证编译它是有效的,但是当我在Jenkins中执行时不起作用。
您是否将其安装在Jenkins服务器上? –
我已经在本地主机上安装Jenkins来测试!同样的本地Maven。 – Halley
同一个用户,还是不同? –