KEYCLOAK-1241 Can't build release with Java 8

This commit is contained in:
Marko Strukelj 2015-09-02 13:19:32 +02:00
parent f9af8ba1a0
commit 0c49fce78f
5 changed files with 122 additions and 21 deletions

View file

@ -13,7 +13,7 @@
<outputDirectory>javadocs</outputDirectory> <outputDirectory>javadocs</outputDirectory>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../../services/target/apidocs</directory> <directory>../../services/target/apidocs-rest/output</directory>
<outputDirectory>rest-api</outputDirectory> <outputDirectory>rest-api</outputDirectory>
</fileSet> </fileSet>
<fileSet> <fileSet>

View file

@ -13,6 +13,10 @@
<name>Keycloak REST Services</name> <name>Keycloak REST Services</name>
<description /> <description />
<properties>
<version.swagger.doclet>1.0.5</version.swagger.doclet>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.bouncycastle</groupId>
@ -188,27 +192,114 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration> <executions>
<subpackages>org.keycloak.services.resources.admin:org.keycloak.protocol.oidc</subpackages> <execution>
<doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet> <id>generate-service-docs</id>
<docletArtifacts> <phase>generate-resources</phase>
<docletArtifact> <configuration>
<groupId>com.lunatech.jax-doclets</groupId> <doclet>com.carma.swagger.doclet.ServiceDoclet</doclet>
<artifactId>doclets</artifactId> <docletArtifact>
<version>0.10.2</version> <groupId>com.carma</groupId>
</docletArtifact> <artifactId>swagger-doclet</artifactId>
</docletArtifacts> <version>${version.swagger.doclet}</version>
<detectOfflineLinks>false</detectOfflineLinks> </docletArtifact>
<offlineLinks>
<offlineLink> <subpackages>org.keycloak.services.resources.admin:org.keycloak.protocol.oidc</subpackages>
<url>../javadocs</url> <detectOfflineLinks>false</detectOfflineLinks>
<location>${project.basedir}/../target/site/apidocs</location> <offlineLinks>
</offlineLink> <offlineLink>
</offlineLinks> <url>../javadocs</url>
<additionalparam>-disablejavascriptexample</additionalparam> <location>${project.basedir}/../target/site/apidocs</location>
<additionalparam>-pathexcludefilter '/admin/.*index.*' -pathexcludefilter '/admin' -pathexcludefilter '/admin/\\{realm\\}/console.*'</additionalparam> </offlineLink>
</configuration> </offlineLinks>
<reportOutputDirectory>${project.basedir}/target/apidocs-rest/swagger</reportOutputDirectory>
<useStandardDocletOptions>false</useStandardDocletOptions>
<additionalparam> -skipUiFiles -apiVersion 1 -includeResourcePrefixes org.keycloak.services.resources.admin,org.keycloak.protocol.oidc -docBasePath /apidocs -apiBasePath http://localhost:8080/auth -apiInfoFile ${project.basedir}/src/docs/swagger/apiinfo.json</additionalparam>
</configuration>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<id>jboss-release</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>com.redowlanalytics</groupId>
<artifactId>swagger2markup-maven-plugin</artifactId>
<version>0.7.1</version>
<dependencies>
<dependency>
<groupId>io.github.robwin</groupId>
<artifactId>swagger2markup</artifactId>
<version>0.7.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>gen-asciidoc</id>
<phase>process-resources</phase>
<goals>
<goal>process-swagger</goal>
</goals>
<configuration>
<inputDirectory>${project.basedir}/target/apidocs-rest/swagger/apidocs</inputDirectory>
<outputDirectory>${project.basedir}/target/apidocs-rest/asciidoc</outputDirectory>
<markupLanguage>asciidoc</markupLanguage>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<id>generate-docs</id>
<phase>package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/docs/asciidoc</sourceDirectory>
<sourceDocumentName>index.adoc</sourceDocumentName>
<outputDirectory>${project.basedir}/target/apidocs-rest/output</outputDirectory>
<backend>html5</backend>
<attributes>
<!-- List of attributes:
https://github.com/asciidoctor/asciidoctorj/blob/master/asciidoctorj-core/src/main/java/org/asciidoctor/Attributes.java
-->
<generated>${project.basedir}/target/apidocs-rest/asciidoc</generated>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> </project>

View file

@ -0,0 +1,3 @@
include::{generated}/overview.adoc[]
include::{generated}/paths.adoc[]
include::{generated}/definitions.adoc[]

View file

@ -0,0 +1,4 @@
{
"title": "Keycloak Admin REST API",
"description": "This is a REST API reference for the Keycloak Admin"
}

View file

@ -77,6 +77,7 @@ public class AdminRoot {
/** /**
* Convenience path to master realm admin console * Convenience path to master realm admin console
* *
* @exclude
* @return * @return
*/ */
@GET @GET
@ -90,6 +91,7 @@ public class AdminRoot {
/** /**
* Convenience path to master realm admin console * Convenience path to master realm admin console
* *
* @exclude
* @return * @return
*/ */
@Path("index.{html:html}") // expression is actually "index.html" but this is a hack to get around jax-doclet bug @Path("index.{html:html}") // expression is actually "index.html" but this is a hack to get around jax-doclet bug
@ -118,6 +120,7 @@ public class AdminRoot {
/** /**
* path to realm admin console ui * path to realm admin console ui
* *
* @exclude
* @param name Realm name (not id!) * @param name Realm name (not id!)
* @return * @return
*/ */