Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 配置Maven central和客户端管理的nexus_Java_Maven_Maven 2_Maven 3_Nexus - Fatal编程技术网

Java 配置Maven central和客户端管理的nexus

Java 配置Maven central和客户端管理的nexus,java,maven,maven-2,maven-3,nexus,Java,Maven,Maven 2,Maven 3,Nexus,我正在从事一个项目,在这个项目中,我需要使用maven central repository和客户机管理的nexus。 想从maven nexus和客户端管理的nexus下载一些库。有人能帮我设置seting.xml吗? 提前感谢。您可以在pom.xml中使用存储库标记,Maven需要从该位置下载远程工件。我们可以通过两种方式来实现这一点-检查这个 ... my-repo1 客户回购 https://alltechtutorials.com my-repo2 你的客户回购 https://be

我正在从事一个项目,在这个项目中,我需要使用maven central repository和客户机管理的nexus。 想从maven nexus和客户端管理的nexus下载一些库。有人能帮我设置seting.xml吗?
提前感谢。

您可以在
pom.xml
中使用
存储库
标记,Maven需要从该位置下载远程工件。我们可以通过两种方式来实现这一点-检查这个


...
my-repo1
客户回购
https://alltechtutorials.com
my-repo2
你的客户回购
https://bestjavatutorials.com
...

最好是仅使用nexus,通过nexus使用proxy central……是的,这是一个选项。但我使用aws codeartifact作为代理。AWS codeartifact中存在一些问题,因此codeartifact无法从central下载几个库。这就是为什么我尝试使用两个独立的存储库。是的,这对我来说很有效。我将上游设置为特定于客户端的nexus的maven public。因此,如果在特定于客户端的存储库中找不到这些库,它将转到上游并尝试在nexus中下载。设置上游连接在这里非常重要。我尝试过这样设置,但是获取以下错误:
Plugin org.apache.maven.plugins:maven clean Plugin:2.5或其依赖项之一无法解决:未能读取org.apache.maven.plugins:maven clean Plugin:jar:2.5:无法将工件org.apache.maven.plugins:maven clean Plugin:pom:2.5从/传输到maven存储库(https://repo.maven.apache.org/maven2):连接重置