[
https://jira.codehaus.org/browse/MSITE-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=321665#comment-321665
]
Pierre Cardoso commented on MSITE-650:
--------------------------------------
Well, it is indeed the same problem. Using maven -X, I see that the
maven-surefire-plugin executions triggered by the site plugin are messed up.
The debug traces show that the four executions (default-test, unit-tests,
comp-tests, sys-tests) have the same set of properties, that seem to be those
of unit-tests. Notice the "groups" line :
For default :
{noformat}
[INFO] --- maven-surefire-plugin:2.12.2:test (default-test) @ mavenproject2 ---
[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test from plugin realm
ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.2,
parent: sun.misc.Launcher$AppClassLoader@93dee9]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test' with basic
configurator -->
[DEBUG] (s) basedir = D:\DONNEES\workspace\mavenproject2
[DEBUG] (s) childDelegation = false
[DEBUG] (s) classesDirectory =
D:\DONNEES\workspace\mavenproject2\target\generated-classes\cobertura
[DEBUG] (s) disableXmlReport = false
[DEBUG] (s) enableAssertions = true
[DEBUG] (s) forkMode = once
[DEBUG] (s) groups = com.mycompany.mavenproject2.UnitTest
[DEBUG] (s) junitArtifactName = junit:junit
[DEBUG] (s) localRepository = id: local
{noformat}
For unit-tests :
{noformat}
[INFO] --- maven-surefire-plugin:2.12.2:test (unit-tests) @ mavenproject2 ---
[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test from plugin realm
ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.2,
parent: sun.misc.Launcher$AppClassLoader@93dee9]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test' with basic
configurator -->
[DEBUG] (s) basedir = D:\DONNEES\workspace\mavenproject2
[DEBUG] (s) childDelegation = false
[DEBUG] (s) classesDirectory =
D:\DONNEES\workspace\mavenproject2\target\generated-classes\cobertura
[DEBUG] (s) disableXmlReport = false
[DEBUG] (s) enableAssertions = true
[DEBUG] (s) forkMode = once
[DEBUG] (s) groups = com.mycompany.mavenproject2.UnitTest
[DEBUG] (s) junitArtifactName = junit:junit
[DEBUG] (s) localRepository = id: local
{noformat}
For comp-tests :
{noformat}
[INFO] --- maven-surefire-plugin:2.12.2:test (comp-tests) @ mavenproject2 ---
[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test from plugin realm
ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.2,
parent: sun.misc.Launcher$AppClassLoader@93dee9]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test' with basic
configurator -->
[DEBUG] (s) basedir = D:\DONNEES\workspace\mavenproject2
[DEBUG] (s) childDelegation = false
[DEBUG] (s) classesDirectory =
D:\DONNEES\workspace\mavenproject2\target\generated-classes\cobertura
[DEBUG] (s) disableXmlReport = false
[DEBUG] (s) enableAssertions = true
[DEBUG] (s) forkMode = once
[DEBUG] (s) groups = com.mycompany.mavenproject2.UnitTest
[DEBUG] (s) junitArtifactName = junit:junit
[DEBUG] (s) localRepository = id: local
{noformat}
And so on.
With "mvn install", the debug output is different : the "groups" property only
appear for the non-default runs. And then the values are the right values.
Unit-tests :
{noformat}
[INFO] --- maven-surefire-plugin:2.12.2:test (unit-tests) @ mavenproject2 ---
[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test from plugin realm
ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.2,
parent: sun.misc.Launcher$AppClassLoader@93dee9]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test' with basic
configurator -->
[DEBUG] (s) basedir = D:\DONNEES\workspace\mavenproject2
[DEBUG] (s) childDelegation = false
[DEBUG] (s) classesDirectory =
D:\DONNEES\workspace\mavenproject2\target\classes
[DEBUG] (s) disableXmlReport = false
[DEBUG] (s) enableAssertions = true
[DEBUG] (s) forkMode = once
[DEBUG] (s) groups = com.mycompany.mavenproject2.UnitTest
[DEBUG] (s) junitArtifactName = junit:junit
[DEBUG] (s) localRepository = id: local
{noformat}
Comp-tests :
{noformat}
[INFO] --- maven-surefire-plugin:2.12.2:test (comp-tests) @ mavenproject2 ---
[DEBUG] Configuring mojo
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test from plugin realm
ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.2,
parent: sun.misc.Launcher$AppClassLoader@93dee9]
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test' with basic
configurator -->
[DEBUG] (s) basedir = D:\DONNEES\workspace\mavenproject2
[DEBUG] (s) childDelegation = false
[DEBUG] (s) classesDirectory =
D:\DONNEES\workspace\mavenproject2\target\classes
[DEBUG] (s) disableXmlReport = false
[DEBUG] (s) enableAssertions = true
[DEBUG] (s) forkMode = once
[DEBUG] (s) groups = com.mycompany.mavenproject2.ComponentTest
[DEBUG] (s) junitArtifactName = junit:junit
[DEBUG] (s) localRepository = id: local
{noformat}
And so on.
It really seems like something "mangles" the surefire properties, but only with
the surefire run triggered by the site plugin / cobertura. Where the problem
really lies, I have no idea...
But with my own project (sorry, can't show it now), the same problems happen;
and since the site plugin is configured the "legacy" way in my project, I can
run it with Maven 2 : then the mangling does not happen, and all test
executions proceed as expected, even with the site plugin.
> Problem with multiple executions of surefire within site plugin 3.0
> -------------------------------------------------------------------
>
> Key: MSITE-650
> URL: https://jira.codehaus.org/browse/MSITE-650
> Project: Maven 2.x and 3.x Site Plugin
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: Kristian Rosenvold
>
> There is a test project attached to SUREFIRE-905 that has a total of 4
> executions of surefire, with different configuration for each.
> When running "mvn clean install" inside this project, surefire gets executed
> 4 times as expected. When running "mvn site" only the first execution gets
> run, the last three get stopped by the configuration-checksum in surefire,
> indicating they get executed with the *same* configuration as the default
> execution. (Surefire creates a SHA1 hash of all the mojo parameters to avoid
> re-running the same configuration, which is why I conclude the three
> executions get the same configuration as the default config)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira