You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "olamy (via GitHub)" <gi...@apache.org> on 2023/06/13 10:31:49 UTC
[GitHub] [maven-build-cache-extension] olamy commented on pull request #58: Add METRO hash implementation, change the default, fix the web site
olamy commented on PR #58:
URL: https://github.com/apache/maven-build-cache-extension/pull/58#issuecomment-1589018110
> @olamy
>
> > maybe would be good to add a comment regarding usage of `*-MM` implementations which need some extra setup with jdk17+
> > In top directory create a file `.mvn/jvm.config` with a line `--add-opens java.base/sun.nio.ch=ALL-UNNAMED`
>
> Do you recall why you indicate some requirements on jdk17+ ? The tests seem to run fine without this flag, so I'm not sure it's actually required. On a side note, I just noticed the build is broken on jdk >= 20, not sure why... but that seems completely unrelated to this issue.
it's not requirement on jdk17. I'm just saying with 1.0.1 using `<hashAlgorithm>XXMM</hashAlgorithm>` and jdk 17 without this flag give me this error:
```
Exception in thread "main" java.lang.IllegalAccessError: class net.openhft.hashing.LongHashFunction (in unnamed module @0x3e3861d7) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x3e3861d7
at net.openhft.hashing.LongHashFunction.hashByteBuffer(LongHashFunction.java:536)
at net.openhft.hashing.LongHashFunction.hashBytes(LongHashFunction.java:530)
at org.apache.maven.buildcache.hash.XX$Checksum.digest(XX.java:83)
at org.apache.maven.buildcache.hash.HashChecksum.digest(HashChecksum.java:58)
```
```
olamy@pop-os:~/dev/sources/jetty/jetty.project$ mvn -v
Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: /home/olamy/.sdkman/candidates/maven/current
Java version: 17.0.7, vendor: Eclipse Adoptium, runtime: /home/olamy/.sdkman/candidates/java/17.0.7-tem
Default locale: en_AU, platform encoding: UTF-8
OS name: "linux", version: "6.2.6-76060206-generic", arch: "amd64", family: "unix"
```
I'm using https://github.com/eclipse/jetty.project.git branch `jetty-12.0.x-build-cache` just remove the last entry from `.mvn/jvm.config`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org