You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "William Ferguson (JIRA)" <ji...@codehaus.org> on 2007/04/03 09:00:07 UTC
[jira] Created: (MRELEASE-212) Mojo executed using preparationGoals
does not get its parameters populated on execution
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
[jira] Commented: (MRELEASE-212) Mojo executed using
preparationGoals does not get its parameters populated on execution
Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Closed: (MRELEASE-212) Mojo executed using preparationGoals
does not get its parameters populated on execution
Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Ferguson closed MRELEASE-212.
-------------------------------------
Resolution: Won't Fix
I got around this issue by retrieving the information from Subversion directly.
But this has meant that the plugin which does so needs to be executed as a precise point in the release which is NOT the
prepareGoals phase - which makes http://jira.codehaus.org/browse/MRELEASE-213 all the more important.
> 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
[jira] Commented: (MRELEASE-212) Mojo executed using
preparationGoals does not get its parameters populated on execution
Posted by "William Ferguson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRELEASE-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_91963 ]
William Ferguson commented on MRELEASE-212:
-------------------------------------------
Thanks Emmanuel - that does allow the property to get passed in.
I was trying to get hold of the value of the dryRun parameter that can be passed to the maven-release-plugin as I will need to perform different behaviour depending on whether its a dry run or not - which I expect is typical.
But I think development of my plugin will have to go on hold until http://jira.codehaus.org/browse/MRELEASE-213 is resolved in some form. I really need access to the SCM Release tag specified by the user. Is there no way to retrieve this value via a MavenProject property?
> 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