javaee论坛

普通会员

225648

帖子

324

回复

338

积分

楼主
发表于 2017-09-04 08:20:00 | 查看: 572 | 回复: 3
Download maven from: http://maven.apache.org/download.cgi

Choose the Binary tar.gz archive, and extract it with tar xzvf apache-maven-3.3.9-bin.tar.gz

Edit the environment PATH

vim /etc/profile

Insert:

export MAV_HOME="/home/apache-maven-3.3.9"export PATH="$MAV_HOME/bin:$PATH"

Save and update the profile

source /etc/profile

Confirm setup:

mvn -v

Succeed if some appears like this:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)Maven home: /home/apache-maven-3.3.9Java version: 1.8.0_111, vendor: Oracle CorporationJava home: /usr/java/jdk1.8.0_111/jreDefault locale: en_US, platform encoding: UTF-8OS name: "linux", version: "4.8.0-41-generic", arch: "amd64", family: "unix"

Quick Use

clean workspace: mvn clean

compile and test: mvn install

skip tests: mvn install -DskipTests

skip test execution but compile: mvn install -Dmaven.test.skip.exec=true

clean and test: mvn clean install

run selected test after compile: mvn test -Dtest=TestClassName (combined: mvn clean install -Dtest=TestClassName)

create runnable binaries after install: mvn assembly:assembly -Pnative (combined: mvn clean install assembly:assembly -Pnative)

Done! Enjoy!


普通会员

0

帖子

333

回复

342

积分
沙发
发表于 2017-09-04 08:20:29

路过


http://www.cnccsy.com/

http://www.dm-cut.com/

http://www.linhuisuliao.com/

http://www.tyt5151.com/

http://www.chinayintie.com/



普通会员

0

帖子

286

回复

291

积分
板凳
发表于 2022-04-29 11:32:17

围观

普通会员

0

帖子

277

回复

287

积分
地板
发表于 2023-09-19 22:55:04

专业抢二楼!顺便笑摸狗头(3L)

您需要登录后才可以回帖 登录 | 立即注册

触屏版| 电脑版

技术支持 历史网 V2.0 © 2016-2017