持续更新~~
1.创建普通的Java maven项目
mvn archetype:create -DgroupId=
g
r
o
u
p
I
d
−
D
a
r
t
i
f
a
c
t
I
d
=
groupId -DartifactId=
groupId−DartifactId=artifactId -Dversion=$version -DarchetypeArtifactId=maven-archetype-quickstart
2.编译源代码
mvn compile
3.编译测试代码
mvn test-compile
4.运行代码
mvn test
5.本地安装mvn jar包
mvn install
6.生成eclipse项目
mvn eclipse:eclipse
7.生成idea项目
mvn idea:idea
8.在本地仓库安装外部jar
mvn install:install-file -Dfile=
j
a
r
P
a
t
h
−
D
g
r
o
u
p
I
d
=
jarPath -DgroupId=
jarPath−DgroupId=groupId -DartifactId=
a
r
t
i
f
a
c
t
I
d
−
D
v
e
r
s
i
o
n
=
artifactId -Dversion=
artifactId−Dversion=version -Dpackaging=jar