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

        

Reply via email to