我正在开发一个maven模块化项目,现在我正试图发布它。我已成功执行了一半的发布:准备,但当插件尝试标记progect时,我无法标记错误。
现在我试着解释你的麻烦。我的模块化项目由几个模块(模型,服务,休息,web-app等)组成,
|-- parent
|-- model
pom.xml
|-- services
pom.xml
|-- rest
pom.xml
|-- web-app
pom.xml
pom.xml
我决定对所有模块使用相同的版本,然后运行以下命令:
mvn release:prepare -DautoVersionSubmodules = true
在此过程中,所有Poms的版本号都以正确的方式更新,并且maven在我的scm存储库中成功提交它们。我用这种方式配置了maven:release插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.2</version>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies>
<configuration>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
<checkModificationExcludes>
<checkModificationExclude>.project</checkModificationExclude>
<checkModificationExclude>.settings</checkModificationExclude>
<checkModificationExclude>.classpath</checkModificationExclude>
</checkModificationExcludes>
<arguments>-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true</arguments>
</configuration>
<plugin>
我不得不添加arguments标签,因为我使用了像https这样的存储库管理器。发行版:当尝试为发布版本创建标记时,准备失败并显示此错误并抛出此错误:
Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to tag SCM
Provider message:
SVN tag failed.
Command output:
svn: E175002: connection refused by the server
svn: E175002: OPTIONS request failed on '/home/svn/myCompany/test/trunk/parent'
at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:136)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:206)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:142)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:104)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:302)
... 22 more
我运行release:prepare命令的更新后的父进程是以这种方式配置的:
<scm>
<developerConnection>scm:svn:http://192.168.0.10/home/svn/myCompany/test/tags/parent-2.1.0</developerConnection>
</scm>
在eclipse上我将父项目分享了这个地址,我能够正确地联系到它
svn://192.168.0.10/home/svn/aiem/test/trunk/parent
我在哪里做错了? 我该如何解决?
答案 0 :(得分:1)
我解决了改变以下事情(预发布):
<scm>
<connection>scm:svn:svn://192.168.0.10/home/svn/myCompany/test/tags/parent</connection>
<developerConnection>scm:svn:svn://192.168.0.10/home/svn/myCompany/test/tags/parent</developerConnection>
</scm>
我运行了添加用户名和密码的命令
mvn release:prepare -DautoVersionSubmodules = true -Dusername = myUser -Dpassword = myPass