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

Brett Porter commented on MNG-1446:
-----------------------------------

I don't agree with your statement about "trivial circumstances".

If inputFile is different for both mojos - what would you expect to to happen 
when someone configures "inputFile" at the plugin level? That would be 
confusing. Plugin level config is necessary so that you don't need to repeat 
config for every mojo - eg setting <source> for the compile goal and the test 
compile goal.

We decided to make the normal usage easy and everything else possible, as 
usual. Normally, you just want to put your configuration at the plugin level 
without specifying which goal it belongs to. If you want to bind something to 
the lifecycle with different configuration, you can. If you want two mojos to 
have different input values, then you need to name them differently.

> unable to config goals that are not bound to part of the standard lifecycle
> ---------------------------------------------------------------------------
>
>          Key: MNG-1446
>          URL: http://jira.codehaus.org/browse/MNG-1446
>      Project: Maven 2
>         Type: Bug
>     Versions: 2.0
>     Reporter: Dave Sag
>     Assignee: John Casey

>
> Original Estimate: 2 hours
>         Remaining: 2 hours
>
> My QALab plugin has three different goals and only a few of their config 
> params are in common with each other.  so each goal must have its own config. 
> So right now, for simplicity's sake, I just want the qalab:merge goal to work 
> when i enter %mvn qalab:merge
> my build section is as follows: 
> <build> 
>     <plugins> 
>         <plugin> 
>             <groupId>net.objectlab</groupId> 
>             <artifactId>maven-qalab-plugin</artifactId> 
>             <executions> 
>                 <execution> 
>                     <configuration> 
>                         
> <handler>net.objectlab.qalab.parser.CheckstyleStatMerge</handler> 
>                         
> <inputFile>${project.build.directory}/checkstyle-result.xml</inputFile> 
>                     </configuration> 
>                     <goals> 
>                        <goal>merge</goal> 
>                     </goals> 
>                 </execution> 
>              </executions> 
>         </plugin> 
>     </plugins> 
> </build> 
> when I try %mvn qalab:merge 
> i get 
> [ERROR] BUILD ERROR 
> [INFO] 
> ---------------------------------------------------------------------------- 
> [INFO] One or more required plugin parameters are invalid/missing for 
> 'qalab:merge' 
> [0] inside the definition for plugin: 'maven-qalab-plugin'specify the 
> following: 
> <configuration> 
>   ... 
>   <handler>VALUE</handler> 
> </configuration>. 
> [1] inside the definition for plugin: 'maven-qalab-plugin'specify the 
> following: 
> <configuration> 
>   ... 
>   <inputFile>VALUE</inputFile> 
> </configuration>. 
> if i move the config from the executions block such that it is like so: 
> <plugin> 
>     <groupId>net.objectlab</groupId> 
>     <artifactId>maven-qalab-plugin</artifactId> 
>     <configuration> 
>         <handler>net.objectlab.qalab.parser.CheckstyleStatMerge</handler> 
>         
> <inputFile>${project.build.directory}/checkstyle-result.xml</inputFile> 
>     </configuration> 
> </plugin> 
> then the params are accepted, but now I can't have different params for the 
> different goals, indeed i can't see how i'd go about specifying different 
> configs for the different goals in such a case.  I need goal specific 
> parameter config, not plugin-wide config.  or should I make these goals into 
> totally different plugins instead? 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to