Error on mvn clean package

I’ve recently forked the repo, cloned it, and ran mvn clean package inside the VSCode terminal, and I am getting this error. I saw a post here with an identical problem but it did not seem resolved (?) I am new to this so pardon.
If it matters my Java version is 1.8.0_401 and Maven version is 3.9.6.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for LanguageTool 6.4-SNAPSHOT:
[INFO]
[INFO] LanguageTool ....................................... SUCCESS [  0.287 s]
[INFO] LanguageTool Style and Grammar Checker Core ........ FAILURE [ 30.160 s]
[INFO] English module for LanguageTool .................... SKIPPED
[INFO] Persian module for LanguageTool .................... SKIPPED
[INFO] Arabic module for LanguageTool ..................... SKIPPED
[INFO] French module for LanguageTool ..................... SKIPPED
[INFO] German module for LanguageTool ..................... SKIPPED
[INFO] Polish module for LanguageTool ..................... SKIPPED
[INFO] Catalan module for LanguageTool .................... SKIPPED
[INFO] Italian module for LanguageTool .................... SKIPPED
[INFO] Breton module for LanguageTool ..................... SKIPPED
[INFO] Dutch module for LanguageTool ...................... SKIPPED
[INFO] Portuguese module for LanguageTool ................. SKIPPED
[INFO] Russian module for LanguageTool .................... SKIPPED
[INFO] Asturian module for LanguageTool ................... SKIPPED
[INFO] Belarusian module for LanguageTool ................. SKIPPED
[INFO] Chinese module for LanguageTool .................... SKIPPED
[INFO] Danish module for LanguageTool ..................... SKIPPED
[INFO] Esperanto module for LanguageTool .................. SKIPPED
[INFO] Galician module for LanguageTool ................... SKIPPED
[INFO] Greek module for LanguageTool ...................... SKIPPED
[INFO] Icelandic module for LanguageTool .................. SKIPPED
[INFO] Japanese module for LanguageTool ................... SKIPPED
[INFO] Khmer module for LanguageTool ...................... SKIPPED
[INFO] Lithuanian module for LanguageTool ................. SKIPPED
[INFO] Malayalam module for LanguageTool .................. SKIPPED
[INFO] Romanian module for LanguageTool ................... SKIPPED
[INFO] Slovak module for LanguageTool ..................... SKIPPED
[INFO] Slovenian module for LanguageTool .................. SKIPPED
[INFO] Spanish module for LanguageTool .................... SKIPPED
[INFO] Swedish module for LanguageTool .................... SKIPPED
[INFO] Tamil module for LanguageTool ...................... SKIPPED
[INFO] Tagalog module for LanguageTool .................... SKIPPED
[INFO] Ukrainian module for LanguageTool .................. SKIPPED
[INFO] LanguageTool module for Crimean Tatar .............. SKIPPED
[INFO] Simple German module for LanguageTool .............. SKIPPED
[INFO] Irish module for LanguageTool ...................... SKIPPED
[INFO] All language modules for LanguageTool .............. SKIPPED
[INFO] LanguageTool common GUI classes .................... SKIPPED
[INFO] LanguageTool command-line version .................. SKIPPED
[INFO] LanguageTool embedded HTTP server .................. SKIPPED
[INFO] LanguageTool tools for building dictionaries ....... SKIPPED
[INFO] LanguageTool stand-alone GUI ....................... SKIPPED
[INFO] LanguageTool HTTP API client ....................... SKIPPED
[INFO] LanguageTool LibreOffice/OpenOffice extension ...... SKIPPED
[INFO] LanguageTool Wikipedia tools ....................... SKIPPED
[INFO] LanguageTool development tools ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  31.147 s
[INFO] Finished at: 2024-02-09T13:06:43-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project languagetool-core: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar failed: Unable to load the mojo 'jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-jar-plugin:2.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/plugins/maven-jar-plugin/2.6/maven-jar-plugin-2.6.jar[ERROR] urls[1] = file:/C:/Users/dongt/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[2] = file:/C:/Users/dongt/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[3] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[4] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar      
[ERROR] urls[5] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar[ERROR] urls[6] = file:/C:/Users/dongt/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[7] = file:/C:/Users/dongt/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
[ERROR] urls[8] = file:/C:/Users/dongt/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[9] = file:/C:/Users/dongt/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[10] = file:/C:/Users/dongt/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/C:/Users/dongt/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/C:/Users/dongt/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[13] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/maven-archiver/2.6/maven-archiver-2.6.jar
[ERROR] urls[14] = file:/C:/Users/dongt/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.7/maven-shared-utils-0.7.jar
[ERROR] urls[15] = file:/C:/Users/dongt/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[16] = file:/C:/Users/dongt/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar      
[ERROR] urls[17] = file:/C:/Users/dongt/.m2/repository/org/codehaus/plexus/plexus-archiver/2.9/plexus-archiver-2.9.jar      
[ERROR] urls[18] = file:/C:/Users/dongt/.m2/repository/org/codehaus/plexus/plexus-io/2.4/plexus-io-2.4.jar
[ERROR] urls[19] = file:/C:/Users/dongt/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[20] = file:/C:/Users/dongt/.m2/repository/org/apache/commons/commons-compress/1.9/commons-compress-1.9.jar     
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>org.languagetool:languagetool-core:6.4-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : ExceptionInInitializerError: Index 1 out of bounds for length 1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :languagetool-core

Could you post the full output? The reason for the error is probably somewhere earlier in the output.

Sure. I paste it here: D:\repos\languagetool>mvn clean package[INFO] Scanning for projects...[INFO] - Pastebin.com

Unfortunately, I can’t help here. It might be Windows-specific. Does it also happen in a different kind of terminal?

Yes, when I try cmd it also gives the same output. Thank you for taking a look at this regardless.

I could find this Build issue Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver · Issue #72 · Nilhcem/FakeSMTP · GitHub but it was on an older version of the plugin and version update (to 3.1.0) fixed it.
I can only suggest to try newer JDK, e.g. 17 and see if that helps.