我们一直在使用Maven构建MuleESB。一切都很好。
但是,我们最近添加了Sonatype Nexus作为存储库管理器。
现在,使用Maven构建MuleESB,现在将其配置为镜像我们的内部公共Nexus URL,找不到许多传递依赖项,并且构建失败。
我必须查看找不到哪个传递依赖项,通过查看pom文件找到它所在的公共存储库,然后将其添加为Nexus上的代理存储库。我正在为每个未解决的依赖重复此事。
请注意,我已添加了mulesoft版本和快照存储库。它似乎是在其他存储库(而不是Mulesoft)中发现的传递依赖,它们都是失败的。
确保将所有必需的存储库添加到Sonatype Nexus存储库的最佳/最简单方法是什么?
---编辑---- 到目前为止,我发现如果我将以下存储库添加到Nexus,我可以构建Mule ESB Community Edition,因为找到了所有依赖项。
答案 0 :(得分:2)
您正在遵循正确的流程:
在列表中,您可以删除工件存储库,因为工件将位于其他存储库中。此外,maven.org(中央存储库)已经在Nexus Repository Manager中预配置,因此您可能不必添加它。
最好一次添加一个repo,并尝试从全新安装(删除本地Maven存储库)或在mvn调用上使用-U强制更新。
如果您需要更多信息,可以在documentation。
中找到所有这些内容答案 1 :(得分:1)
Here is the maven settings I use with Mule development.
You can use it to figure out how to set up your repository.
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/Users/MuleDev/.m2/repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>mule-nexus-ee-releases</id>
<username>xxx</username>
<password>xxx</password>
</server>
<server>
<id>mule-ci-releases</id>
<username>xxxx</username>
<password>xxx</password>
</server>
<server>
<id>mule-ci-snapshots</id>
<username>xxxx</username>
<password>xxx</password>
</server>
<server>
<id>mule-ee-releases</id>
<username>xxxx</username>
<password>xxx</password>
</server>
<server>
<id>mule-ee-snapshots</id>
<username>xxxx</username>
<password>xxxxx</password>
</server>
<server>
<id>mule-ee-thirdparty</id>
<username>xxxxx</username>
<password>xxxx</password>
</server>
<server>
<id>mule-ee-dependencies</id>
<username>xxxx</username>
<password>xxxx</password>
</server>
<server>
<id>mule-third-party</id>
<username>xxxx</username>
<password>xxxx</password>
</server>
</servers>
<mirrors>
</mirrors>
<profiles>
<profile>
<id>default-profile</id>
<repositories>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/repositories/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>mule-releases</id>
<name>Mule Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
</repository>
<repository>
<id>mule-ee-releases</id>
<name>MuleEE Releases Repository</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>mule-ee-thirdparty</id>
<name>Local repository for thirdparty</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ext-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>mule-ee-dependencies</id>
<name>Mule EE Dependencies</name>
<url>https://repository-master.mulesoft.org/nexus/content/groups/mule-ee-dependencies/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>mule-nexus-ee-releases</id>
<name>Mule EE Releases Repository</name>
<url>https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>mule-nexus-releases</id>
<name>Mule CE Releases Repository</name>
<url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>codehaus-mule-repo</id>
<name>codehaus-mule-repo</name>
<url>
https://repository-master.mulesoft.org/nexus/content/groups/public/
</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mule-ee-snapshots</id>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<layout>default</layout>
</pluginRepository>
<pluginRepository>
<id>mule-ee-releases</id>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<layout>default</layout>
</pluginRepository>
<pluginRepository>
<id>mule-nexus-releases</id>
<name>Mule CE Releases Repository</name>
<url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
</settings>
答案 2 :(得分:1)
可以使用github上用于社区开发的pom,这里是链接