Further to this, I have posted an issue in JIRA

http://jira.codehaus.org/browse/MNG-1446

Unable to config goals that are not bound to part of the standard 
lifecycle

cheers

dave


David Sag <[EMAIL PROTECTED]> wrote on 07-11-2005 08:50:51:

> 
> I am having real problems getting my plugin config to work. 
> 
> Here's my use case: 
> 
> a developer compiles and as part of her build checkstyle must be run
> and fail a build on any checkstyle errors. 
> this is easy and works fine. 
> 
> but within the same pom.xml file 
> 
> Continuum needs to build everything and, whether the build fails or 
> not, needs to then run the qalab plugin's merge goal with specific 
> config telling it to use the results generated by checkstyle. 
> 
> the 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.
> 
> my build section is as follows: 
> 
> <build> 
>     <plugins> 
>         <plugin> 
>             <groupId>org.apache.maven.plugins</groupId> 
>             <artifactId>maven-compiler-plugin</artifactId> 
>             <configuration> 
>                 <source>1.4</source> 
>                 <target>1.4</target> 
>             </configuration> 
>         </plugin> 
>         <plugin> 
>             <groupId>org.apache.maven.plugins</groupId> 
>             <artifactId>maven-javadoc-plugin</artifactId> 
>             <configuration> 
>                 <source>1.4</source> 
>             </configuration> 
>         </plugin> 
>         <plugin> 
>             <groupId>org.apache.maven.plugins</groupId> 
>             <artifactId>maven-checkstyle-plugin</artifactId> 
>             <configuration> 
>                 <outputFileFormat>xml</outputFileFormat> 
>                 <failsOnError>true</failsOnError> 
>             </configuration> 
>             <executions> 
>                 <execution> 
>                     <id>check-main-src</id> 
>                     <phase>compile</phase> 
>                     <configuration> 
>                         <outputFile>${project.build.directory}
> /checkstyle-result.xml</outputFile> 
>                     </configuration> 
>                     <goals> 
>                        <goal>checkstyle</goal> 
>                     </goals> 
>                 </execution> 
>              </executions> 
>         </plugin> 
>         <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> 
> 
> the checkstyle plugin works fine but 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? 
> 
> cheers 
> 
> dave
> 
> Kind regards,
> Dave Sag 
> 
> 
> [image removed] 
> 
> 

Reply via email to