Skip to main content

How to Install Maven on windows

How to Install Maven on windows:


  1. Install Maven from http://maven.apache.org/download.html 
  2. Extract the "apache-maven-x.x.x-bin.zip" file.
  3. Open System Variable and add a new system variables name "MAVEN_HOME" with variable value "C:\Maven\apache-maven-3.0.4" Figure1.
  4. Then form System variables choose Path click on edit and add in variable value the path of the MAVEN bin "C:\Maven\apache-maven-3.0.4\bin". Figure2.
    Hint: If you don't find the Path in system variables then define a new one.
     
  5. Make Sure that :JAVA_HOME: exists in your system variables and it is set to the location of your JDK, "e.g. C:\Program Files\Java\jdk1.7.0_05".Figure3.
    Hint:you can install Java JDk from this link: http://www.oracle.com/technetwork/java/javase/downloads/index.html 
  6. Open a new command prompt (Winkey + R then type cmd).
  7. Run the following line: mvn --version to verify that it is correctly installed.
  8.  If you got the following lines as in Figure 4 then you installed it successfully 
    Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
    Maven home: C:\Maven\apache-maven-3.0.4\bin\..
    Java version: 1.7.0_05, vendor: Oracle Corporation
    Java home: C:\Program Files\Java\jdk1.7.0_05\jre
    Default locale: en_US, platform encoding: Cp1252
    OS name: "windows server 2008", version: "6.0", arch: "x86", family: "windows"

    Figure 1 Add MAVEN_HOME

    Figure2 Add MAVEN bin path to Path of the system variables

    Add JDK to JAVA_HOME
    Install MAVEN successfully

Comments

Popular posts from this blog

Retrieve Data from Database and Compare it with user input using Java

In this Lesson we will create a form page " form.jsp " that takes the user email. After that we will check the user existence in our DB. If the user email stored in the DB, a welcoming page will be opened to him/her. If the user is a new user then a message will be displayed that tells him/her this email is not stored in our DB. Note: I use access 2013 database and Eclipse Juno     Basic step, Create a new project: Open Eclipse then click on File > New > Other > Web > Dynamic Web Project. First, Load the DB class: In this step we will connect with database so we will gather all its code in a java class named " DBConnection.java " under a package called " code ". Expand your project then right click on java resources > New > Package . After-that Give a name for your package ex, code   Right click on your created new package that called code > New > Class.   After-that Give a name for your Class ex, DBConnection.  

An attempt was made to insert a node where it is not permitted

Do you face this Error while you are writing code to generate xml file from java? Exception in thread "main" org.w3c.dom.DOMException : HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.        at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(Unknown Source)        at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)        at generatexml.WriteXMLFile.main( WriteXMLFile.java:30 ) Well the answer is: Don't insert the node where it isn't permitted. Change your generated directory file path from 'C' to other directory ex, D or to any directory you have. Make sure the ‘appendChild’ is referring to the right element. Don’t appending twice, only make it once. Ex, //Writetoxml.java   Element rootElement = doc . createElement ( " Company " );   doc . appendChild ( rootElement );                Element subElement = doc . cre

Do you want to know about your computer in one window screen?

System Toolbox (Sys Toolbox) If you want to know information about your computer from processor, drivers, motherboard, memory, operating system,...and more, you can depend on this software. Sys Toolbox (see screen shoot from the software) provides a software and hardware information for windows operating system. It is a simple software that you can use it to know about your PC. To run the software, you need to: Extract the zipped software.  After that, right click on the software icon and choose "Run as administrator". Finally, you will find a pop up screen telling you information about you PC. To go to the software site: http://sys-toolbox-pro.soft112.com/ To Download the software: Download