当我使用maven release插件时,我遇到了一些问题,最多的一个是标签scm失败,错误是: svn:“svn://192.168.5.222/show/test-show/trunk/show”不在修订版0中。
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
引起:org.apache.maven.plugin.MojoFailureException:无法标记SCM
然后我找到了我的日志:
[INFO]执行:/ bin / sh -c cd /data/.hudson/jobs/hxbos/workspace& amp ;& amp; svn --username liulaixi --password' * ' - no-auth-cache --non-interactive copy --file /tmp/maven-scm-49732292.commit --revision 0 svn: //192.168.5.213/hxbos/hxecp-src/trunk/hxbos svn://192.168.5.213/hxbos/hxecp-src/tags/hxbos/hxbos-all-test-1.5.0 [INFO]工作目录:/data/.hudson/jobs/hxbos/workspace
为什么我的--revision是0?谁可以帮助我?谢谢!
答案 0 :(得分:0)
问题是你没有正确的svn版本。检查安装最新版本并根据您的环境进行设置。如果正确,mvn将能够在上传pom.xml后读取此信息,并且将标记该版本。
答案 1 :(得分:0)
您是否尝试忽略此错误并尝试mvn release:再次准备?对我来说它有效。不要问我原因。
答案 2 :(得分:0)
尝试将“tagBase”配置添加到pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<tagBase>https://svn.site.net.br/svn/SiteV6/Vitrine</tagBase>
</configuration>
</plugin>
答案 3 :(得分:0)
我犯了错误,我只检查了主干(没有标签和分支)。
我的遗产:svn-repository存储在/svn/
中。 Apache有DAV svn
支持<connection>
标记(不确定我们是否需要DAV)配置如下:
<Location /svn>
DAV svn
SVNPath /svn
</Location>
在pom.xml
其中:
<scm>
<url>http://www.myproject.com/svn/Project</url>
<connection>scm:svn:http://www.myproject.com/Project</connection>
<developerConnection>scm:svn:svn+ssh://root@www.myproject.com/Project</developerConnection>
</scm>
然后我做
svn co file:///svn/Project
cd Project/trunk/
eval `ssh-agent -s`
ssh-add ~/mykey-to-commit-new-tag.ossh
mvn package gpg:sign
svn commit
mvn clean release:prepare release:perform -Darguments="-DskipTests -Dmaven.javadoc.failOnError=false" -X
我真正需要做的是检查整个项目。