介紹
http://maven.apache.org/ref/3.1.0/
Maven is a project development management and comprehension tool.
Maven是一個專案的開發,管理和綜合工具。
下載
http://maven.apache.org/download.cgi
參考
http://maven.apache.org/download.cgi#Installation
使用教學
http://maven.apache.org/guides/getting-started/index.html
http://maven.apache.org/guides/index.html
安裝
rpm -ivh jdk-7u25-linux-x64.rpm wget http://ftp.tc.edu.tw/pub/Apache/maven/maven-3/3.1.0/binaries/apache-maven-3.1.0-bin.tar.gz export M2_HOME=/usr/local/apache-maven-3.1.0 export M2=$M2_HOME/bin # MAVEN_OPTS 非必須 export MAVEN_OPTS="-Xms256m -Xmx512m" export PATH=$M2:$PATH export JAVA_HOME=/usr/java/jdk1.7.0_25 |
方便執行
[root@localhost ~]# ln -s /usr/local/apache-maven-3.1.0/bin/mvn /usr/bin/mvn |
測試安裝是否成功
[root@localhost ~]# /usr/local/apache-maven-3.1.0/bin/mvn -version Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 10:15:32+0800) Maven home: /usr/local/apache-maven-3.1.0 Java version: 1.7.0_25, vendor: Oracle Corporation Java home: /usr/java/jdk1.7.0_25/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: "unix" [root@localhost ~]# |
下載測試
[root@localhost ~]# mvn archetype:generate \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app |
編譯測試
[root@localhost ~]# cd my-app [root@localhost my-app]# mvn compile [root@localhost my-app]# mvn test |
其他使用教學請看
http://maven.apache.org/guides/getting-started/index.html
http://maven.apache.org/guides/index.html
(完)
[研究] Apache Maven 3.1.0 安裝 (CentOS 6.4 x64)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=80036
沒有留言:
張貼留言