Am 2019-07-07 um 12:13 schrieb Graham Leggett:
On 06 Jul 2019, at 15:02, Graham Leggett <minf...@sharp.fm> wrote:
I am at a loss as to why - after both tests above, pass and fail, there is no
file anywhere called target/it/effective-site/effective-site.xml.
The test itself seems straightforward. Create a file called
effective-site.xml...
[minfrin@gatekeeper maven-site-plugin-3.8.1]$ cat
src/it/projects/effective-site/invoker.properties
[snip]
invoker.goals = clean site:effective-site
invoker.mavenOpts = -Doutput=effective-site.xml
…and test effective-site.xml exists:
[minfrin@gatekeeper maven-site-plugin-3.8.1]$ cat
src/it/projects/effective-site/verify.groovy
[snip]
assert new File( basedir, 'effective-site.xml' ).exists();
Looking at target/it/effective-site/build.log in the failure case, the
effective site is written to the build.log, and not the -Doutput= like it
should have been.
Not sure what could cause this, something overriding invoker.mavenOpts?
I think this could be caused by different versions of maven plugins being run
in the two different scenarios. When I ran “invoker:run” directly for the first
time, a different version of the failsafe plugin was downloaded as opposed to
when the invoker plugin triggered the tests :
[minfrin@gatekeeper maven-site-plugin-3.8.1]$ mvn invoker:run
-Dinvoker.test=effective-site
[INFO] Scanning for projects...
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.jar
(34 kB at 20 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.jar
(241 kB at 262 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-docck-plugin/1.1/maven-docck-plugin-1.1.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-docck-plugin/1.1/maven-docck-plugin-1.1.jar
(34 kB at 74 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ear-plugin/3.0.1/maven-ear-plugin-3.0.1.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ear-plugin/3.0.1/maven-ear-plugin-3.0.1.pom
(11 kB at 30 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ear-plugin/3.0.1/maven-ear-plugin-3.0.1.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ear-plugin/3.0.1/maven-ear-plugin-3.0.1.jar
(88 kB at 230 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/2.22.0/maven-failsafe-plugin-2.22.0.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/2.22.0/maven-failsafe-plugin-2.22.0.pom
(12 kB at 32 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/2.22.0/maven-failsafe-plugin-2.22.0.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/2.22.0/maven-failsafe-plugin-2.22.0.jar
(294 kB at 370 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/1.6/maven-gpg-plugin-1.6.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/1.6/maven-gpg-plugin-1.6.jar
(47 kB at 127 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.pom
(9.5 kB at 26 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.jar
(64 kB at 164 kB/s)
[INFO]
[INFO] -------------< org.apache.maven.plugins:maven-site-plugin >-------------
[INFO] Building Apache Maven Site Plugin 3.8.1
I think the maven-site-plugin should probably decide what versions of failsafe
and surefire that it wants to run. The invoker plugin instantiates a whole new
maven, so I suspect each test needs to decide that versions of failsafe to run
too.
I, too, now see this on the ASF Jenkins instance.
Can you file an issue and add your finding please? I don't want your
effort to be lost in the archives. Someone needs to start digging to
find the mismatch. So the IT itself is fine, but the environment is
unreliable.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org