我在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
同一個用戶,還是不同? –