Pra*_*ITI 15 repository nexus maven
我在日食中使用maven(m2 eclipse)
当我执行mvn:install时,我希望我的jar(工件)安装在位于服务器上的nexus存储库中(现在安装的jar放在本地系统存储库中)..我该怎么做?

我甚至将其更改为我的本地存储库地址
Kri*_*ris 24
通常,您将使用mvn deploy部署到非本地存储库.
当然,您需要在maven settings.xml或项目POM中配置repo.
由于我们总是使用相同的内部仓库,因此我在Maven settings.xml中完成了此操作,更准确地说,是"配置文件"部分.
这是我的参考配置:
<profiles>
<profile>
<id>artifactory</id>
<repositories>
<repository>
<id>central</id>
<name>libs-releases</name>
<url>http://repo.example.com/libs-releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>libs-snapshots</name>
<url>http://repo.example.com/libs-snapshots</url>
<snapshots />
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>plugins-releases</name>
<url>http://repo.example.com/plugins-releases</url>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24250 次 |
| 最近记录: |