You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org> on 2007/04/03 10:00:07 UTC

[jira] Commented: (MRELEASE-212) Mojo executed using preparationGoals does not get its parameters populated on execution

    [ http://jira.codehaus.org/browse/MRELEASE-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_91871 ] 

Emmanuel Venisse commented on MRELEASE-212:
-------------------------------------------

You can try that:

{noformat}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <configuration>
        <preparationGoals>clean integration-test myplugin:mygoal -DmyProp=${myProp}</preparationGoals>
    </configuration>
</plugin>
{noformat}

> Mojo executed using preparationGoals does not get its parameters populated on execution
> ---------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-212
>                 URL: http://jira.codehaus.org/browse/MRELEASE-212
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: William Ferguson
>
> I have a Mojo with a single String parameter
> 	/**
> 	 * @parameter expression="${myProp}"
> 	 */
> 	private String myProp;
> If this Mojo is executed directly, eg
>   mvn myplugin:mygoal -DmyProp=foo
> then the Mojo receives the value of myProp at runtime.
> If my Mojo is executed via maven-release-plugin preparationGoals eg
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-release-plugin</artifactId>
> 				<configuration>
> 					<preparationGoals>
> 						clean integration-test myplugin:mygoal
> 					</preparationGoals>
> 				</configuration>
> 			</plugin>
> the the Mojo is not injected with the value of MyProp at runtime.
> Now this could just be because there is some extra config that I need to do that I have missed. I am a Maven newbie.
> But I've followed all the doco for maven-release-plugin as well as anything I could find on building plugins.
> So if its my bad, please point me in the right direction.

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