-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
164 lines (161 loc) · 7.13 KB
/
pom.xml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dependency.locations.enabled>false</dependency.locations.enabled>
<!-- <checkstyle.config.location>checkstyle.xml</checkstyle.config.location>-->
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.sourceforge.cobertura</groupId>-->
<!-- <artifactId>cobertura</artifactId>-->
<!-- <version>2.1.1</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.mycompany.app.App1</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<goals>
<goal>cobertura</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<instrumentation>
<excludes>
<exclude>com/**/*Test.class</exclude>
</excludes>
</instrumentation>
<check>
<!--每个类的分支覆盖率-->
<!-- <branchRate>85</branchRate>-->
<!--每个类的代码行覆盖率-->
<!-- <lineRate>85</lineRate>-->
<!--校验失败则中止.即为true时如果校验失败则打包执行失败,反之则只是打出告警日志-->
<!-- <haltOnFailure>true</haltOnFailure>-->
<!--整体的分支覆盖率-->
<!-- <totalBranchRate>85</totalBranchRate>-->
<!--整体的代码行覆盖率-->
<!-- <totalLineRate>85</totalLineRate>-->
<!--每个包的分支行覆盖率-->
<!-- <packageBranchRate>85</packageBranchRate>-->
<!--每个包的代码行覆盖率-->
<!-- <packageLineRate>85</packageLineRate>-->
</check>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<!-- 设置分析工作的等级,可以为Min、Default和Max -->
<effort>Low</effort>
<!-- Low、Medium和High (Low最严格) High只扫描严重错误。建议用Medium-->
<threshold>Medium</threshold>
<failOnError>false</failOnError>
<includeTests>false</includeTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<!-- <linkXref>true</linkXref>-->
<sourceEncoding>utf-8</sourceEncoding>
<!-- <minimumTokens>100</minimumTokens>-->
<targetJdk>1.8</targetJdk>
<!-- <excludes>-->
<!-- <exclude>**/*Bean.java</exclude>-->
<!-- <exclude>**/generated/*.java</exclude>-->
<!-- </excludes>-->
<!-- <excludeRoots>-->
<!-- <excludeRoot>target/generated-sources/stubs</excludeRoot>-->
<!-- </excludeRoots>-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
</plugin>
</plugins>
</reporting>
</project>