在項目的pom.xml中,它具有從遠程存儲庫下載的依賴關係。遠程存儲庫中存在依賴關係的問題
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.567</version>
</parent>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
我明白了什麼是Maven的本地資源庫中
- 搜索,如果沒有找到
- 搜索本地企業的關係資源庫它,如果它沒有找到
- 應該下載從遠程存儲庫
當我執行命令mvn test
它showi納克軌跡如下
在它表明這是從本地關係庫下載
Could not find artifact org.jenkins-ci.plugins:plugin:pom:1.567 in nexus (http://localnexus/nexus/content/groups/group/) and 'parent.relativePath' points at no local POM
誰能幫我解決了這個錯誤.. 有什麼事情關係到代理設置? ,
,因爲它是不會到遠程存儲庫鏈接..
D:\Hygieia-master\hygieia-jenkins-plugin>mvn test
[INFO] Scanning for projects…
Downloading: http://localnexus/nexus/content/groups/group/org/jenkins-ci/plugins/plugin/1.567/plugin-1.567.pom
Downloading: http://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/plugin/1.567/plugin-1.567.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.jenkins-ci.plugins:hygieia-publisher:1.4-SNAPSHOT: Could not find artifact org.jenkins-ci.plugins:plugin:pom:1.567 in nexus (http://localnexus/nexus/content/groups/group/) and 'parent.relativePath' points at no local POM @ line 15, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jenkins-ci.plugins:hygieia-publisher:1.4-SNAPSHOT (D:\Hygieia-master\hygieia-jenkins-plugin\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.jenkins-ci.plugins:hygieia-publisher:1.4-SNAPSHOT: Could not find artifact org.jenkins-ci.plugins:plugin:pom:1.567 in nexus (http://localnexus/nexus/content/groups/group/) and 'parent.relativePath' points at no local POM @ line 15, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
下面是我將Settings.xml
<settings>
<servers>
<server>
<id>nexus</id>
<username>user</username>
<password>pwd</password>
<configuration>
<httpConfiguration>
<all>
<params>
<param>
<name>http.authentication.preemptive</name>
<value>%b,true</value>
</param>
</params>
</all>
</httpConfiguration>
<httpHeaders>
<property>
<name>username</name>
<value>user</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<url>http://localnexus/nexus/content/groups/group/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<archetypeCatalog>http://localnexus/nexus/content/groups/PUBLIC_REPO/</archetypeCatalog>
</properties>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
正確配置你的連接從jenkins-ci回購下載,而不是手動添加到你的pom文件中... – khmarbaise