Thursday, June 25, 2015

how to create standalone maven project from command prompt

Windows
Set the environment variable
JAVA_HOME to C:\Program Files\Java\jdk1.6.0_21

Windows
Append the string ;%JAVA_HOME%\bin to the end of the system variable, Path.


Windows
Set the environment variables using system properties.
M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-2.2.1
M2=%M2_HOME%\bin
MAVEN_OPTS=-Xms256m -Xmx512m

Windows Append the string ;%M2% to the end of the system variable, Path.

C:\Users\jupiter>java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode)

C:\Users\jupiter>mvn -version
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T22:10:2
7+02:00)
Maven home: C:\Downloads\apache-maven
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_31\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"

mvn archetype:generate
306
com.mytutos.maven.examples
test11

No comments:

Post a Comment