You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2014/05/18 16:09:10 UTC

[jira] (MPLUGINTESTING-17) Add Property to the execution of Maven in ProjectTool

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

Jason van Zyl commented on MPLUGINTESTING-17:
---------------------------------------------

This class is deprecated. Use the @MojoRule or the verfiier if you want to run full buids.

> Add Property to the execution of Maven in ProjectTool
> -----------------------------------------------------
>
>                 Key: MPLUGINTESTING-17
>                 URL: https://jira.codehaus.org/browse/MPLUGINTESTING-17
>             Project: Maven Plugin Testing
>          Issue Type: Improvement
>          Components: plugin-testing-tools
>    Affects Versions: 1.2
>            Reporter: Peter Kofler
>            Priority: Minor
>         Attachments: maven-plugin-testing-tools_property_patch.txt
>
>
> {{BuildTool}} fails during integration test prepararion when the {{help-mojo}} of {{maven-plugin-plugin}} is executed. The guys from the Eclipse Plugin found a workaround by disabling it. But so the plugin under test can't be built from scratch any more. So they used a profile to run the integration tests and disable {{help-mojo}} execution. If the {{BuildTool}} would set a property, a separate profile could be used for different behaviour during integration testing. A proper profile could then look like that
> {code:xml}
>   <profiles>
>     <profile>
>       <id>failsafe-runnung-it</id>
>       <build>
>         <!-- skip test resources to speed up things -->
>         <testResources>
>           <testResource>
>             <directory>src/test/resources</directory>
>             <excludes>
>               <exclude>**/*</exclude>
>             </excludes>
>           </testResource>
>         </testResources>
>         <pluginManagement>
>           <plugins>
>             <!-- skip test compile to speed up things -->
>             <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-compiler-plugin</artifactId>
>               <configuration>
>                 <skip>true</skip>
>               </configuration>
>             </plugin>
>             <!-- copied from maven-eclipse-plugin -->
>             <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-plugin-plugin</artifactId>
>               <!-- lock down to old version as newer version aborts build upon no mojos as required during ITs, see below -->
>               <version>2.4.3</version>
>               <executions>
>                 <!-- disable execution, makes IT preparation using maven-plugin-testing-tools fail (see target/test-build-logs/setup.build.log) -->
>                 <execution>
>                   <id>help-mojo</id>
>                   <configuration>
>                     <extractors>
>                       <extractor />
>                     </extractors>
>                   </configuration>
>                 </execution>
>               </executions>
>             </plugin>
>             <!-- maven-plugin-testing-tools do not handle Failsafe Plugin -->
>             <plugin>
>               <groupId>org.codehaus.mojo</groupId>
>               <artifactId>failsafe-maven-plugin</artifactId>
>               <version>2.4.3-alpha-1</version>
>               <configuration>
>                 <skipTests>true</skipTests>
>               </configuration>
>             </plugin>
>           </plugins>
>         </pluginManagement>
>       </build>
>       <activation>
>         <property>
>           <name>maven-plugin-testing-tools:ProjectTool:packageProjectArtifact</name>
>         </property>
>       </activation>
>     </profile>
>   </profiles>
> {code}
> I used a working version of that in [https://code.google.com/p/code-cop-code/wiki/MackerMavenPlugin].



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)