dywhe.blogg.se

Maven install tutorial
Maven install tutorial












maven install tutorial

Set this up as you like or copy mine for this example. This file contains some key/value pair properties concerning where to log, what pattern to use etc. These are your “global” Maven settings.īy default Maven will make a repository for your dependencies at $Īlso, add a log4j.properties file to src/main/resources. So the path to your Maven home directory and then the subdirectory conf. When you have installed maven you’ll find a settings.xml file at $M2_HOME\conf\settings.xml. In this example I’ll just setup a different repo location from the default. There are two possible locations for your Maven configuration settings. It should execute and show something like below. Run your windows commandline as admin with mvn -version. Lookhere for more on environment variables and setting up your JDK. This will allow us to run Maven from the command line.Īlso make sure you have a JAVA_HOME environment variable set up. Next add the location of Maven to the PATH variable, don’t delete other PATH locations. It will display the results as shown below and confirms that our maven setup is successful and completed.M2_HOME=C:\Program Files\Java Tools\apache-maven Just open up the command prompt from the Start -> Command Prompt and in the command prompt just type the maven command mvn -version and press enter. Now in this final step, we would be verifying for the same and ensure things are fine accordingly. If the above steps are carried out successfully, then we are done with the installation and setup process of the maven tool. Now edit the variable Path in the System variables to include the JAVA_HOME and M2_HOME. Kindly ensure that the required version of the jdk has been installed. If you already have JAVA_HOME set, then you only need to set M2_HOME for Maven. Now we need to set up the class path Java (JAVA_HOME) and Maven (M2_HOME). D:\Java\apache-maven-3.2.5, in case you have downloaded any other latest release than the version may differ, but thats not a problem.

maven install tutorial

Unzip the downloaded maven zip and place it in a drive containing all the java related artifacts. NOTE : Any version of the maven which is above 3.2 requires JDK version to be 1.6 and above. STEP 1 to setup Mavenĭownload the latest version of the maven from website.

maven install tutorial

Follow the below mentioned steps in order to download and set up the maven in the windows environment. Also, the maven downloadable package is also very light weight. Maven is one of the handy tool which can be set up quickly and can be made it ready for any java projects within a max of 10 minutes.














Maven install tutorial