You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Siveton (JIRA)" <ji...@codehaus.org> on 2008/03/01 17:12:28 UTC

[jira] Updated: (MPLUGIN-51) Allow plugin annotations on mojo members' classes

     [ http://jira.codehaus.org/browse/MPLUGIN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton updated MPLUGIN-51:
-----------------------------------

    Description: 
Right now, you can design a plugin to take nested xml in its <configuration> section. For example:

{noformat} 
<configuration>
    ...
    <classPath>
        <mainClass>com.whatever.Main</mainClass>
        <cp>this.jar;that.jar</cp>
    </classPath>
    ...
</configuration>
{noformat} 

This indicates that the mojo class has a classPath member of type ClassPath, and the ClassPath class has members named mainClass and cp.

Unfortuatenly, maven doesn't know anything more about mainClass and cp. It would be nice if these fields could have the same tags as top-level fields, so I could mark them @required, give them default-values, etc.

This would require changing the maven-plugin-plugin to read javadoc and add more data to plugin.xml. I think the extra data should be within the containing <parameter> tag, since adding new top-level <parameter> tags will probably break things.

Then we'd need to change how maven uses plugins, so it looks for these nested tags and honors them.

Then we should also change whatever auto-generates plugin documentation, so that the table of plugin parameters include the javadoc of nested fields.

It seems like a lot of work, but I'd be happy to start on a patch.


  was:
Right now, you can design a plugin to take nested xml in its <configuration> section. For example:

<configuration>
    ...
    <classPath>
        <mainClass>com.whatever.Main</mainClass>
        <cp>this.jar;that.jar</cp>
    </classPath>
    ...
</configuration>

This indicates that the mojo class has a classPath member of type ClassPath, and the ClassPath class has members named mainClass and cp.

Unfortuatenly, maven doesn't know anything more about mainClass and cp. It would be nice if these fields could have the same tags as top-level fields, so I could mark them @required, give them default-values, etc.

This would require changing the maven-plugin-plugin to read javadoc and add more data to plugin.xml. I think the extra data should be within the containing <parameter> tag, since adding new top-level <parameter> tags will probably break things.

Then we'd need to change how maven uses plugins, so it looks for these nested tags and honors them.

Then we should also change whatever auto-generates plugin documentation, so that the table of plugin parameters include the javadoc of nested fields.

It seems like a lot of work, but I'd be happy to start on a patch.



> Allow plugin annotations on mojo members' classes
> -------------------------------------------------
>
>                 Key: MPLUGIN-51
>                 URL: http://jira.codehaus.org/browse/MPLUGIN-51
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Improvement
>            Reporter: Paul Jungwirth
>            Priority: Minor
>
> Right now, you can design a plugin to take nested xml in its <configuration> section. For example:
> {noformat} 
> <configuration>
>     ...
>     <classPath>
>         <mainClass>com.whatever.Main</mainClass>
>         <cp>this.jar;that.jar</cp>
>     </classPath>
>     ...
> </configuration>
> {noformat} 
> This indicates that the mojo class has a classPath member of type ClassPath, and the ClassPath class has members named mainClass and cp.
> Unfortuatenly, maven doesn't know anything more about mainClass and cp. It would be nice if these fields could have the same tags as top-level fields, so I could mark them @required, give them default-values, etc.
> This would require changing the maven-plugin-plugin to read javadoc and add more data to plugin.xml. I think the extra data should be within the containing <parameter> tag, since adding new top-level <parameter> tags will probably break things.
> Then we'd need to change how maven uses plugins, so it looks for these nested tags and honors them.
> Then we should also change whatever auto-generates plugin documentation, so that the table of plugin parameters include the javadoc of nested fields.
> It seems like a lot of work, but I'd be happy to start on a patch.

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