You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sebastian Hoß <ma...@shoss.de> on 2009/12/01 19:42:41 UTC

Problem with changes-plugin and announcement-generate

Hey there,

when trying to run "mvn changes:announcement-generate" I get the
following stack trace:

[INFO] Creating announcement file from JIRA releases...
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Couldn't find the release '2.2' among the supplied releases.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Couldn't find
the release '2.2' among the supplied releases.
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Couldn't find
the release '2.2' among the supplied releases.
	at
org.apache.maven.plugin.announcement.AnnouncementMojo.getLatestRelease(AnnouncementMojo.java:468)
	at
org.apache.maven.plugin.announcement.AnnouncementMojo.doGenerate(AnnouncementMojo.java:357)
	at
org.apache.maven.plugin.announcement.AnnouncementMojo.doJiraGenerate(AnnouncementMojo.java:590)
	at
org.apache.maven.plugin.announcement.AnnouncementMojo.execute(AnnouncementMojo.java:343)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	... 17 more

So it seems to be looking for a 2.2 release at JIRA and finds nothing
even though I have specified fixVersionIDs to point to the 1.0.0
release. I also tried setting onlyCurrentVersion to true but the plugin
is still looking for a version 2.2 so I looked into the source and I
might know why now:

At line 435 in AnnouncementMojo.java[1] there is a call to getVersion()
which sets the pomVersion to whatever the call returns. However
getVersion() does not return the projects version taken from the POM but
the actual version of the plugin itself. That is why it is always
looking for a 2.2 release.
Later on it compares the found version with the versions from the list
of given releases and since I don't have any 2.2 release it returns null
and throws the MojoExecutionException.

I'm running Maven 2.2.1 and changes-plugin 2.2. I also tried version 2.1
and 2.0 of the plugin but none works. 2.1 looks for its own version
number too (in this case reporting that release 2.1 could not be found)
and 2.0 talks about the correct version at least (1.0.0) but still says
that it cannot find release 1.0.0 among the supplied releases.

Has anybody seen this before? What version of the plugin are you guys
running to send announcements to this list? Is there anything else I'm
missing for it to work? Creating a static jira report along the usual
"mvn site" goal works fine and the jira instance is running properly
too.

Greets!

[1]:
http://maven.apache.org/plugins/maven-changes-plugin/xref/org/apache/maven/plugin/announcement/AnnouncementMojo.html#434


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem with changes-plugin and announcement-generate

Posted by Dennis Lundberg <de...@apache.org>.
I don't think it is a bug, but rather a configuration issue.
Since we cant attach files on the user list, please open an issue in
JIRA and attach your pom.xml file there.

Sebastian Hoß wrote:
> Hey there,
> 
> when trying to run "mvn changes:announcement-generate" I get the
> following stack trace:
> 
> [INFO] Creating announcement file from JIRA releases...
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Couldn't find the release '2.2' among the supplied releases.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Couldn't find
> the release '2.2' among the supplied releases.
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Couldn't find
> the release '2.2' among the supplied releases.
> 	at
> org.apache.maven.plugin.announcement.AnnouncementMojo.getLatestRelease(AnnouncementMojo.java:468)
> 	at
> org.apache.maven.plugin.announcement.AnnouncementMojo.doGenerate(AnnouncementMojo.java:357)
> 	at
> org.apache.maven.plugin.announcement.AnnouncementMojo.doJiraGenerate(AnnouncementMojo.java:590)
> 	at
> org.apache.maven.plugin.announcement.AnnouncementMojo.execute(AnnouncementMojo.java:343)
> 	at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	... 17 more
> 
> So it seems to be looking for a 2.2 release at JIRA and finds nothing
> even though I have specified fixVersionIDs to point to the 1.0.0
> release. I also tried setting onlyCurrentVersion to true but the plugin
> is still looking for a version 2.2 so I looked into the source and I
> might know why now:
> 
> At line 435 in AnnouncementMojo.java[1] there is a call to getVersion()
> which sets the pomVersion to whatever the call returns. However
> getVersion() does not return the projects version taken from the POM but
> the actual version of the plugin itself. That is why it is always
> looking for a 2.2 release.
> Later on it compares the found version with the versions from the list
> of given releases and since I don't have any 2.2 release it returns null
> and throws the MojoExecutionException.
> 
> I'm running Maven 2.2.1 and changes-plugin 2.2. I also tried version 2.1
> and 2.0 of the plugin but none works. 2.1 looks for its own version
> number too (in this case reporting that release 2.1 could not be found)
> and 2.0 talks about the correct version at least (1.0.0) but still says
> that it cannot find release 1.0.0 among the supplied releases.
> 
> Has anybody seen this before? What version of the plugin are you guys
> running to send announcements to this list? Is there anything else I'm
> missing for it to work? Creating a static jira report along the usual
> "mvn site" goal works fine and the jira instance is running properly
> too.
> 
> Greets!
> 
> [1]:
> http://maven.apache.org/plugins/maven-changes-plugin/xref/org/apache/maven/plugin/announcement/AnnouncementMojo.html#434
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org