Maven 部署到快照而不是发布
我正在尝试使用maven发布一个项目,但不是发布到发布存储库,而是将其放在我们的快照存储库中。
我的 pom 看起来像这样:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.my.profiler</groupId>
<artifactId>profilerlib</artifactId>
<name>Profiler Lib</name>
<version>1.0.2-SNAPSHOT</version>
<description>Profiler Library</description>
<scm>
<connection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
</connection>
<developerConnection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
</developerConnection>
</scm>
<distributionManagement>
<!-- Publish the versioned releases here -->
<repository>
<id>nexus</id>
<name>nexus</name>
<url>http://repo.example.com:8081/nexus/content/repositories/releases
</url>
</repository>
<!-- Publish the versioned releases here -->
<snapshotRepository>
<id>nexus</id>
<name>nexus</name>
<url>http://repo.example.com:8081/nexus/content/repositories/snapshots
</url>
</snapshotRepository>
</distributionManagement>
<!-- download artifacts from this repo -->
<repositories>
<repository>
<id>nexus</id>
<name>EXAMPLE Public Repository</name>
<url>http://repo.example.com:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
...
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://svn.example.com/my-project/profilerlib/tags
</tagBase>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<powermock.version>1.4.6</powermock.version>
</properties>
</project>