Maven的发布plugin配置,包括编译、发布、打包、安装、单元测试、源码
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<
build
>
<
plugins
>
<
plugin
>
<!-- 编译插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-compiler-plugin</
artifactId
>
<
version
>2.3.2</
version
>
<
configuration
>
<
source
>1.6</
source
>
<
target
>1.6</
target
>
</
configuration
>
</
plugin
>
<
plugin
>
<!-- 发布插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-deploy-plugin</
artifactId
>
<
version
>2.5</
version
>
</
plugin
>
<
plugin
>
<!-- 打包插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-jar-plugin</
artifactId
>
<
version
>2.3.1</
version
>
</
plugin
>
<
plugin
>
<!-- 安装插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-install-plugin</
artifactId
>
<
version
>2.3.1</
version
>
</
plugin
>
<
plugin
>
<!-- 单元测试插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-surefire-plugin</
artifactId
>
<
version
>2.7.2</
version
>
<
configuration
>
<
skip
>true</
skip
>
</
configuration
>
</
plugin
>
<
plugin
>
<!-- 源码插件 -->
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-source-plugin</
artifactId
>
<
version
>2.1</
version
>
<!-- 发布时自动将源码同时发布的配置 -->
<
executions
>
<
execution
>
<
id
>attach-sources</
id
>
<
goals
>
<
goal
>jar</
goal
>
</
goals
>
</
execution
>
</
executions
>
</
plugin
>
</
plugins
>
</
build
>
|
本文介绍了Maven项目中常用的构建插件配置,包括编译、发布、打包、安装、单元测试及源码插件的具体配置示例。
4056

被折叠的 条评论
为什么被折叠?



