【发布时间】:2018-07-22 19:08:00
【问题描述】:
我正在尝试构建包含这两个依赖项的项目:
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>vizmap-api</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>viewmodel-api</artifactId>
<version>3.6.0</version>
</dependency>
我还在我的 POM 中包含了这个存储库标签:
<repositories>
<repository>
<id>cytoscape_snapshots</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
<name>Cytoscape Snapshots</name>
<url>http://code.cytoscape.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>cytoscape_releases</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
<name>Cytoscape Releases</name>
<url>http://code.cytoscape.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
然后我在构建过程中遇到了这个错误:
[错误] 无法在项目 CyPlugin 上执行目标:无法解析项目 GraphSYSBIO:CyPlugin:bundle:1.0-SNAPSHOT 的依赖项:无法解析以下工件:org.cytoscape:vizmap-api:jar:3.6。 0, org.cytoscape:viewmodel-api:jar:3.6.0: 在nexus (http://our_nexus_server:8081/nexus/content/groups/public/) 中找不到工件org.cytoscape:vizmap-api:jar:3.6.0 -> [帮助1]
在我的 settings.xml 中,我使用的是代理:
<proxies>
<!-- proxy | Specification for one proxy, to be used in connecting to the
network. | -->
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>ourHost</host>
<port>8080</port>
<nonProxyHosts>*localAddress</nonProxyHosts>
</proxy>
</proxies>
也使用镜子:
<mirrors>
<!-- mirror | Specifies a repository mirror site to use instead of a given
repository. The repository that | this mirror serves has an ID that matches
the mirrorOf element of this mirror. IDs are used | for inheritance and direct
lookup purposes, and must be unique across the set of mirrors. | -->
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Our Local Nexus Repo</name>
<url>our_nexus:8081/nexus/content/groups/public/</url>
</mirror>
</mirrors>
我的问题是:如何告诉 maven 在 cytoscape.org/nexus/ nexus 中而不是在我们的 nexus 服务器上查找这两个依赖项。
镜像可以解决这个问题吗?
cytoscape.org/nexus/ 的链接是: http://code.cytoscape.org/nexus/content/repositories/releases/org/cytoscape/vizmap-api/3.6.0/
【问题讨论】:
-
您好,您找到解决此问题的方法了吗?
标签: maven repository nexus maven-mirroring