“您在反应堆项目列表中没有 SNAPSHOT 项目."使用 Jenkins Maven 发布插件时 [英] "You don't have a SNAPSHOT project in the reactor projects list." when using Jenkins Maven release plugin

查看:20
本文介绍了“您在反应堆项目列表中没有 SNAPSHOT 项目."使用 Jenkins Maven 发布插件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在最新版本的 Jenkins 和 Maven Release 插件上使用 SVN、Maven 3.0.3.我正在尝试使用 Maven 发布插件(通过 Jenkins)进行试运行,因此正在执行选项......

I'm using SVN, Maven 3.0.3 on the latest version of Jenkins and the Maven Release plugin. I'm trying to use the Maven release plugin (through Jenkins) do a dry run and so am executing the options …

Executing Maven:  -B -f /scratch/jenkins/workspace/myproject/myproject/pom.xml -DdevelopmentVersion=53.0.0-SNAPSHOT -DreleaseVersion=52.0.0 -Dusername=***** -Dpassword=********* -DskipTests -P prod -Dresume=false -DdryRun=true release:prepare

但试运行因以下错误而死亡......

But the dry run is dying with the error below …

[JENKINS] Archiving /scratch/jenkins/workspace/myproject/myproject/pom.xml to /home/evotext/hudson_home/jobs/myproject/modules/org.mainco.subco$myproject/builds/2013-11-18_16-09-14/archive/org.mainco.subco/myproject/52.0.0/myproject-52.0.0.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project myproject: You don't have a SNAPSHOT project in the reactor projects list.
cause : You don't have a SNAPSHOT project in the reactor projects list.
    Stack trace : 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal  org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project myproject: You don't have a SNAPSHOT project in the reactor projects list.
    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:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    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:178)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:129)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:67)
    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.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.MojoFailureException: You don't have a SNAPSHOT project in the reactor projects list.
    at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:219)
    at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:181)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 30 more
Caused by: org.apache.maven.shared.release.ReleaseFailureException: You don't have a SNAPSHOT project in the reactor projects list.
    at org.apache.maven.shared.release.phase.CheckPomPhase.execute(CheckPomPhase.java:111)
    at org.apache.maven.shared.release.phase.CheckPomPhase.simulate(CheckPomPhase.java:123)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:199)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:140)
    at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:103)
    at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:211)
    ... 33 more

我的 SVN 签出方法设置为始终签出新副本",并且我的快照存储库中有一个有问题的快照版本,但我的发布存储库中没有.有没有办法让反应堆项目列表"来查看我的快照存储库?

My SVN checkout method is set to "Always checkout a fresh copy" and I have a snapshot version in question in my snapshot repository, but not in my release repository. Is there a way I can get the "reactor projects list" to look at my snapshot repo?

我在项目获取其版本的地方包含了我的 pom 片段——它从父级继承了它

I'm including the snippet of my pom where the project gets its version -- it inherits it from a parent

    <parent>
            <artifactId>subco</artifactId>
            <groupId>org.mainco.subco</groupId>
            <version>52.0.0</version>
    </parent>

推荐答案

您正在尝试发布一个不是快照的工件.这意味着您的工件的版本号类似于 3.0.3.该版本号意味着它已经发布.你不能发布一个版本.两者之间不会有任何变化,因此没有意义.

You're trying to release an artifact that's not a snapshot. That means your artifact's version number is something like 3.0.3. That version number implies its already been released. You can't release a release. There would be no changes in between and therefore no point.

您应该只发布 SNAPSHOT 版本.这意味着您的版本号将类似于 3.0.3-SNAPSHOT.

You're only supposed to release SNAPSHOT versions. That means your version number would be like 3.0.3-SNAPSHOT.

这篇关于“您在反应堆项目列表中没有 SNAPSHOT 项目."使用 Jenkins Maven 发布插件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆