Hi Gilles,

On Thu, 11 Jul 2024 at 13:30, Gilles Sadowski <gillese...@gmail.com> wrote:

>
> [In the cloned directory.]
> Default maven goal succeeds.
>
> >
> > mvn site
>
> The above goal fails:
> ---CUT---
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary for Apache Commons RNG 1.6:
> [INFO]
> [INFO] Apache Commons RNG ................................. SUCCESS [
> 12.508 s]
> [INFO] Apache Commons RNG Client API ...................... SUCCESS [
> 10.496 s]
> [INFO] Apache Commons RNG Core ............................ FAILURE [
> 35.818 s]
> [INFO] Apache Commons RNG Simple .......................... SKIPPED
> [INFO] Apache Commons RNG Sampling ........................ SKIPPED
> [INFO] Apache Commons RNG (Bill of Materials) ............. SKIPPED
> [INFO] Apache Commons RNG Documentation ................... SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time:  59.002 s
> [INFO] Finished at: 2024-07-11T14:24:58+02:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site)
> on project commons-rng-core: Error generating
> revapi-maven-plugin:0.15.0:report report: Failed to generate report.
> Failed to analyze archives in api
> API[archives=[org.apache.commons:commons-rng-core:jar:1.6],
> supplementary=[org.apache.commons:commons-rng-client-api:jar:1.6]]:
> Failed to copy class path element:
> org.apache.commons:commons-rng-client-api:jar:1.6 to
>
> /tmp/revapi-java11800467850945715013/lib/1-edd7d0b3-5c80-36e0-841b-e47ce34fb194:
>
> /home/gilles/gilles/devel/java/apache/release_check/commons-rng-1.6-RC2/commons-rng-client-api/target/classes
> (Is a directory) -> [Help 1]
> ---CUT---
>
>
I see the same behaviour:

mvn -DskipTests      # OK
mvn -DskipTests site       # Fails on the core module
mvn -DskipTests package site      # OK

# Using install:
mvn clean
mvn -DskipTests install
mvn -DskipTests site       # Still fails on the core module (there is a jar
in target)
mvn clean
mvn -DskipTests site       # Fails on the client-api module
mvn -DskipTests -Drevapi.skip site       # Fails on japicmp on the
client-api module

# Ignore revapi but ensure the target folder has a jar file
mvn -DskipTests
mvn -DskipTests -Drevapi.skip site       # OK

The binary compatibility plugins try to compare the jar files. If you do
not use the package goal then the revapi plugin does not appear to work
with pre-existing jar files from a previous build after the first module.
However japicmp can use previously built jar files (it doesn't fail the
build).

If the target dir does not contain a jar file then japicmp also fails (i.e.
it does not use locally installed jar files from the m2 repo).

So here japicmp does require a local jar file, but revapi does not work
with a local jar file after the first module. So this is a bug in revapi
when creating the site after a previous run to create the package.

Alex

Reply via email to