[
https://jira.codehaus.org/browse/MINVOKER-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315141#comment-315141
]
Karl Heinz Marbaise commented on MINVOKER-147:
----------------------------------------------
The problem is that doc give the default value for setupIncludes
'setup*/pom.xml' which brings me to the conclusion that setting it explicit
shouldn't change anything. The following proves my assumption:
{code}
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ configurator-maven-plugin
---
[INFO] Building jar:
d:\ws\maven-configurator-plugin\target\configurator-maven-plugin-0.1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-plugin-plugin:3.2:addPluginArtifactMetadata
(default-addPluginArtifactMetadata) @ configurator-maven-plugin ---
[INFO]
[INFO] --- maven-invoker-plugin:1.8:install (integration-tests) @
configurator-maven-plugin ---
[INFO] Installing d:\ws\maven-configurator-plugin\pom.xml to
d:\ws\maven-configurator-plugin\target\local-repo\com\hrs\maven\plugins
\configurator-maven-plugin\0.1.0-SNAPSHOT\configurator-maven-plugin-0.1.0-SNAPSHOT.pom
[INFO] Installing
d:\ws\maven-configurator-plugin\target\configurator-maven-plugin-0.1.0-SNAPSHOT.jar
to d:\ws\maven-configurator-pl
ugin\target\local-repo\com\hrs\maven\plugins\configurator-maven-plugin\0.1.0-SNAPSHOT\configurator-maven-plugin-0.1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-invoker-plugin:1.8:run (integration-tests) @
configurator-maven-plugin ---
[INFO] use parallelThreads 4
[INFO] Building: setup-config\pom.xml
[INFO] Building: basicTest\pom.xml
[INFO] Building: missingConfigurationTest\pom.xml
[INFO] Building: configurationViaClassPathTest\pom.xml
[INFO] run script verify.groovy
[INFO] ..SUCCESS (4.9 s)
[INFO] Building: replacementInMultipleFilesTest\pom.xml
[INFO] run script verify.groovy
[INFO] ..SUCCESS (6.0 s)
[INFO] Building: simpleReplacementTest\pom.xml
[INFO] ..FAILED (6.4 s)
[INFO] The build exited with code 1. See
d:\ws\maven-configurator-plugin\target\it\setup-config\build.log for details.
[INFO] ..FAILED (6.4 s)
[INFO] The build exited with code 1. See
d:\ws\maven-configurator-plugin\target\it\configurationViaClassPathTest\build.log
for det
ails.
[INFO] run script verify.groovy
[INFO] ..SUCCESS (4.1 s)
[INFO] run script verify.groovy
[INFO] ..SUCCESS (4.3 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO] Passed: 4, Failed: 2, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] * setup-config\pom.xml
[ERROR] * configurationViaClassPathTest\pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.240s
[INFO] Finished at: Thu Dec 06 16:08:46 CET 2012
[INFO] Final Memory: 31M/373M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-invoker-plugin:1.8:run (integration-tests) on
project configurator-mav
en-plugin: 2 builds failed. See console output above for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
{code}
The problem in my opinion is based on the block of projects which will be
started in parallel:
{code}
[INFO] use parallelThreads 4
[INFO] Building: setup-config\pom.xml
[INFO] Building: basicTest\pom.xml
[INFO] Building: missingConfigurationTest\pom.xml
[INFO] Building: configurationViaClassPathTest\pom.xml
{code}
which could never working. To be sure to run the setup*/pom.xml projects first
it must be executed in a separate step. The order of the setup*/pom.xml jobs
isn't guaranteed.
> setupIncludes / parallelThreads does not guarantee execution of
> setup*/pom.xml first.
> -------------------------------------------------------------------------------------
>
> Key: MINVOKER-147
> URL: https://jira.codehaus.org/browse/MINVOKER-147
> Project: Maven 2.x Invoker Plugin
> Issue Type: Bug
> Affects Versions: 1.8
> Environment: All.
> Reporter: Karl Heinz Marbaise
>
> I've setup an integration test for a maven plugin. I have configured the
> maven-invoker-plugin like the following:
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-invoker-plugin</artifactId>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy</artifactId>
> <version>${org.codehaus.groovy-groovy.version}</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.gmaven.runtime</groupId>
> <artifactId>gmaven-runtime-1.8</artifactId>
>
> <version>${org.codehaus.gmaven.runtime-gmaven-runtime-1.8}</version>
> </dependency>
> </dependencies>
> <configuration>
> <addTestClassPath>true</addTestClassPath>
> <debug>false</debug>
>
> <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
> <projectsDirectory>src/it</projectsDirectory>
> <showVersion>true</showVersion>
> <pomIncludes>
> <pomInclude>*/pom.xml</pomInclude>
> </pomIncludes>
> <preBuildHookScript>setup</preBuildHookScript>
> <postBuildHookScript>verify</postBuildHookScript>
> <settingsFile>src/it/settings.xml</settingsFile>
> <parallelThreads>1</parallelThreads>
> </configuration>
> <executions>
> <execution>
> <id>integration-tests</id>
> <goals>
> <goal>install</goal>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> {code}
> I have a setup-config/pom.xml project which must be installed before any
> other tests which seemed to be working with the above configuration.
> But I would like to use the parallelThreads with for example 3 or 4 the
> result is that the build fails, cause the setup-config/pom.xml project is not
> running before any other integration.
> This gives the hint that it is not guaranteed that the setup-*/pom.xml
> project will be running before other integration tests.
> In my opinion the setup-*/pom.xml project must be started first with the
> appropriate threads afterwards the other integration tests must be started
> within a second step.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira