Sha*_*shi 0 maven-2 maven-3 maven-scm maven maven-release-plugin
我有以下配置 -
<scm>
<connection>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</connection>
<developerConnection>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</developerConnection>
<url>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</url>
</scm>
Run Code Online (Sandbox Code Playgroud)
我的问题是每次scm配置上的项目版本更改都会发生变化.说从0.1到0.2等...我们是否需要确保在svn中创建这些标签或maven创建标签?如果Maven使用我的上述配置创建标签,我已经有http://example.com/tags/MyProject可用,但它没有标记上面的内容?
请问有什么想法吗?
如果配置正确并且您正在使用maven-release-plugin这意味着
mvn release:prepare
Run Code Online (Sandbox Code Playgroud)
而不是由Maven自动创建SVN标签.所以没有必要检查.除此之外,如果你有一个不同的SVN布局,你可能需要更改Maven-release-plugin中的tag-Base:
Repo
+-- Project
+--- trunk
+--- tags
+--- branches
Run Code Online (Sandbox Code Playgroud)
这意味着您需要配置maven-release-plugin:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<tagBase>https://svn.mycompany.com/repos/myapplication/releases</tagBase>
</configuration>
</plugin>
</plugins>
...
</build>
...
</project>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2864 次 |
| 最近记录: |