You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jean-Paul GUIGUI (JIRA)" <ji...@codehaus.org> on 2009/01/02 08:19:19 UTC

[jira] Created: (MCHANGES-145) Error when trying to send email for multi-module projects

Error when trying to send email for multi-module projects
---------------------------------------------------------

                 Key: MCHANGES-145
                 URL: http://jira.codehaus.org/browse/MCHANGES-145
             Project: Maven 2.x Changes Plugin
          Issue Type: Bug
          Components: announcement
    Affects Versions: 2.1
         Environment: maven 2.0.9
JDK 1.6.011
WinXP
            Reporter: Jean-Paul GUIGUI


If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
   Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...

Should be possible to configure the pom to send only the email for the root project.
Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 

The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.


Should include something like:
	/**
	 * @parameter expression="${project}"
	 **/
	private MavenProject          mavenProject;


	/**
	 * If true, will generate the changes only for the root module in case of project with sub-modules.
	 * 
	 * @parameter expression="${plugin.aggregate}" default-value = "false"
	 */
	private boolean               aggregate;


public void execute() {
			if (!mavenProject.isExecutionRoot() && aggregate) {
				// Execute only for the main module in case of project with sub-modules
				return;
			}
                       ..................
}



-- 
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

        

[jira] Updated: (MCHANGES-145) Error when trying to send email for multi-module projects

Posted by "Gabriele Columbro (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCHANGES-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriele Columbro updated MCHANGES-145:
---------------------------------------

    Attachment: MCHANGES-145-CORRECT.patch

This is the correct patch :)

Ignore latest one, WDYT?

> Error when trying to send email for multi-module projects
> ---------------------------------------------------------
>
>                 Key: MCHANGES-145
>                 URL: http://jira.codehaus.org/browse/MCHANGES-145
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: announcement
>    Affects Versions: 2.1
>         Environment: maven 2.0.9
> JDK 1.6.011
> WinXP
>            Reporter: Jean-Paul GUIGUI
>         Attachments: MCHANGES-145-CORRECT.patch, MCHANGES-145.patch
>
>
> If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
>    Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...
> Should be possible to configure the pom to send only the email for the root project.
> Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 
> The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.
> Should include something like:
> 	/**
> 	 * @parameter expression="${project}"
> 	 **/
> 	private MavenProject          mavenProject;
> 	/**
> 	 * If true, will generate the changes only for the root module in case of project with sub-modules.
> 	 * 
> 	 * @parameter expression="${plugin.aggregate}" default-value = "false"
> 	 */
> 	private boolean               aggregate;
> public void execute() {
> 			if (!mavenProject.isExecutionRoot() && aggregate) {
> 				// Execute only for the main module in case of project with sub-modules
> 				return;
> 			}
>                        ..................
> }

-- 
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

        

[jira] Commented: (MCHANGES-145) Error when trying to send email for multi-module projects

Posted by "Gabriele Columbro (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCHANGES-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197555#action_197555 ] 

Gabriele Columbro commented on MCHANGES-145:
--------------------------------------------

I implemented and tested the specified "aggregate" behavior and it definitely works, and at least I can use the maven-changes-plugin in my multimodule releases.

Still, sounds like a workaround as I'd like to be able to send an announcement for each and every of my submodules.

Once/if this workaround is committed, I suggest to open a related issue for an improvement in the multimodule behavior of the changes plugin.

WDYT?

> Error when trying to send email for multi-module projects
> ---------------------------------------------------------
>
>                 Key: MCHANGES-145
>                 URL: http://jira.codehaus.org/browse/MCHANGES-145
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: announcement
>    Affects Versions: 2.1
>         Environment: maven 2.0.9
> JDK 1.6.011
> WinXP
>            Reporter: Jean-Paul GUIGUI
>         Attachments: MCHANGES-145.patch
>
>
> If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
>    Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...
> Should be possible to configure the pom to send only the email for the root project.
> Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 
> The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.
> Should include something like:
> 	/**
> 	 * @parameter expression="${project}"
> 	 **/
> 	private MavenProject          mavenProject;
> 	/**
> 	 * If true, will generate the changes only for the root module in case of project with sub-modules.
> 	 * 
> 	 * @parameter expression="${plugin.aggregate}" default-value = "false"
> 	 */
> 	private boolean               aggregate;
> public void execute() {
> 			if (!mavenProject.isExecutionRoot() && aggregate) {
> 				// Execute only for the main module in case of project with sub-modules
> 				return;
> 			}
>                        ..................
> }

-- 
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

        

[jira] Updated: (MCHANGES-145) Make it possible to run the announcement goals only once for a multi-module project

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCHANGES-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MCHANGES-145:
-------------------------------------

    Fix Version/s: 2.3
         Assignee: Dennis Lundberg
       Issue Type: New Feature  (was: Bug)
          Summary: Make it possible to run the announcement goals only once for a multi-module project  (was: Error when trying to send email for multi-module projects)

> Make it possible to run the announcement goals only once for a multi-module project
> -----------------------------------------------------------------------------------
>
>                 Key: MCHANGES-145
>                 URL: http://jira.codehaus.org/browse/MCHANGES-145
>             Project: Maven 2.x Changes Plugin
>          Issue Type: New Feature
>          Components: announcement
>    Affects Versions: 2.1
>         Environment: maven 2.0.9
> JDK 1.6.011
> WinXP
>            Reporter: Jean-Paul GUIGUI
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MCHANGES-145-CORRECT.patch, MCHANGES-145.patch
>
>
> If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
>    Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...
> Should be possible to configure the pom to send only the email for the root project.
> Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 
> The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.
> Should include something like:
> 	/**
> 	 * @parameter expression="${project}"
> 	 **/
> 	private MavenProject          mavenProject;
> 	/**
> 	 * If true, will generate the changes only for the root module in case of project with sub-modules.
> 	 * 
> 	 * @parameter expression="${plugin.aggregate}" default-value = "false"
> 	 */
> 	private boolean               aggregate;
> public void execute() {
> 			if (!mavenProject.isExecutionRoot() && aggregate) {
> 				// Execute only for the main module in case of project with sub-modules
> 				return;
> 			}
>                        ..................
> }

-- 
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

        

[jira] Closed: (MCHANGES-145) Make it possible to run the announcement goals only once for a multi-module project

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCHANGES-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MCHANGES-145.
------------------------------------

    Resolution: Fixed

I opted for a different approach than the attached patch. This is based on the same principle that has been used successfully in the Assembly Plugin. See Brian's blog post about it http://www.sonatype.com/people/2009/05/how-to-make-a-plugin-run-once-during-a-build/

A little refactoring was required to make it work for both announcement-generate and announcement-mail goals.

Fixed in [r884563|http://svn.apache.org/viewvc?view=revision&revision=884563].

> Make it possible to run the announcement goals only once for a multi-module project
> -----------------------------------------------------------------------------------
>
>                 Key: MCHANGES-145
>                 URL: http://jira.codehaus.org/browse/MCHANGES-145
>             Project: Maven 2.x Changes Plugin
>          Issue Type: New Feature
>          Components: announcement
>    Affects Versions: 2.1
>         Environment: maven 2.0.9
> JDK 1.6.011
> WinXP
>            Reporter: Jean-Paul GUIGUI
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MCHANGES-145-CORRECT.patch, MCHANGES-145.patch
>
>
> If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
>    Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...
> Should be possible to configure the pom to send only the email for the root project.
> Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 
> The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.
> Should include something like:
> 	/**
> 	 * @parameter expression="${project}"
> 	 **/
> 	private MavenProject          mavenProject;
> 	/**
> 	 * If true, will generate the changes only for the root module in case of project with sub-modules.
> 	 * 
> 	 * @parameter expression="${plugin.aggregate}" default-value = "false"
> 	 */
> 	private boolean               aggregate;
> public void execute() {
> 			if (!mavenProject.isExecutionRoot() && aggregate) {
> 				// Execute only for the main module in case of project with sub-modules
> 				return;
> 			}
>                        ..................
> }

-- 
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

        

[jira] Updated: (MCHANGES-145) Error when trying to send email for multi-module projects

Posted by "Gabriele Columbro (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCHANGES-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriele Columbro updated MCHANGES-145:
---------------------------------------

    Attachment: MCHANGES-145.patch

Patch for implementing the described behavior of inhibition for multimodule projects

> Error when trying to send email for multi-module projects
> ---------------------------------------------------------
>
>                 Key: MCHANGES-145
>                 URL: http://jira.codehaus.org/browse/MCHANGES-145
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: announcement
>    Affects Versions: 2.1
>         Environment: maven 2.0.9
> JDK 1.6.011
> WinXP
>            Reporter: Jean-Paul GUIGUI
>         Attachments: MCHANGES-145.patch
>
>
> If the pom.xml is containing some sub-modules, the goal changes:announcement-mail is trying to send it for each module, and fail because it could not find the template.
>    Announcement template C:\Dev\MyProject\SubmoduleA\target\announcement\announcement.vm not found...
> Should be possible to configure the pom to send only the email for the root project.
> Working with "mvn --non-recursive" option, but we need to be able to configure this behaviour into the pom.xml 
> The same issue for the changes:announcement-generate, but it's only a warning and the build can finish successfully.
> Should include something like:
> 	/**
> 	 * @parameter expression="${project}"
> 	 **/
> 	private MavenProject          mavenProject;
> 	/**
> 	 * If true, will generate the changes only for the root module in case of project with sub-modules.
> 	 * 
> 	 * @parameter expression="${plugin.aggregate}" default-value = "false"
> 	 */
> 	private boolean               aggregate;
> public void execute() {
> 			if (!mavenProject.isExecutionRoot() && aggregate) {
> 				// Execute only for the main module in case of project with sub-modules
> 				return;
> 			}
>                        ..................
> }

-- 
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