[
http://jira.codehaus.org/browse/MCHANGES-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200920#action_200920
]
Sebastian Hoß commented on MCHANGES-188:
----------------------------------------
Well I did read about the version parameter but I was not aware of the fact
that ${changes.version} "overwrites" this. E.g. I did not know that:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<configuration>
<version>2.0</version>
</configuration>
</plugin>
{code}
is the same as setting
{code:xml}
<properties>
<changes.version>2.0</changes.version>
</properties>
{code}
The problem I had was that moving from a jira report during site generation
with the following (I've surrounded the property with extra braces because of
markup)
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>{${changes.version}}</version>
<configuration>
<onlyCurrentVersion>true</onlyCurrentVersion>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>jira-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
{code}
to an extra announcement mail during the build/release process with the
following (omitting the mail/smtp details)
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>{${changes.version}}</version>
<configuration>
<onlyCurrentVersion>true</onlyCurrentVersion>
<generateJiraAnnouncement>true</generateJiraAnnouncement>
</configuration>
</plugin>
{code}
does not work since I've set the changes.version property. I even tried setting
the <version> property inside the configuration section manually but
${changes.version} supersedes this. If this was clear to anyone else then I'm
fine with closing this issue as invalid or whatever. If that is not the case
extending the version parameter description should be sufficient, e.g.:
"Version of the artifact. Defaults to ${changes.version} or ${project.version}."
> Announcement collides with ${changes.version} property
> ------------------------------------------------------
>
> Key: MCHANGES-188
> URL: http://jira.codehaus.org/browse/MCHANGES-188
> Project: Maven 2.x Changes Plugin
> Issue Type: Bug
> Components: announcement
> Affects Versions: 2.2
> Reporter: Sebastian Hoß
>
> When you set the ${changes.version} property manually (e.g. to specify the
> version of the changes plugin itself) the changes-plugin uses the given value
> as the projects version and fails if you don't have a matching release with
> the exact same version number.
> This behavior is AFAIK not documented anywhere and should either be changed
> or documented. I stumbled upon this yesterday and wrote an mail with further
> information and a stack trace for this here:
> http://maven.markmail.org/message/mg2qfnd4lw53larn
> The plugins documentation[1] itself says that ${project.version} is the
> default value for the version field, however the code[2] tells that version
> is set to the expression="${changes.version}" with a
> default-value="${project.version}". So this "bug" only affects people who
> have defined a ${changes.version} property. Changing the name of the property
> resolves this.
> This only affects the announcement goals, jira-report along mvn site runs
> fine which may be a little confusing for users who have a running mvn site
> configuration and now want to add announcement mails but run into this
> problem (like myself in this case).
> [1]:
> http://maven.apache.org/plugins/maven-changes-plugin/announcement-generate-mojo.html
> [2]:
> http://maven.apache.org/plugins/maven-changes-plugin/xref/org/apache/maven/plugin/announcement/AnnouncementMojo.html#82
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira