Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
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.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Patch Submitted | [Yes] |
| Patch Submitted | [Yes] |
| Fix Version/s | Reviewed [ 13555 ] |
| Component/s | Plugin API [ 11521 ] | |
| Component/s | Plugin Requests [ 11899 ] | |
| Key | MNG-2610 | MPLUGIN-51 |
| Component/s | Bootstrap & Build [ 11865 ] | |
| Component/s | Sites & Reporting [ 12030 ] | |
| Fix Version/s | Reviewed Pending Version Assignment [ 13555 ] | |
| Affects Version/s | 2.0.4 [ 12527 ] | |
| Component/s | Plugin Creation Tools [ 11382 ] | |
| Project | Maven 2 [ 10500 ] | Maven 2.x Plugin Tools [ 11139 ] |
| Description |
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. |
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. |