trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
312 stars 123 forks source link

coveralls-maven-plugin fails on Java 9 #112

Closed brettwooldridge closed 4 years ago

brettwooldridge commented 7 years ago

Build fails with the following error running under Java 9, probably something to do with their new package restrictions:

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report
 (default-cli) on project HikariCP: Execution default-cli of goal org.eluder.coveralls:coveralls-maven-
plugin:4.3.0:report failed: A required class was missing while executing 
org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report: javax/xml/bind/DatatypeConverter
trautonen commented 7 years ago

http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-May/004309.html

Probably need to use some alternative way to create hex output from bytes so it won't break with Java 9. There are many ways to do it: http://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java

sesuncedu commented 7 years ago

Trade you for a quick 4.3.1?

Apache Commons Codec has a utility method Hex::encodeHexString

public static String encodeHexString(byte[] data) Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned String will be double the length of the passed array, as it takes two characters to represent any given byte.

Also DigestUtils::md5Hex will generate a hex encoded MD5 hash from a String.

sesuncedu commented 7 years ago

PR submitted. I included a transfer of ownership of any intellectual property rights JIK.

PascalSchumacher commented 7 years ago

A new release with a fix for this issue would be most welcome.

lucasdavid commented 6 years ago

I'm not sure if it's a bad idea or not, but adding the following dependency to the coveralls-maven-plugin solved this issue for me:


<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.2.3</version>
</dependency>
Stephan202 commented 6 years ago

@lucasdavid's suggestion works; can confirm it also works with the latest jaxb-api release, version 2.3.0.

@trautonen, any update on when a fix for this issue makes its way into an official coveralls-maven-plugin release? If you're uncomfortable with the change in #118, perhaps adding/upgrading the above dependency will do?

sjoerdtalsma commented 6 years ago

@trautonen, any update on when a fix for this issue makes its way into an official coveralls-maven-plugin release? If you're uncomfortable with the change in #118, perhaps adding/upgrading the above dependency will do?

:+1: This issue is over a year old and still hurting people (e.g. umldoclet build 333)

vladak commented 5 years ago

Looks like one man show/project does not work well. This has basically blocked transition of our project to JDK 9+ (oracle/opengrok#2513). Maybe some of the https://github.com/coveralls folks can adapt this plugin ? ping @anjin / @nickmerwin (tried to submit feedback on Coveralls zendesk to no avail)

Pr0methean commented 5 years ago

This doesn't seem to affect Travis-CI, but is blocking my migration from Travis to Azure Pipelines.