Back to LanguageTool Homepage - Privacy - Imprint

Mvn clean package fails

I looked through the other topics but apparently they got further than I did.

I’m seeing the following errors when running mvn clean package on the project root folder after making all the required steps to add a new language:

[ERROR] Project 'org.languagetool:language-en:5.1-SNAPSHOT' is duplicated in the reactor @
[ERROR] Project 'org.languagetool:language-en:5.1-SNAPSHOT' is duplicated in the reactor -> [Help 1]

Running with -X for debug:

Exception in thread "main" java.lang.InternalError: a fault occurred in an unsafe memory access operation
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(
	at java.base/
	at java.base/
	at java.base/$
	at java.base/$
	at java.base/
	at java.base/
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(
	at org.eclipse.sisu.plexus.PlexusAnnotatedBeanModule.<init>(
	at org.codehaus.plexus.DefaultPlexusContainer.<init>(
	at org.apache.maven.cli.MavenCli.container(
	at org.apache.maven.cli.MavenCli.doMain(
	at org.apache.maven.cli.MavenCli.main(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(

I don’t have maven installed on my machine, I’m running it through docker, it didn’t fail on the first mvn command at the beginning of the guide.

Thank you!

Is your code available in a public repo to look at?

Yes @dnaber ! Sorry for the late response:

Thank you!

You need to change <artifactId>language-en</artifactId> in he/pom.xml to <artifactId>language-he</artifactId> (and adapt the <name>, too).

I’m now running into a new error (git updated, I accidentally included the error files).

These are the errors:


Have you tried several times, does it always happen? If so, could you try with JDK 8?

Yup, several time, since I don’t want to deal with Java and Maven installation I used docker from here:

First latest (openjdk-14 which didn’t work) and then 3-jdk-8 (still doesn’t work) which is maven 3.6.3 and openjdk 8.

And an error log! Don’t you just love them? :slight_smile:

I suggest you try it outside of Docker. As the JVM crashes, this seems to be a rather low-level issue (not enough memory or so).

It was docker related but the problem was with the /tmp folder, I mapped it and used it for compilation, I switched to /opt and now it works:

I’m currently struggling with the build, is there a way to build and test Hebrew only? It can really save me some time.

Use: ./ he test

1 Like

Yet again…

[ERROR] /opt/languagetool-language-modules/he/src/main/java/org/languagetool/[77,10] invalid method declaration; return type required

My repo was updated.

I’m not sure I did the right thing with changing AmericanEnglish and AMERICAN_ENGLISH to some native terms but I had to change it otherwise it won’t compile anyway, I guess this replacement is wrong and I’m not sure what to do with it.

You use many English-specific imports, but the languages are independent in LT. So, he will not have access to any English class. You should clean up first, getting rid of all English-specific stuff. Many methods like createDefaultDisambiguator() have default implementation and you don’t need them to get started.

I’ll do my best, is there any guide for that?
Can I simply remove the imports or should I also remove the relevant parts of the code?

I’ve created a pull request at that provides a very simple without any advanced features like tagging and chunking.

1 Like

Awesome!!! The build succeeded, what’s next?

I’m guessing that adding rules is not the first step.

BTW Is there any way we can use the rule editor or text analyzer to get our community more comfortable with adding rules?

Adding rules is the next step. Once there’s a process in place for that, one would probably want to have a spell checker, I guess?

As long as you don’t have a part-of-speech tagger anyway, you can maybe just use online tools with a different language, but write rules for Hebrew anyway.

1 Like