我有一个使用 spring api 的共享 pom。
pom.xml:
<project>
<groupId>com.spring</groupId>
<artifactId>spring</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<profiles>
<profile>
<id>profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<distributionManagement>
<snapshotRepository>
<id>nexus-snapshot</id>
<url>https://mynexusrepo</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
</dependencies>
</project>
当我尝试将 pom 文件上传到快照 nexus 存储库时,我收到错误:
ReasonPhrase:Forbidden. -
我已经上传了其他 pom 文件,但它们是 jar 的 - <packaging>jar</packaging>
我在这里上传了一个 pom -<packaging>pom</packaging>
如何将共享的 pom 上传到 Nexus,以便其他项目可以引用它?这是标准做法吗?Pom 文件被缩短,大部分依赖项已被删除。