java icon indicating copy to clipboard operation
java copied to clipboard

Unable to build the project using 'mvn install ' command

Open ManojLL opened this issue 1 year ago • 4 comments
trafficstars

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86_64): Ubuntu 22.04
  • Java version (i.e., the output of java -version): JDK 11
  • Installed from Maven Central?: yes

Describe the problem

I hit the command mvn install to build project. then I get an error as below.

image

ManojLL avatar Jan 04 '24 17:01 ManojLL

What's your $JAVA_HOME set to?

Craigacp avatar Jan 04 '24 18:01 Craigacp

@Craigacp I use JENV to manage multiplue java version in my machine. So my $JAVA_HOME is set as /home/manoj/.jenv/versions/1.8.0.202

ManojLL avatar Jan 09 '24 08:01 ManojLL

Maven pulls java from JAVA_HOME not the java it finds on your path, so it's using Java 8 to compile it and our minimum is 11. If you set your java home to 11 it should be fine.

Craigacp avatar Jan 09 '24 13:01 Craigacp

To do a full maven install locally without error, also add this parameter:

mvn install -Djavacpp.platform.host

karllessard avatar Jan 09 '24 22:01 karllessard