Tôi đang cố gắng phát hành một dự án bằng cách sử dụng maven nhưng thay vì phát hành kho lưu trữ Bản phát hành, nó sẽ đặt nó trong kho lưu trữ Snapshots của chúng tôi.Maven triển khai để chụp nhanh thay vì phát hành
pom của tôi trông giống như:
<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>
Bạn đã tìm thấy giải pháp cho vấn đề này? – mihn
Thời gian dài trước đây, nhưng IIRC tôi đã phải xác định các giá trị lưu trữ riêng biệt và giá trị snapShotRepository ID trong tệp pom.xml của tôi –