Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Adding JDK8 support and moving JAX-RS doclet tool to a profile
Browse files Browse the repository at this point in the history
  • Loading branch information
matzew committed Apr 14, 2015
1 parent 65b837a commit 1e4c202
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 59 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,8 +1,9 @@
language: java

jdk:
- oraclejdk7
- openjdk7
- oraclejdk7
- oraclejdk8

notifications:
irc: "irc.freenode.org#aerogear"
Expand Down
79 changes: 41 additions & 38 deletions jaxrs/pom.xml
Expand Up @@ -102,45 +102,48 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>jax-rs-docs</id>
<phase>generate-resources</phase>
<configuration>
<doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
<docletArtifacts>
<docletArtifact>
<groupId>com.lunatech.jax-doclets</groupId>
<artifactId>doclets</artifactId>
<version>0.10.0</version>
</docletArtifact>
</docletArtifacts>
<detectOfflineLinks>false</detectOfflineLinks>
<offlineLinks>
<offlineLink>
<url>../javadocs</url>
<location>${project.basedir}/../target/site/apidocs</location>
</offlineLink>
</offlineLinks>
<additionalparam>-disablehttpexample -disablejavascriptexample</additionalparam>
<!-- only document the BASIC protected URIs for sender and (un)registration -->
<excludePackageNames>org.jboss.aerogear.unifiedpush.rest.metrics:org.jboss.aerogear.unifiedpush.rest.registry.applications:*.util.*</excludePackageNames>
</configuration>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jaxrs-doclet</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>jax-rs-docs</id>
<phase>generate-resources</phase>
<configuration>
<doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
<docletArtifacts>
<docletArtifact>
<groupId>com.lunatech.jax-doclets</groupId>
<artifactId>doclets</artifactId>
<version>0.10.0</version>
</docletArtifact>
</docletArtifacts>
<detectOfflineLinks>false</detectOfflineLinks>
<offlineLinks>
<offlineLink>
<url>../javadocs</url>
<location>${project.basedir}/../target/site/apidocs</location>
</offlineLink>
</offlineLinks>
<additionalparam>-disablehttpexample -disablejavascriptexample</additionalparam>
<!-- only document the BASIC protected URIs for sender and (un)registration -->
<excludePackageNames>org.jboss.aerogear.unifiedpush.rest.metrics:org.jboss.aerogear.unifiedpush.rest.registry.applications:*.util.*</excludePackageNames>
</configuration>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>test</id>
<activation>
Expand Down
54 changes: 34 additions & 20 deletions pom.xml
Expand Up @@ -119,26 +119,6 @@

<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-tools</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<!-- Enforce java 1.7 for compiling -->
<!-- This is needed because jax-doclet is broken on jdk8 -->
<version>(,1.8)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- we really do not need javadocs for the server, there are no Java APIs exposed -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -253,6 +233,40 @@
</modules>
</profile>

<!--
Profile for JAX-RS doclet generation. This is only working on JDK7, due to the usage of outdated tools

Usage:
- mvn clean install -Pjaxrs-doclet,test
-->
<profile>
<id>jaxrs-doclet</id>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-tools</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<!-- Enforce java 1.7 for compiling -->
<!-- This is needed because jax-doclet is broken on jdk8 -->
<version>(,1.8)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>code-coverage</id>
<properties>
Expand Down

0 comments on commit 1e4c202

Please sign in to comment.