I have recently started working on MacOS, I installed Maven and when i checked out for it's Maven Home Path,I found out a strange path and I need to change this path.
When I run mvn -v command in terminal,i am get this output
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 15.0.1, vendor: N/A, runtime:
/usr/local/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
Kindly help me changing the Maven path to a different version that I desire.
binary home, using set o export and the path to maven root directory...
repository,
Related
I try to set the visual code settings for .csvode settings.json for wsl to the path where the wsl resides with the home folder. But I keep getting error that it does not point to a jdk. I have tried pointing to the local installation on windows as well as the place where the jdk resides on the wsl. None of which is working.
$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.8, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-18362-microsoft", arch: "amd64", family: "unix"
Tested and failed settings of the wsl settings:
{
"java.home": "C:\\Java\\java-11-openjdk-11.0.8.10"
}
and
{
"java.home": "/usr/lib/jvm/java-11-openjdk-amd64"
}
As well as variants where I add or remove slashes as well as bin folder.
Press Ctrl+Shift+P to open Command Platte and choose Java: Configure Java Runtime:
Turn to Java Tooling Runtime, JDK for Language Server will show all installed and eligible JDK for java extension, which is jdk11 or recent version. Choose the one that you've installed:
Then reload VS Code to make change effective.
I upgraded maven version. What I've done:
Downloaded new maven version
Updated PATH environment variable
In idea selected new maven version:
Inside cmd I see correct maven version:
mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files (x86)\apache\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin\..
Java version: 1.8.0_111, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: en_US, platform encoding: Cp1251
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Also I see correct version in Idea maven plugin:
But when I try to check maven version in the terminakl I see:
How could I acheve that Idea terminal sees new maven version ?
P.S.
shell config:
I download a new maven and execute using the full path, but still get the old version, and it doesn't help even I put it on PATH. It's very weird.
I run the maven as version of 3.3.9, but it still use the 3.2.5
-bash-4.1# /usr/hdp/2.3.2.0-2950/apache-maven-3.3.9/bin/mvn --version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/share/apache-maven
Java version: 1.7.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-573.7.1.el6.x86_64", arch: "amd64", family: "unix"
M2_HOME is set as the old maven home directory. Seems maven will pick up the MAVEN from this environment variable.
I'm trying to build something with maven, but keep getting the following error in intellij
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
So after searching the internet I found some ideas with the environment variables. But I checked with mvn -version and this is the response I get:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre
Default locale: nl_NL, platform encoding: UTF-8
OS name: "mac os x", version: "10.11", arch: "x86_64", family: "mac"
So I don't really know what I need to do extra to get this started?
If you are using IntelliJ, try to look at this post
You need to set the argument -Dmaven.multiModuleProjectDirectory=$M2_HOME to your JRE
SOLVED I solved the error by downgrading Maven to 3.0.5.
Original post:
I am quite new to Maven and want to use it with Android.
I try to go this tutorial, but I am stuck at step 4, I get this error.
Running mvn -version returns
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 18:22:22+0300)
Maven home: /opt/apache-maven-3.1.1
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"
There are quite few posts about it, and JIRA ticket for it, but I don't know how to fix as fast as possible.