[ http://jira.codehaus.org/browse/MPLUGINTESTING-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy updated MPLUGINTESTING-17: ---------------------------------------- Description: {{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]. was: {{{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 {{{ <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> }}} I used a working version of that in [https://code.google.com/p/code-cop-code/wiki/MackerMavenPlugin]. > Add Property to the execution of Maven in ProjectTool > ----------------------------------------------------- > > Key: MPLUGINTESTING-17 > URL: http://jira.codehaus.org/browse/MPLUGINTESTING-17 > Project: Maven 2.x 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 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