[maven] 初试maven
环境 CentOS 6
一, 安装:
[root@okk ~]# wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
[root@okk ~]# tar zxvf apache-maven-3.5.0-bin.tar.gz
添加如下行到 ~/.bash_profile 文件
PATH=$PATH:$HOME/apache-maven-3.5.0/bin/
重新登录,并测试:
[root@okk ~]# mvn -v Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00) Maven home: /root/apache-maven-3.5.0 Java version: 1.8.0_65, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_65/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.4.68-1.el6.x86_64", arch: "amd64", family: "unix" [root@okk ~]#
二,使用
[root@okk logengine]# mvn -f pom.xml package