WELCOME Abdennour : Software engineer

Sep 23, 2012

Maven Command Options



Maven的命令选项
Maven的命令選項
Maven कमान विकल्प
Maven Perintah Pilihan
Maven Komut Seçenekleri
메 이벤 명령 옵션
Mavenのコマンドオプション
Maven Параметры команд
Opções de comando Maven
ตัวเลือกคำสั่ง Maven


How to Create Java Project fastly :

>> To install Maven :
    a)With Windows: http://www.mkyong.com/maven/how-to-install-maven-in-windows/
    b)With  Linux(Ubuntu) :
          b.1.Open Terminal & write:  sudo apt-get install maven2
                   or
          b.2.Maven 3 : http://lukieb.wordpress.com/2011/02/15/installing-maven-3-on-ubuntu-10-04-lts-server/
       


mvn archetype:generate \
  -DarchetypeGroupId=$ARCHETYPE_GROUPID \
  -DarchetypeArtifactId=duel-mvc-archetype \
  -DarchetypeVersion=$ARCHETYPE_VERSION \
  -DgroupId=$GROUP_ID \
  -DartifactId=$PRojectName \
  -Dversion=$VERSION \
  -Dpackage=$GROUP_ID.$PRojectName \
  -DinteractiveMode=false

OR



mvn archetype:generate  -DarchetypeGroupId=org.duelengine -DarchetypeArtifactId=$ARCHETYPE_GROUPID -DarchetypeVersion=$ARCHETYPE_VERION -DgroupId=$GROUP_ID -DartifactId=$PRojectName -Dversion=$VERSION -Dpackage=$GROUP_ID.$PRojectName -DinteractiveMode=false


Example
mvn archetype:generate -DarchetypeGroupId=com.force.sdk -DarchetypeArtifactId=springmvc-archetype -DgroupId=slm.abdennour.springmvc-DartifactId=mvc001 -Dversion=1.1 -DinteractiveMode=false


build your project
mvn package

 run the resulting WAR on the test bootstrap
java -jar <DartifactId>/target/<DartifactId>.jar 
or
java -war <DartifactId>/target/<DartifactId>.war

 
EXAMPLE : 
java -war mvc001/target/mvc001.war
 Deploy a Web Project
Example : mvn tomcat:run


No comments:

Post a Comment