Java home: C:\Program Files\Java\jdk1.6. Java version: 1.6.0_25, vendor: Sun Microsystems Inc. Maven home: D:\Softwares\apache-maven-3.1.0 Otherwise verify the above steps if you have given the correct path for all the variables.
If this results in the version details of the maven package, then it is installed properly. Click to see full answer In this regard, where is Maven installed on Windows To install Apache Maven on Windows, you just need to download the Mavens zip file, unzip it to a folder, and configure the Windows environment variables. This tutorial will help you to set JAVAHOME on Windows 7/8/10 operating systems. Additionally, you also need to add java bin folder location in PATH environment variable. Then you need to set the JAVAHOME environment variable to make it work properly. If you see the information about the version in the following lines, the installation was successful. If you have already installed Java on Windows systems. Type maven -version in the command prompt and press Enter. Open the command prompt and type mvn –version. System variables, If You are working on a personal computer as an Administrator then you can set Maven HOME and PATH on either user or system level variables but If you are working on any organization then you might not have administrator privilege so You will have to set Maven HOME and PATH in User variables section. For this, open the Windows Start menu, type cmd, and press Enter. Now it is the time to check if the maven is installed properly. The above steps ensure that all the required libraries are in the classpath.
In the environment variables section, update the path variable by appending %M2_HOME%\bin. In the user variable, just append the %M2% to reflect the maven bin folder. This environment variable can be used to supply extra options to Maven.Īdd/ Update path variavles for environment and user sections. Using the same dialog, add the MAVEN_OPTS environment variable in the user variables section to pass the JVM properties, e.g. Also add the M2 variable in the environemnt variables section as “%M2_HOME%\bin”. Be sure to omit any quotation marks around the path even if it contains spaces. Open the environment variables for your computer and set the M2_HOME as the maven’s home folder. There is nothing else to be done for installing the maven package. The toot folderĭ:\Softwares\apache-maven-3.1.0 is the M2_HOME values when you are setting the environment variables.
Install Mavenĭownload the maven package from here and extract the zip file to the appropriate location. (Read : What is Maven? and Custom Plug-In for Maven). It is very easy to set up using the following steps. In windows, it’s quite easy too but we need to alter the set of environment variables to make it work. As we know, Linux does the installation through its package manager and there is no need for the mannual settings of path or anything else. It is much easier in the Linux OS then setting up in the Windows OS.
We have setup MAVEN_HOME and added it to the PATH variable so that you can work from any directory path irrespective of the maven setup.In my previous article I have written about how to install Maven in Ubuntu?. The output should display the maven folder path. To know that the MAVEN_HOME is set, issue the following command in the command prompt: c:> echo %MAVEN_HOME% Java home: C:Program FilesJavajdk1.8.0_191jreĭefault locale: en_US, platform encoding: Cp1252
Java version: 1.8.0_191, vendor: Oracle Corporation To verify the maven setup, launch command shell, and type You can try a bunch of commands to verify the setup.
Click on the Edit... buttonĬlick on New and add %MAVEN_HOME%\bin to the PATH. Select the Path variable in the user variables. Now add the Maven bin folder to the PATH variable. Add a MAVEN_HOME variable and point it to c:maven directory. In the Advanced Tab > Click on the Environment Variables… button.Ĭlick on the New… button to create a new environment variable.