Issues building on OSX

I am using openjdk8 to build languagetool

mvn clean test didn’t seem to result in anything concerning

./build.sh languagetool-server package -DskipTests also runs through fine

But when I try to run the resulting jar I get a Unresolved compliation problem error:

java -noverify -cp languagetool-server-5.8-SNAPSHOT.jar org.languagetool.server.HTTPServer --public --allow-origin "*"
Exception in thread "main" java.lang.Error: Unresolved compilation problem:

	at org.languagetool.server.Server.usageRequested(Server.java:118)
	at org.languagetool.server.HTTPServer.main(HTTPServer.java:163)

Any advice?

Note: I am on a ARM mac.

PS: My actual goal is to add sentry.io to LanguageTool.

That’s indeed strange. Does that also happen without -noverify and with our builds (Index of /snapshots/)?

removing noverify doesn’t change the result. official snapshots run fine.

Maybe try building with Java 8. While using a recent Java should work for running LT, the official builds still use Java 8.

ah forgot to mention that I am already using java8.

do you know if anyone managed to build successfully on an apple silicon machine?

No, and I’m also not aware of any case where it failed the way it does for you.

I am not trying to just build it on Linux from source.

mvn clean test
./build.sh languagetool-server package -DskipTests
mv languagetool-server/target/languagetool-server-5.8-SNAPSHOT.jar languagetool-server.jar
java -cp languagetool-server.jar org.languagetool.server.HTTPServer --port "$PORT" --allow-origin "*"

But now I am seeing

[WARNING] 
    [WARNING] Some problems were encountered while building the effective model for org.languagetool:languagetool-core:jar:5.8-SNAPSHOT
    [WARNING] 'version' contains an expression but should be a constant. @ org.languagetool:languagetool-parent:${revision}, /app/pom.xml, line 9, column 14
    [WARNING] 
    [WARNING] Some problems were encountered while building the effective model for org.languagetool:languagetool-parent:pom:5.8-SNAPSHOT
    [WARNING] 'version' contains an expression but should be a constant. @ org.languagetool:languagetool-parent:${revision}, /app/pom.xml, line 9, column 14
    [WARNING] 
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING] 
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING] 
    W: Jun 15, 2022 8:54:41 AM org.sonatype.guice.bean.reflect.Logs$JULSink warn
    W: WARNING: Error injecting: kr.motd.maven.os.DetectExtension
    W: com.google.inject.ConfigurationException: Guice configuration errors:
    W: 
    W: 1) Could not find a suitable constructor in kr.motd.maven.os.DetectExtension. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
    W:   at kr.motd.maven.os.DetectExtension.class(DetectExtension.java:74)
    W:   while locating kr.motd.maven.os.DetectExtension

Which version of Maven do you use? I don’t see these warnings with Maven 3.6.3. Does the build work anyway, i.e. are these just warnings?