Skip to content

Commit df4e7e0

Browse files
committed
Added site generation which
can be published to GitHub via gh-pages.
1 parent 9433b43 commit df4e7e0

2 files changed

Lines changed: 113 additions & 19 deletions

File tree

pom.xml

Lines changed: 80 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<groupId>com.offbytwo.jenkins</groupId>
1616
<artifactId>jenkins-client</artifactId>
1717
<version>0.3.1-SNAPSHOT</version>
18-
<packaging>jar</packaging>
1918

2019
<parent>
2120
<groupId>org.sonatype.oss</groupId>
@@ -28,6 +27,12 @@
2827
<developerConnection>scm:git:[email protected]:RisingOak/jenkins-client.git</developerConnection>
2928
<url>https://github.com/RisingOak/jenkins-client</url>
3029
</scm>
30+
<distributionManagement>
31+
<site>
32+
<id>github</id>
33+
<url>scm:git:[email protected]:RisingOak/jenkins-client.git</url>
34+
</site>
35+
</distributionManagement>
3136

3237
<properties>
3338
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -145,6 +150,22 @@
145150
<build>
146151
<pluginManagement>
147152
<plugins>
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-source-plugin</artifactId>
156+
<version>2.4</version>
157+
<executions>
158+
<!--
159+
! here we override the super-pom attach-sources execution id which
160+
! calls sources:jar goal. That goals forks the lifecycle,
161+
! causing the generate-sources phase to be called twice for the install goal.
162+
-->
163+
<execution>
164+
<id>attach-sources</id>
165+
<phase>DISABLE_FORKED_LIFECYCLE_MSOURCES-13</phase>
166+
</execution>
167+
</executions>
168+
</plugin>
148169
<plugin>
149170
<groupId>org.apache.maven.plugins</groupId>
150171
<artifactId>maven-surefire-plugin</artifactId>
@@ -173,6 +194,22 @@
173194
<artifactId>maven-compiler-plugin</artifactId>
174195
<version>3.3</version>
175196
</plugin>
197+
<!--
198+
! The gpg plugin is already defined in oss-parent
199+
-->
200+
<plugin>
201+
<groupId>org.apache.maven.plugins</groupId>
202+
<artifactId>maven-gpg-plugin</artifactId>
203+
<version>1.5</version>
204+
</plugin>
205+
<plugin>
206+
<groupId>org.apache.maven.plugins</groupId>
207+
<artifactId>maven-scm-publish-plugin</artifactId>
208+
<version>1.1</version>
209+
<configuration>
210+
<scmBranch>gh-pages</scmBranch>
211+
</configuration>
212+
</plugin>
176213
</plugins>
177214
</pluginManagement>
178215
<plugins>
@@ -195,22 +232,48 @@
195232
</build>
196233

197234
<reporting>
198-
<plugins>
235+
<plugins>
236+
<plugin>
237+
<groupId>org.apache.maven.plugins</groupId>
238+
<artifactId>maven-surefire-report-plugin</artifactId>
239+
<version>2.18.1</version>
240+
<reportSets>
241+
<reportSet>
242+
<reports>
243+
<report>failsafe-report-only</report>
244+
<report>report</report>
245+
</reports>
246+
</reportSet>
247+
</reportSets>
248+
</plugin>
249+
<plugin>
250+
<groupId>org.apache.maven.plugins</groupId>
251+
<artifactId>maven-project-info-reports-plugin</artifactId>
252+
<version>2.8</version>
253+
</plugin>
199254
<plugin>
200255
<groupId>org.apache.maven.plugins</groupId>
201256
<artifactId>maven-pmd-plugin</artifactId>
202-
<version>2.7.1</version>
257+
<version>3.5</version>
258+
<configuration>
259+
<targetJdk>${maven.compiler.target}</targetJdk>
260+
</configuration>
203261
</plugin>
204262
<plugin>
205263
<groupId>org.codehaus.mojo</groupId>
206264
<artifactId>cobertura-maven-plugin</artifactId>
207-
<version>2.5.2</version>
265+
<version>2.7</version>
208266
</plugin>
209267
<plugin>
210268
<groupId>org.codehaus.mojo</groupId>
211269
<artifactId>findbugs-maven-plugin</artifactId>
212270
<version>2.5.2</version>
213271
</plugin>
272+
<plugin>
273+
<groupId>org.apache.maven.plugins</groupId>
274+
<artifactId>maven-jxr-plugin</artifactId>
275+
<version>2.5</version>
276+
</plugin>
214277
</plugins>
215278
</reporting>
216279

@@ -225,24 +288,23 @@
225288
</activation>
226289
<build>
227290
<plugins>
291+
<!-- MSOURCES-13 related workaround overriding super-pom -->
228292
<plugin>
229-
<groupId>org.apache.maven.plugins</groupId>
230-
<artifactId>maven-source-plugin</artifactId>
231-
<version>2.2.1</version>
232-
<executions>
233-
<execution>
234-
<id>attach-sources</id>
235-
<goals>
236-
<goal>jar</goal>
237-
</goals>
238-
</execution>
239-
</executions>
293+
<inherited>true</inherited>
294+
<artifactId>maven-source-plugin</artifactId>
295+
<executions>
296+
<execution>
297+
<id>attach-sources-no-fork</id>
298+
<goals>
299+
<goal>jar-no-fork</goal>
300+
</goals>
301+
</execution>
302+
</executions>
240303
</plugin>
241-
242304
<plugin>
243305
<groupId>org.apache.maven.plugins</groupId>
244306
<artifactId>maven-javadoc-plugin</artifactId>
245-
<version>2.9</version>
307+
<version>2.10.3</version>
246308
<executions>
247309
<execution>
248310
<id>attach-javadocs</id>
@@ -252,11 +314,10 @@
252314
</execution>
253315
</executions>
254316
</plugin>
255-
256317
<plugin>
257318
<groupId>org.apache.maven.plugins</groupId>
258319
<artifactId>maven-gpg-plugin</artifactId>
259-
<version>1.4</version>
320+
<version>1.5</version>
260321
<executions>
261322
<execution>
262323
<id>sign-artifacts</id>

src/site/site.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
6+
7+
<skin>
8+
<groupId>org.apache.maven.skins</groupId>
9+
<artifactId>maven-fluido-skin</artifactId>
10+
<version>1.4</version>
11+
</skin>
12+
13+
<custom>
14+
<fluidoSkin>
15+
<topBarEnabled>true</topBarEnabled>
16+
<sideBarEnabled>true</sideBarEnabled>
17+
<googleSearch>
18+
<sitesearch>${project.url}</sitesearch>
19+
</googleSearch>
20+
<gitHub>
21+
<projectId>RisingOak/jenkins-client</projectId>
22+
<ribbonOrientation>right</ribbonOrientation>
23+
<ribbonColor>gray</ribbonColor>
24+
</gitHub>
25+
</fluidoSkin>
26+
</custom>
27+
<body>
28+
<menu name="Overview">
29+
<item name="Introduction" href="index.html"/>
30+
</menu>
31+
<menu ref="reports" />
32+
</body>
33+
</project>

0 commit comments

Comments
 (0)