简体   繁体   English

maven-release-plugin和maven 3.0.3

[英]maven-release-plugin and maven 3.0.3

I'm using the maven release plugin to perform the following with maven-3.0.3 我正在使用maven发布插件来执行以下maven-3.0.3

mvn release:prepare mvn发布:准备

Everything seems to be going fine except that when it creates the tag in SVN, it copies the previous version from the tags folder with the correct label. 一切似乎都很顺利,除了它在SVN中创建标签时,它会使用正确的标签从tags文件夹复制以前的版本。 Any ideas why? 有什么想法吗?

If I switch back to maven-2.2.1, the tagging is correct and the contents of the tagging are the expected ones. 如果我切换回maven-2.2.1,标记是正确的,标记的内容是预期的。

With Maven 2.2.1: 使用Maven 2.2.1:

[INFO] Tagging release with the label crcib-6.8.5...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file c:\DOCUME~1\markand\LOCALS~1\Temp\maven-scm-1593649573.commit . <url>/svn/repos/crcib/tags/crcib-6.8.5"

With Maven 3.0.3: 使用Maven 3.0.3:

[INFO] Tagging release with the label crcib-6.8.5...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file c:\DOCUME~1\markand\LOCALS~1\Temp\maven-scm-2047728233.commit --revision 6331 <url>/svn/repos/crcib/tags/crcib-6.8.2 <url>/svn/repos/crcib/tags/crcib-6.8.5"

Any ideas why? 有什么想法吗? Also, it seems that when using Maven 2, several artifacts are being downloaded before the tagging commences. 此外,似乎在使用Maven 2时,在标记开始之前正在下载几个工件。 This is not the case with Maven 3. Maven 3不是这种情况。

Without your pom.xml, it is difficult to know what's the problem. 没有你的pom.xml,很难知道是什么问题。

The most obvious misconfiguration is probably ins scm, as Wemu said; Wemu说,最明显的错误配置可能就是scm。 :

<scm>
    <!-- Base URL of repository (trunk/tags/branches independant)-->
    <url>scm:svn:http://svn.my.company.com/repository</url>

    <!-- Current working url (NOT TAG ONE) -->
    <connection>scm:svn:http://svn.my.company.com/repository/trunk/my-project</connection>
    <!-- Current working url -->
    <developerConnection>scm:svn:http://svn.my.company.com/repository/trunk/my-project</developerConnection>
</scm>

This is the version and how I use this plugin : 这是我使用此插件的版本和方式:

 <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.2.2</version>
      <configuration>
            <tagBase>svn.my.company.com/repository/tags</tagBase>
      </configuration>
</plugin>

When you'll use the maven release plugin, this will modify your scm configuration to point to tags. 当您使用maven发布插件时,这将修改您的scm配置以指向标签。 If it's really a maven 3 issue, i never noticed it. 如果它真的是一个maven 3问题,我从来没有注意到它。

Could you, please, post you pom.xml (and settings.xml) for further analysis ? 请你发贴pom.xml(和settings.xml)进行进一步分析吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM