elasticpath / mvnmin

Builds only changed maven modules, speeding up your multi-module maven project builds.
Apache License 2.0
44 stars 0 forks source link

mvnmin does not work with M1 processor #21

Closed wbsouza closed 1 year ago

wbsouza commented 2 years ago

mvnmin clean install -DskipAllTests -Dpmd.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.elasticpath.tools.mavenminimal.MvnMinCli.getProjectsFromStdin(MvnMinCli.java:258)
    at com.elasticpath.tools.mavenminimal.MvnMinCli.determineRequestedModules(MvnMinCli.java:124)
    at com.elasticpath.tools.mavenminimal.MvnMinCli.run(MvnMinCli.java:96)
    at com.elasticpath.tools.mavenminimal.MvnMinCli.main(MvnMinCli.java:69)
Caused by: java.lang.RuntimeException: Unable to load jansi native library
    at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:62)
    at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:30)
    ... 4 more
Caused by: java.lang.Exception: No native library found for os.name=Mac, os.arch=aarch64, paths=[/Users/wellington.souza/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
    at org.fusesource.jansi.internal.JansiLoader.loadJansiNativeLibrary(JansiLoader.java:333)
    at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:60)
    ... 5 more```
gdenning commented 2 years ago

Appears to be related to https://github.com/fusesource/jansi/issues/207

SamuelCook commented 2 years ago

+1. Dead in the water here without a fix or workaround.

ivanjensen-ep commented 2 years ago

I've issued https://github.com/elasticpath/mvnmin/pull/22 to address this. I don't have an M1 to test on, but this seems like a good change, regardless. I'll commit and roll a release soon.

ivanjensen-ep commented 2 years ago

I have released 1.0.2, including the accompanying homebrew formula

I have been unable to properly test. I'm being forced to update xcode. Which is forcing me to upgrade macos 🤦 😴 .

Meanwhile, if you're using homebrew upgrading should work (if that's how you're consuming):

brew upgrade mvnmin

Feedback appreciated!

SamuelCook commented 2 years ago

Confirmed working on an M1 here. Thank you for the fix!