Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --release flag for correct cross-compilation #19

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Use --release flag for correct cross-compilation #19

merged 1 commit into from
Jan 17, 2020

Conversation

pascalgn
Copy link
Contributor

When using this plugin with Java 8 and setting -Dexists.cmpChecksum=true, the Maven process exists with the error

Caused by: org.apache.maven.plugin.PluginContainerException: An API incompatibility was encountered while executing org.honton.chas:exists-maven-plugin:0.1.0:remote: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
[...]
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
    at org.honton.chas.exists.CheckSum.readStream (CheckSum.java:48)
    at org.honton.chas.exists.CheckSum.getChecksumBytes (CheckSum.java:30)
    at org.honton.chas.exists.CheckSum.getChecksum (CheckSum.java:37)

The cause is the same as in e.g. plasma-umass/doppio#497

The fix is to use the --release flag, as explained in e.g. https://stackoverflow.com/questions/43102787/what-is-the-release-flag-in-the-java-9-compiler

As --release is only available from Java 9 on, I had to put the property in a profile

@pascalgn pascalgn requested a review from chonton January 16, 2020 06:55
Copy link
Owner

@chonton chonton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have another regression to fix before next release.

@chonton chonton merged commit 60d0b77 into chonton:master Jan 17, 2020
@pascalgn
Copy link
Contributor Author

@chonton Any plans to release this soon? 🙏

@chonton
Copy link
Owner

chonton commented Feb 12, 2020

Yes, this was released in mid January. My apologies for not tagging this repository

@pascalgn
Copy link
Contributor Author

Ah, perfect! Thanks a lot, everything works fine now! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants