You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Renaud Julienne (JIRA)" <ji...@codehaus.org> on 2006/03/29 09:30:44 UTC

[jira] Commented: (MNG-1983) Mojo parameters defined in abstract-mojo class not set, when concrete/abstract mojo class in different JARs

    [ http://jira.codehaus.org/browse/MNG-1983?page=comments#action_62257 ] 

Renaud Julienne commented on MNG-1983:
--------------------------------------

I had the same issue, so I looked for the reason. This fails when the parent class is in another jar because the plugin tools rely on the javadoc tags that can be found in the java source files present in the java sources directory of th project.

A way to solve this issue may be to switch from doclets to java 5 annotations for plugin tools. Besides, the doclet explorer tool used seems not to support annotations in the explored source files.



> Mojo parameters defined in abstract-mojo class not set, when concrete/abstract mojo class in different JARs
> -----------------------------------------------------------------------------------------------------------
>
>          Key: MNG-1983
>          URL: http://jira.codehaus.org/browse/MNG-1983
>      Project: Maven 2
>         Type: Bug

>   Components: Plugins and Lifecycle
>     Versions: 2.0.2
>  Environment: Maven-2.0.2 (also in Maven-2.0.1)
> Win-XP/Pro - Cygwin
> $ java -version
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
>     Reporter: Shash Chatterjee
>  Attachments: abstractmojotest.zip
>
>
> Have an abstract mojo class, which extends AbstractMojo.  This abstract class defines some mojo parameters with expressions to set default values.
> Have a concrete class, in the same project (JAR) and package, which simply extends the abstract mojo class.  This works fine, in that the parameter values are initialized correctly.
> Have an identical concrete class, but this time in a different project which defines a Maven dependency on the previous JAR.  This time the parameters defined in the abstract class are not initialized correctly.  Whether this second concrete mojo is in the same Java package as the abstract class, or not, does not seem to make a difference.
> I have attached a ZIP file which demonstrates the problem.  Included are three very simple Maven modules, all created with "mvn archetype:create".  The first project, "testplugin-one" contains an abstract and a concrete Mojo class.  The second project, "testplugin-two" contains just a concrete Mojo class.  The third project "testplugin-driver" contains a POM that invokes the two mojos: the first time the parameters have values, the second time they are null.

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