Skip to content

Commit beed69e

Browse files
committed
Moved reporting plugin config from wc
1 parent ca6e136 commit beed69e

File tree

2 files changed

+281
-37
lines changed

2 files changed

+281
-37
lines changed

pom.xml

Lines changed: 79 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,6 @@
151151
</configuration>
152152
</plugin>
153153

154-
<!-- Compile the java source. -->
155-
<plugin>
156-
<groupId>org.apache.maven.plugins</groupId>
157-
<artifactId>maven-compiler-plugin</artifactId>
158-
<version>3.3</version>
159-
</plugin>
160-
161-
162154
<!-- Generate the site. -->
163155
<plugin>
164156
<groupId>org.apache.maven.plugins</groupId>
@@ -194,9 +186,68 @@
194186
<releaseProfiles>release</releaseProfiles>
195187
</configuration>
196188
</plugin>
189+
197190
</plugins>
198191
</pluginManagement>
192+
199193
<plugins>
194+
<!-- Compile the java source. -->
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-compiler-plugin</artifactId>
198+
<version>3.3</version>
199+
</plugin>
200+
201+
<plugin>
202+
<groupId>org.apache.maven.plugins</groupId>
203+
<artifactId>maven-javadoc-plugin</artifactId>
204+
<version>2.10.3</version>
205+
<configuration>
206+
<archive>
207+
<manifestEntries>
208+
<Built-By /><!-- blank build user in manifest file -->
209+
</manifestEntries>
210+
</archive>
211+
<charset>UTF-8</charset>
212+
<encoding>UTF-8</encoding>
213+
<docencoding>UTF-8</docencoding>
214+
<breakiterator>true</breakiterator>
215+
<version>true</version>
216+
<keywords>true</keywords>
217+
</configuration>
218+
<executions>
219+
<execution>
220+
<!-- A release to Maven Central MUST include javadoc Jars - even if they are dummy jars -->
221+
<id>attach-javadocs</id>
222+
<goals>
223+
<goal>jar</goal>
224+
</goals>
225+
</execution>
226+
</executions>
227+
</plugin>
228+
229+
<!-- Generate the site. -->
230+
<plugin>
231+
<groupId>org.apache.maven.plugins</groupId>
232+
<artifactId>maven-site-plugin</artifactId>
233+
<version>3.4</version>
234+
<dependencies>
235+
<dependency>
236+
<groupId>org.apache.maven.doxia</groupId>
237+
<artifactId>doxia-module-markdown</artifactId>
238+
<version>1.6</version>
239+
</dependency>
240+
</dependencies>
241+
<executions>
242+
<execution>
243+
<id>attach-descriptor</id>
244+
<goals>
245+
<goal>attach-descriptor</goal>
246+
</goals>
247+
</execution>
248+
</executions>
249+
</plugin>
250+
200251
<plugin>
201252
<groupId>org.apache.maven.plugins</groupId>
202253
<artifactId>maven-enforcer-plugin</artifactId>
@@ -225,6 +276,20 @@
225276
</dependency>
226277
</dependencies>
227278
</plugin>
279+
280+
<plugin>
281+
<groupId>org.apache.maven.plugins</groupId>
282+
<artifactId>maven-surefire-plugin</artifactId>
283+
<version>${surefire.version}</version>
284+
<dependencies>
285+
<dependency>
286+
<groupId>org.apache.maven.surefire</groupId>
287+
<artifactId>surefire-junit47</artifactId>
288+
<version>${surefire.version}</version>
289+
</dependency>
290+
</dependencies>
291+
</plugin>
292+
228293
</plugins>
229294
</build>
230295

@@ -236,9 +301,12 @@
236301
-->
237302
<id>release</id>
238303
<build>
239-
<!-- Could move sources generation here, javadoc too, site? -->
304+
240305
<plugins>
241-
<!-- Create jar of the source files. -->
306+
<!--
307+
Create jar of the source files.
308+
This is required for release to Maven repo.
309+
-->
242310
<plugin>
243311
<groupId>org.apache.maven.plugins</groupId>
244312
<artifactId>maven-source-plugin</artifactId>
@@ -270,33 +338,6 @@
270338
</execution>
271339
</executions>
272340
</plugin>
273-
<plugin>
274-
<groupId>org.apache.maven.plugins</groupId>
275-
<artifactId>maven-javadoc-plugin</artifactId>
276-
<version>2.10.3</version>
277-
<configuration>
278-
<archive>
279-
<manifestEntries>
280-
<Built-By /><!-- blank build user in manifest file -->
281-
</manifestEntries>
282-
</archive>
283-
<charset>UTF-8</charset>
284-
<encoding>UTF-8</encoding>
285-
<docencoding>UTF-8</docencoding>
286-
<breakiterator>true</breakiterator>
287-
<version>true</version>
288-
<keywords>true</keywords>
289-
</configuration>
290-
<executions>
291-
<execution>
292-
<!-- A release to Maven Central MUST include javadoc Jars - even if they are dummy jars -->
293-
<id>attach-javadocs</id>
294-
<goals>
295-
<goal>jar</goal>
296-
</goals>
297-
</execution>
298-
</executions>
299-
</plugin>
300341

301342
<plugin>
302343
<groupId>org.apache.maven.plugins</groupId>
@@ -313,6 +354,7 @@
313354
</executions>
314355
</plugin>
315356
</plugins>
357+
316358
</build>
317359
</profile>
318360
</profiles>

qa-parent/pom.xml

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<checkstyle.skip>${wc.qa.skip}</checkstyle.skip>
1919
<findbugs.skip>${wc.qa.skip}</findbugs.skip>
2020
<pmd.skip>${wc.qa.skip}</pmd.skip>
21+
<badges.skip>${wc.qa.skip}</badges.skip>
22+
<javadoc.excluded.packages></javadoc.excluded.packages>
23+
<checkstyle.excludes></checkstyle.excludes>
2124
</properties>
2225

2326
<description>
@@ -37,6 +40,7 @@
3740
<configLocation>bordertech/checkstyle.xml</configLocation>
3841
<consoleOutput>true</consoleOutput>
3942
<failsOnError>true</failsOnError>
43+
<failOnViolation>true</failOnViolation>
4044
<linkXRef>false</linkXRef>
4145
<includeTestSourceDirectory>false</includeTestSourceDirectory>
4246
</configuration>
@@ -86,6 +90,7 @@
8690
<artifactId>findbugs-maven-plugin</artifactId>
8791
<version>3.0.3</version>
8892
<configuration>
93+
<failOnError>true</failOnError>
8994
<effort>Max</effort>
9095
<includeTests>false</includeTests>
9196
<threshold>Medium</threshold>
@@ -108,6 +113,203 @@
108113
</execution>
109114
</executions>
110115
</plugin>
116+
117+
<!-- Code coverage. -->
118+
<!-- Run twice for the report. -->
119+
<plugin>
120+
<groupId>org.jacoco</groupId>
121+
<artifactId>jacoco-maven-plugin</artifactId>
122+
<version>0.7.5.201505241946</version>
123+
<executions>
124+
<!-- Prepare jacco agent. -->
125+
<execution>
126+
<id>jacoco-agent</id>
127+
<goals>
128+
<goal>prepare-agent</goal>
129+
</goals>
130+
<configuration>
131+
<propertyName>surefireArgLine</propertyName>
132+
</configuration>
133+
</execution>
134+
</executions>
135+
</plugin>
136+
137+
<!-- Generate badges. -->
138+
<plugin>
139+
<groupId>com.github.bordertech.buildtools</groupId>
140+
<artifactId>badger</artifactId>
141+
<version>1.0.1-SNAPSHOT</version>
142+
<executions>
143+
<execution>
144+
<phase>post-site</phase>
145+
<goals>
146+
<goal>badges</goal>
147+
</goals>
148+
<configuration>
149+
<skip>${badges.skip}</skip>
150+
<outputDir>target/site/badges</outputDir>
151+
<inputFiles>
152+
<inputFile>target/pmd.xml</inputFile>
153+
<inputFile>target/findbugs-report.xml</inputFile>
154+
<inputFile>target/findbugsXml.xml</inputFile>
155+
<inputFile>target/checkstyle-result.xml</inputFile>
156+
<inputFile>target/coverage-report.xml</inputFile>
157+
</inputFiles>
158+
</configuration>
159+
</execution>
160+
</executions>
161+
</plugin>
162+
111163
</plugins>
112164
</build>
165+
166+
<reporting>
167+
<plugins>
168+
169+
<!-- Generate Reports Information about the project. -->
170+
<plugin>
171+
<groupId>org.apache.maven.plugins</groupId>
172+
<artifactId>maven-project-info-reports-plugin</artifactId>
173+
<version>2.8.1</version>
174+
<reportSets>
175+
<reportSet>
176+
<reports>
177+
<report>index</report>
178+
<report>license</report>
179+
<report>mailing-list</report>
180+
<report>summary</report>
181+
</reports>
182+
</reportSet>
183+
</reportSets>
184+
</plugin>
185+
186+
<!-- Self Aggregating. Plugin automatically aggregates sub modules. -->
187+
<!-- Produce a cross-reference of the project's source. (Self Aggregating). -->
188+
<plugin>
189+
<groupId>org.apache.maven.plugins</groupId>
190+
<artifactId>maven-jxr-plugin</artifactId>
191+
<version>2.5</version>
192+
<reportSets>
193+
<reportSet>
194+
<inherited>false</inherited>
195+
<reports>
196+
<report>aggregate</report>
197+
<!--
198+
<report>test-aggregate</report>
199+
-->
200+
</reports>
201+
</reportSet>
202+
</reportSets>
203+
</plugin>
204+
205+
<!-- Generate Javadoc. (Self Aggregating)-->
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-javadoc-plugin</artifactId>
209+
<version>2.10.3</version>
210+
<configuration>
211+
<charset>UTF-8</charset>
212+
<encoding>UTF-8</encoding>
213+
<docencoding>UTF-8</docencoding>
214+
<breakiterator>true</breakiterator>
215+
<version>true</version>
216+
<keywords>true</keywords>
217+
<excludePackageNames>${javadoc.excluded.packages}</excludePackageNames>
218+
</configuration>
219+
<reportSets>
220+
<reportSet>
221+
<inherited>false</inherited>
222+
<reports>
223+
<report>aggregate</report>
224+
<!--
225+
<report>test-aggregate</report>
226+
-->
227+
</reports>
228+
</reportSet>
229+
</reportSets>
230+
</plugin>
231+
232+
<!-- Generate the web interface version of the test results (Aggregate Parameter). -->
233+
<!-- Run site twice to get correct results. -->
234+
<plugin>
235+
<groupId>org.apache.maven.plugins</groupId>
236+
<artifactId>maven-surefire-report-plugin</artifactId>
237+
<version>${surefire.version}</version>
238+
<configuration>
239+
<aggregate>true</aggregate>
240+
</configuration>
241+
<reportSets>
242+
<reportSet>
243+
<inherited>false</inherited>
244+
<reports>
245+
<report>report</report>
246+
</reports>
247+
</reportSet>
248+
</reportSets>
249+
</plugin>
250+
251+
<!-- QA Reports. -->
252+
<!-- Generate the Checkstyle report. (Self Aggregating) -->
253+
<plugin>
254+
<groupId>org.apache.maven.plugins</groupId>
255+
<artifactId>maven-checkstyle-plugin</artifactId>
256+
<version>2.17</version>
257+
<configuration>
258+
<skip>false</skip>
259+
<configLocation>bordertech/checkstyle.xml</configLocation>
260+
<consoleOutput>true</consoleOutput>
261+
<excludes>${checkstyle.excludes}</excludes>
262+
<headerFile />
263+
</configuration>
264+
<reportSets>
265+
<reportSet>
266+
<inherited>false</inherited>
267+
<reports>
268+
<report>checkstyle-aggregate</report>
269+
</reports>
270+
</reportSet>
271+
</reportSets>
272+
</plugin>
273+
274+
<!-- PMD and CPD Reports (Aggregate Parameter). -->
275+
<plugin>
276+
<groupId>org.apache.maven.plugins</groupId>
277+
<artifactId>maven-pmd-plugin</artifactId>
278+
<version>3.5</version>
279+
<configuration>
280+
<skip>false</skip>
281+
<aggregate>true</aggregate>
282+
<failurePriority>5</failurePriority>
283+
</configuration>
284+
<reportSets>
285+
<reportSet>
286+
<inherited>false</inherited>
287+
<reports>
288+
<report>pmd</report>
289+
<report>cpd</report>
290+
</reports>
291+
</reportSet>
292+
</reportSets>
293+
</plugin>
294+
295+
<!-- Generate Findbugs reports. (Does not support aggregate.) -->
296+
<!-- Run site twice to get Findbugs report.-->
297+
<plugin>
298+
<groupId>org.codehaus.mojo</groupId>
299+
<artifactId>findbugs-maven-plugin</artifactId>
300+
<version>3.0.3</version>
301+
<configuration>
302+
<skip>false</skip>
303+
<effort>Max</effort>
304+
<includeTests>false</includeTests>
305+
<excludeFilterFile>bordertech/findbugs-exclude-filter.xml</excludeFilterFile>
306+
<threshold>Low</threshold>
307+
<failOnError>false</failOnError>
308+
<findbugsXmlOutputDirectory>${project.build.directory}/findbugs-rep</findbugsXmlOutputDirectory>
309+
</configuration>
310+
</plugin>
311+
312+
</plugins>
313+
</reporting>
314+
113315
</project>

0 commit comments

Comments
 (0)