[
https://jira.codehaus.org/browse/MCHANGES-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=346391#comment-346391
]
Dennis Lundberg commented on MCHANGES-335:
------------------------------------------
Hi Guillaume,
Thanks for the test project. As I suspected this is a configuration problem,
rather than a bug in the plugin. Let me try to explain what is happening and
why.
When you run "mvn clean changes:announcement-mail" on you project this is what
happens:
* The changes:announcement-generate goal is executed prior to
announcement-mail. It uses the parameters {{template}} and
{{templateDirectory}} to find the template, and {{templateEncoding}} to read it
using the correct encoding.
* The resulting announcement file is put in this directory:
{{$\{project.build.directory\}/announcement/}}
* The file name will be the same as the template, since {{announcementFile}} is
not specified, which means {{custom-announcement_fr.vm}} in your project
* Now the changes:announcement-mail runs
* It will try to read the announcement file using the default values for
{{announcementDirectory}} and {{announcementFile}}, since they are not
specified. This means looking for the file
{{$\{project.build.directory\}/announcement/announcement.vm}}
To sum things up. The {{template*}} parameters specify the template while the
{{announcementDirectory}} and {{announcementFile}} specify the generated
announcement file. The latter two is the glue between the
{{announcement-generate}} and {{announcement-mail}} goals. They have default
values that can work under some circumstances (if you don't use a custom name
for the template), but not for all.
You have two options:
# Rename your announcement file to {{announcement.vm}}
# Specify the {{annnouncementFile}} parameter
> announcement-mail broken when NOT using the announcementFile parameter
> ----------------------------------------------------------------------
>
> Key: MCHANGES-335
> URL: https://jira.codehaus.org/browse/MCHANGES-335
> Project: Maven Changes Plugin
> Issue Type: Bug
> Components: announcement
> Affects Versions: 2.10
> Reporter: Guillaume Husta
> Attachments: test-changes-335.zip
>
>
> When using a custom template to generate an announcement, the goal
> _announcement-mail_ will fail if :
> * I provide the parameters _template_ (other than announcement.vm) and
> _templateDirectory_
> * and I don't provide the parameter _announcementFile_
> Trace :
> bq. [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-changes-plugin:2.10:announcement-mail
> (default-cli) on project test-changes-sendmail: Announcement file
> D:\Projets\Workspace_projets_java\test-changes-sendmail\target\announcement\announcement.vm
> not found... -> [Help 1]
> This is a *regression* : it worked with version 2.9
> Related to MCHANGES-280
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)