You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2009/12/27 23:32:55 UTC

[jira] Closed: (MCHANGES-188) Announcement collides with ${changes.version} property

     [ http://jira.codehaus.org/browse/MCHANGES-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MCHANGES-188.
------------------------------------

    Resolution: Not A Bug

One thing I do to avoid problems like this is to avoid using dots when naming properties. So in your example I would name the property "changesVersion" instead of "changes.version".

We have a naming convention for plugin parameters that are specified on the command line. It looks loosely like this:
  <plugin-name>.<property-name>

It isn't implemented everywhere, but at least new parameters use that convention. So staying away from naming your own properties in that way can help you avoid confusion.

> 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