maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5563) Ensuring only the available parameters are allowed
Date Thu, 16 Jan 2014 07:39:49 GMT

    [ https://jira.codehaus.org/browse/MNG-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=338731#comment-338731
] 

Herve Boutemy commented on MNG-5563:
------------------------------------

notice practice is to define configuration at plugin level and rarely at goal level, because
a lot of parameters are generally shared between different goals of the plugin and configuration
difference between goals wouldn't make sense
Then actually it's hard (if not impossible) to define a parameter only for a given goal

Then IMHO, your mojo will have to check for whole plugin configuration parameter

I suppose we could improve plugin-tools to generate a plugin helper, the same way plugin-ools
already generates help mojo: http://maven.apache.org/plugin-tools/maven-plugin-plugin/helpmojo-mojo.html
                
> Ensuring only the available parameters are allowed
> --------------------------------------------------
>
>                 Key: MNG-5563
>                 URL: https://jira.codehaus.org/browse/MNG-5563
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: POM
>            Reporter: Savas Ali Tokmen
>
> I am one of the owners of Codehaus CARGO, which has a Maven2/Maven3 plugin; and would
have an improvement request with regards to how parameters are managed.
> Currently, what happens is that if a user unwillingly puts a parameter in the wrong place
then the plugin execution continues as is. One of the latest such issues one of the users
has had can be found on http://cargo.996258.n3.nabble.com/Maven-plugin-and-javaagent-tp18075.html
> As an example, I can write the below POM and build still works (even thought the MOJO
has no parameter called "foo"):
> {noformat}
>   <plugin>
>     <groupId>org.codehaus.cargo</groupId>
>     <artifactId>cargo-maven2-plugin</artifactId>
>     <version>1.4.6</version>
>     <configuration>
>       <foo>
>         bar
>       </foo>
>     </configuration>
>   </plugin>
> {noformat}
> It would be good for the MOJO developer to be ablo instruct by MOJO to fail if there
is an unknown parameter in the configuration.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message