MsgViewer icon indicating copy to clipboard operation
MsgViewer copied to clipboard

Errors by installing Maven with $ ./mvnw package

Open philippulus opened this issue 3 years ago • 13 comments

Dear community,

I had successfully installed MsgViewer on this same laptop before under Ubuntu 20.04. Now I have done a fresh install of Ubuntu 22.04.

Ran the following command lines successfully:

$ sudo apt install openjdk-11-jre-headless $ sudo apt install maven $ sudo apt install git $ git clone https://github.com/lolo101/MsgViewer.git $ cd MsgViewer

Java is correctly installed: $ java -version openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1) OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)

Now when running the Maven install: $ ./mvnw package I get error notifications:

[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.44 s - in at.redeye.FrameWork.base.UniqueDialogHelperTest [INFO] Running at.redeye.FrameWork.base.bindtypes.DBStringTest [INFO] Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 s - in at.redeye.FrameWork.base.bindtypes.DBStringTest [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] UniqueDialogHelperTest$WhenDialogAlreadyInvoked.:40 NoClassDefFound Could not initialize class at.redeye.FrameWork.base.BaseDialogDialog [ERROR] UniqueDialogHelperTest$WhenDialogAlreadyInvoked.:40 NoClassDefFound Could not initialize class at.redeye.FrameWork.base.BaseDialogDialog [ERROR] UniqueDialogHelperTest.should_return_dialog_instance:18 » UnsatisfiedLink Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so [INFO] [ERROR] Tests run: 66, Failures: 0, Errors: 3, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for parent 1.8.6-SNAPSHOT: [INFO] [INFO] parent ............................................. SUCCESS [ 0.147 s] [INFO] FrameWorkMinimized ................................. FAILURE [ 2.200 s] [INFO] msgparser .......................................... SKIPPED [INFO] MSGViewer .......................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.410 s [INFO] Finished at: 2022-06-19T09:43:58+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project FrameWorkMinimized: [ERROR] [ERROR] Please refer to /home/nicolas/MsgViewer/FrameWorkMinimized/target/surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [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/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :FrameWorkMinimized

The required file is not installed: $ cd MsgViewer/MSGViewer/target bash: MsgViewer/MSGViewer/target: No such file or directory Can anyone please help fixing these errors?

philippulus avatar Jun 19 '22 07:06 philippulus

Have installed Ubuntu 22.04 on a second machine and here again the .MsgViewer folder is not created following these commands:

$ sudo apt install openjdk-11-jre-headless $ sudo apt install maven $ sudo apt install git $ git clone https://github.com/lolo101/MsgViewer.git

Something broken here.

philippulus avatar Jun 21 '22 04:06 philippulus

@lolo101 please have a loot

philippulus avatar Jun 21 '22 04:06 philippulus

As a first guess, I would say the issue is caused by the JRE version you choose: "headless" means "without display" hence the AWT libs are missing whereas MsgViewer requires them.

Even though MsgViewer can be used through CLI it still requires a headed environment because the GUI still needs to be tested and built.

However, I happen to have a Ubuntu 22 laptop at hand so I'll conduct some additional tests

lolo101 avatar Jun 21 '22 07:06 lolo101

@lolo101

On the second machine I have installed the default java version, which is also version 11.

$ java --version openjdk 11.0.15 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1) OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)

philippulus avatar Jun 21 '22 19:06 philippulus

On the second machine do you have the same error message UnsatisfiedLink Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so?

I understood the issue is different because the git command doesn't even clone the project? Is there any error message?

lolo101 avatar Jun 22 '22 15:06 lolo101

Sorry I can't tell, the install is broken and the machine does not reboot.

philippulus avatar Jun 22 '22 16:06 philippulus

I had an issue with the legacy nVidia driver under Ubuntu 22.04 (got a black screen at reboot).. Have now reinstalled with the Nouveau driver and its stable now.

I have not yet installed any java version. Which one should I select? The default jre (version 11) is also a headless version as I saw during the previous install..

$ java --version Command 'java' not found, but can be installed with: sudo apt install default-jre # version 2:1.11-72build2, or sudo apt install openjdk-11-jre-headless # version 11.0.15+10-0ubuntu0.22.04.1 sudo apt install openjdk-17-jre-headless # version 17.0.3+7-0ubuntu0.22.04.1 sudo apt install openjdk-18-jre-headless # version 18~36ea-1 sudo apt install openjdk-8-jre-headless # version 8u312-b07-0ubuntu1

philippulus avatar Jun 23 '22 08:06 philippulus

I'm surprised you only have headless versions proposed. Maybe because the command runs in a terminal?

I would recommend openjdk-11-jdk or above

Could you check if that works for you? sudo apt install openjdk-11-jdk

lolo101 avatar Jun 23 '22 09:06 lolo101

With the following installation sequence:

$ sudo apt install openjdk-11-jdk $ sudo apt install maven $ sudo apt install git $ sudo git clone https://github.com/lolo101/MsgViewer.git $ cd MsgViewer $ ./mvnw package

At the end of the last description still receiving the following errors:

[INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for parent 1.8.6-SNAPSHOT: [INFO] [INFO] parent ............................................. SUCCESS [ 22.133 s] [INFO] FrameWorkMinimized ................................. FAILURE [ 59.050 s] [INFO] msgparser .......................................... SKIPPED [INFO] MSGViewer .......................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:21 min [INFO] Finished at: 2022-06-23T13:17:21+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project FrameWorkMinimized: Cannot create resource output directory: /var/lib/whoopsie/MsgViewer/FrameWorkMinimized/target/classes -> [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :FrameWorkMinimized nicolas@nicolas-Z97X-UD5H:/var/lib/whoopsie/MsgViewer$ cd MsgViewer/MSGViewer/target bash: cd: MsgViewer/MSGViewer/target: No such file or directory nicolas@nicolas-Z97X-UD5H:/var/lib/whoopsie/MsgViewer$

philippulus avatar Jun 23 '22 10:06 philippulus

Ok, you have a permission issue because you ran git clone as sudoer, hence the project directory belongs to root, then you run ./mvnx package as yourself so you don't have permission to create a new directory under the project directory, hence the message

Cannot create resource output directory

Could you start over from an empty directory and run git clone and all following commands as yourself? (no need to reinstall java, maven or git :wink: )

lolo101 avatar Jun 23 '22 14:06 lolo101

Brilliant, thank you Löic. I redid the command lines in bold fonts starting with the git command.

$ sudo apt install openjdk-11-jdk $ sudo apt install maven $ sudo apt install git $ git clone https://github.com/lolo101/MsgViewer.git $ cd MsgViewer $ ./mvnw package

unknown_002

Any idea how I can purge the root installation? What about making this msg viewer into a real app?

Cheers

philippulus avatar Jun 24 '22 07:06 philippulus

Nice to hear that :)

You can remove the root installation simply by removing the directory (sudo rm -rf <project directory owned by root>)

There is already an issue to create system-dependent installers and an OSX packager (that I don't maintain though). By "real app" do you mean something that could be installed through a package manager like "apt" or "rpm"?

lolo101 avatar Jun 24 '22 12:06 lolo101

The one issue I am encountering is that it is terminal dependent. After opening the interface, I mostly close the terminal inadvertently, then MsgViewer also closes. At least it would be nice to have an interface that remains open when closing the terminal.

In addition, I just reopened it and now I got this notification: $ cd MsgViewer/MSGViewer/target $ java -jar msgviewer.jar WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. Gtk-Message: 16:25:09.804: Failed to load module "canberra-gtk-module"

philippulus avatar Jun 24 '22 13:06 philippulus

Now facing again an installation issue:

$ ./mvnw package -e Warning: JAVA_HOME environment variable is not set. [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [pom] [INFO] FrameWorkMinimized [jar] [INFO] msgparser [jar] [INFO] MSGViewer [jar] [INFO] [INFO] ------------------< net.sourceforge.msgviewer:parent >------------------ [INFO] Building parent 1.9.0-SNAPSHOT [1/4] [INFO] from pom.xml [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- jacoco:0.8.11:prepare-agent (coverage) @ parent --- [INFO] argLine set to -javaagent:/home/minisforum-um790pro-nicolas/.m2/repository/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar=destfile=/home/minisforum-um790pro-nicolas/MsgViewer/MsgViewer/target/jacoco.exec [INFO] [INFO] --------------------< at.redeye:FrameWorkMinimized >-------------------- [INFO] Building FrameWorkMinimized 1.9.0-SNAPSHOT [2/4] [INFO] from FrameWorkMinimized/pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- jacoco:0.8.11:prepare-agent (coverage) @ FrameWorkMinimized --- [INFO] argLine set to -javaagent:/home/minisforum-um790pro-nicolas/.m2/repository/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar=destfile=/home/minisforum-um790pro-nicolas/MsgViewer/MsgViewer/FrameWorkMinimized/target/jacoco.exec [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ FrameWorkMinimized --- [INFO] Copying 67 resources from src/main/resources to target/classes [INFO] [INFO] --- compiler:3.11.0:compile (default-compile) @ FrameWorkMinimized --- [INFO] Changes detected - recompiling the module! :source [INFO] Compiling 74 source files with javac [debug target 17 module-path] to target/classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for parent 1.9.0-SNAPSHOT: [INFO] [INFO] parent ............................................. SUCCESS [ 0.135 s] [INFO] FrameWorkMinimized ................................. FAILURE [ 0.305 s] [INFO] msgparser .......................................... SKIPPED [INFO] MSGViewer .......................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.509 s [INFO] Finished at: 2024-05-03T09:49:16+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project FrameWorkMinimized: Fatal error compiling: error: invalid target release: 17 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project FrameWorkMinimized: Fatal error compiling at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1143) at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) Caused by: org.codehaus.plexus.compiler.CompilerException: error: invalid target release: 17 at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:198) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:183) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1140) at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) Caused by: java.lang.IllegalArgumentException: error: invalid target release: 17 at com.sun.tools.javac.main.Arguments.error (Arguments.java:907) at com.sun.tools.javac.main.Arguments.doProcessArgs (Arguments.java:383) at com.sun.tools.javac.main.Arguments.processArgs (Arguments.java:347) at com.sun.tools.javac.main.Arguments.init (Arguments.java:246) at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:185) at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:119) at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:68) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:135) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:183) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1140) at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) [ERROR] [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command

Any idea what the problem is?

philippulus avatar May 03 '24 07:05 philippulus

Hi @philippulus !

Yes, I believe the issue is caused by the version of the JDK you are using. MsgViewer moved to Java 17 after release 1.8.8 If you are building the sources after the tag msgviewer-1.8.8 then you need a JDK 17 (or more)

lolo101 avatar May 03 '24 09:05 lolo101

Thank you Loïc.
I uninstall jdk 11, removed installed java versions and installed jdk 22 instead. Had to purge any previous maven and git install and delete manually all MsgViewer folders and subfolders after deleting their content before reinstalling. Worked well.

$ sudo apt install openjdk-22-jdk $ sudo apt install maven $ sudo apt install git $ git clone https://github.com/lolo101/MsgViewer.git $ cd MsgViewer $ ./mvnw package

philippulus avatar May 19 '24 13:05 philippulus

Wow I don't think all of this was necessary but anyway, the problem is solved and that's what matters :wink:

lolo101 avatar May 19 '24 19:05 lolo101

Wow I don't think all of this was necessary but anyway, the problem is solved and that's what matters 😉

Yes it was, as I had Maven installation errors referring to the MsgViewer folder not being empty. It's necessary to clean the system from previous installs for a fresh install to proceed correctly.

philippulus avatar May 20 '24 07:05 philippulus