Unable to build Maven site with Java 8

Description

With Java 8, 'mvn site' fails, probably because of Cobertura being out-of-date.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project java-support: failed to get report for org.codehaus.mojo:cobertura-maven-plugin: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project java-support: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] An error occurred while instantiating class net.shibboleth.utilities.java.support.collection.CollectionTest: Expecting a stackmap frame at branch target 62
[ERROR] Exception Details:
[ERROR] Location:
[ERROR] net/shibboleth/utilities/java/support/logic/TransformAndCheckFunction.equals(Ljava/lang/Object;)Z @23: ifnonnull
[ERROR] Reason:
[ERROR] Expected stackmap frame at this location.
[ERROR] Bytecode:
[ERROR] 0x0000000: 033d 11ff ff3e 121d 1100 53b8 0023 2b11

My preference is to banish the site plugin, much like the maven-release-plugin.

Environment

None

Activity

Show:

Tom Zeller June 1, 2016 at 5:20 PM

Resolving as completed, we can build the Maven site with Java 8 now, minus the Cobertura report.

Tom Zeller June 1, 2016 at 5:19 PM

Reopening.

Cobertura-maven-plugin 2.6+ seems to change the target artifact during instrumentation, so staying with 2.5.2. Because 2.5.2 throws errors with Java 8, the Cobertura report has been moved to a Java-7-only profile in the parent-v3 POM.

Tom Zeller May 3, 2016 at 11:14 PM

Updating Cobertura to 2.7 seems to work now for both Java 7 and 8.

Tom Zeller April 26, 2016 at 12:11 AM

Turns out I inadvertently broke the generation of the Maven site using Java 8 when I disabled doclint by configuring the Javadoc reportPlugin only [1], a mechanism which turns out is deprecated/private [2].

Looks like

<profile> <id>disable-javadoc-doclint</id> <activation> <jdk>[1.8,)</jdk> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <additionalparam>-Xdoclint:none</additionalparam> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <configuration> <reportPlugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <additionalparam>-Xdoclint:none</additionalparam> </configuration> </plugin> </reportPlugins> </configuration> </plugin> </plugins> </build> </profile>

should be replaced with

<profile> <id>disable-javadoc-doclint</id> <activation> <jdk>[1.8,)</jdk> </activation> <properties> <additionalparam>-Xdoclint:none</additionalparam> </properties> </profile>

[1] https://git.shibboleth.net/view/?p=java-parent-project-v3.git;a=commitdiff;h=49be3da18dc207a5f93eb7a41ffdc86a628b4420

[2] https://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats

Completed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Created October 28, 2015 at 7:40 PM
Updated November 9, 2016 at 6:17 PM
Resolved June 1, 2016 at 5:20 PM