On 04 Jul 2019, at 22:04, Michael Osipov <micha...@apache.org> wrote:

>> One test failed, however this test also fails in maven-site-plugin v3.7.1, 
>> so this is not a regression:
>> [INFO] Building: effective-site/pom.xml
>> [INFO] run post-build script verify.groovy
>> [INFO]           effective-site/pom.xml ........................... FAILED 
>> (6.0 s)
>> [INFO]   The post-build script did not succeed. assert new File( basedir, 
>> 'effective-site.xml' ).exists()
>>        |         |                               |
>>        |         |                               false
>>        |         
>> /home/gatekeeper/minfrin/src/apache/sandbox/maven/maven-site-plugin-maven-site-plugin-3.7.1/target/it/effective-site
>>        
>> /home/gatekeeper/minfrin/src/apache/sandbox/maven/maven-site-plugin-maven-site-plugin-3.7.1/target/it/effective-site/effective-site.xml
> 
> Can you share why this one fails for you, but not for me on three different 
> operating systems? I'd like to fix this.

This has made my head bleed.

Run the test on its own, and the test passes:

[minfrin@gatekeeper maven-site-plugin-3.8.1]$ mvn invoker:run 
-Dinvoker.test=projects/effective-site*
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------< org.apache.maven.plugins:maven-site-plugin >-------------
[INFO] Building Apache Maven Site Plugin 3.8.1
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO] 
[INFO] --- maven-invoker-plugin:3.1.0:run (default-cli) @ maven-site-plugin ---
[INFO] Building: projects/effective-site/pom.xml
[INFO]           projects/effective-site/pom.xml .................. SUCCESS 
(5.5 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 1, Failed: 0, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.349 s
[INFO] Finished at: 2019-07-06T14:37:27+02:00
[INFO] ------------------------------------------------------------------------

Run the whole test suite, and this test fails:

[minfrin@gatekeeper maven-site-plugin-3.8.1]$ mvn install -P run-its
[snip]
[INFO] Building: effective-site/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           effective-site/pom.xml ........................... FAILED (4.8 
s)
[INFO]   The post-build script did not succeed. assert new File( basedir, 
'effective-site.xml' ).exists()
       |         |                               |
       |         |                               false
       |         
/home/gatekeeper/minfrin/src/apache/sandbox/maven/maven-site-plugin-3.8.1/target/it/effective-site
       
/home/gatekeeper/minfrin/src/apache/sandbox/maven/maven-site-plugin-3.8.1/target/it/effective-site/effective-site.xml

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?

Regards,
Graham
—

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to