This is an automated email from the ASF dual-hosted git repository.
shuber pushed a commit to branch UNOMI-259-jdk11-support
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/UNOMI-259-jdk11-support by
this push:
new a4b1108 UNOMI-259 - (Temporarily) Deactivate CXF Buss logging since
it is causing problems with JDK 11 - Remove most endorsed libraries as they
don't seem needed anymore - Add some libraries to the feature - Fix miredot
plugin support for JDK 8 & 11 - Fix problem with JDK 8 compilation with
maven-compiler-plugin
a4b1108 is described below
commit a4b1108717be472c9e89e5352223003be8d0842e
Author: Serge Huber <[email protected]>
AuthorDate: Tue Dec 17 10:02:05 2019 +0100
UNOMI-259
- (Temporarily) Deactivate CXF Buss logging since it is causing problems
with JDK 11
- Remove most endorsed libraries as they don't seem needed anymore
- Add some libraries to the feature
- Fix miredot plugin support for JDK 8 & 11
- Fix problem with JDK 8 compilation with maven-compiler-plugin
Signed-off-by: Serge Huber <[email protected]>
---
kar/src/main/feature/feature.xml | 2 +
package/pom.xml | 2 +
pom.xml | 9 +-
rest/pom.xml | 159 +++++++++++++++------
.../resources/OSGI-INF/blueprint/blueprint.xml | 6 +-
5 files changed, 127 insertions(+), 51 deletions(-)
diff --git a/kar/src/main/feature/feature.xml b/kar/src/main/feature/feature.xml
index 70c76b1..2665b1e 100644
--- a/kar/src/main/feature/feature.xml
+++ b/kar/src/main/feature/feature.xml
@@ -53,6 +53,8 @@
<bundle
start-level="75">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jakarta-regexp/1.4_1</bundle>
<bundle
start-level="75">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/2.3_1</bundle>
<bundle
start-level="75">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0</bundle>
+ <bundle
start-level="75">mvn:javax.annotation/javax.annotation-api/1.3.2</bundle>
+ <bundle
start-level="75">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/${jsr305.bundle.version}</bundle>
<bundle start-level="70"
start="false">mvn:org.apache.unomi/unomi-lifecycle-watcher/${project.version}</bundle>
<bundle start-level="75"
start="false">mvn:org.apache.unomi/unomi-api/${project.version}</bundle>
diff --git a/package/pom.xml b/package/pom.xml
index e27ebb2..d8b0b65 100644
--- a/package/pom.xml
+++ b/package/pom.xml
@@ -335,6 +335,7 @@
<feature>unomi-router-karaf-feature</feature>
<feature>unomi-web-tracker-karaf-kar</feature>
</bootFeatures>
+ <!--
<libraries>
<library>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${xerces.version};type:=endorsed;export:=true;delegate:=true</library>
<library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/${servicemix.specs.version};type:=endorsed;export:=true</library>
@@ -354,6 +355,7 @@
<library>mvn:net.java.dev.jna/jna/${jna.version};type:=boot;export:=false</library>
<library>mvn:net.java.dev.jna/jna-platform/${jna.version};type:=boot;export:=false</library>
</libraries>
+ -->
<javase>1.8</javase>
</configuration>
</plugin>
diff --git a/pom.xml b/pom.xml
index 233c361..33bc991 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
<version.pax.exam>4.13.1</version.pax.exam>
<elasticsearch.version>7.4.2</elasticsearch.version>
- <java.version>11</java.version>
+ <java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -428,7 +428,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
- <version>${java.version}</version>
+ <version>2.0.0</version>
<configuration>
<verbose>false</verbose>
<addSvnKeyWords>true</addSvnKeyWords>
@@ -1106,10 +1106,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
- <configuration>
- <release>${java.version}</release>
- </configuration>
+ <version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
diff --git a/rest/pom.xml b/rest/pom.xml
index 7476188..d5dc734 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -108,66 +108,139 @@
<profiles>
<profile>
- <id>rest-doc</id>
+ <id>rest-doc-jdk8</id>
<activation>
<os>
<family>!windows</family>
</os>
+ <jdk>
+ [1.6,1.10)
+ </jdk>
</activation>
<build>
<plugins>
- <!--<plugin>
- <groupId>com.sebastian-daschner</groupId>
- <artifactId>jaxrs-analyzer-maven-plugin</artifactId>
- <version>0.8</version>
+ <plugin>
+ <groupId>com.qmino</groupId>
+ <artifactId>miredot-plugin</artifactId>
+ <version>2.1.2</version>
<executions>
<execution>
<goals>
- <goal>analyze-jaxrs</goal>
+ <goal>restdoc</goal>
</goals>
- <configuration>
- <!– Available backends are
plaintext (default), swagger and asciidoc –>
- <backend>swagger</backend>
- <!– Domain of the deployed
project, defaults to example.com –>
-
<!–<deployedDomain>example.com</deployedDomain>–>
- </configuration>
</execution>
</executions>
+ <configuration>
+
<licence>cHJvamVjdHxvcmcuYXBhY2hlLnVub21pLnVub21pLXJlc3R8MjAyMC0wMi0yOHx0cnVlfC0xI01Dd0NGQ01pMDRxTFZ6LzJ4SG82MjAranZITnRLYWovQWhRcG4vS01jdTU2NXpOWkRpUzcwQXMrdC96bVdRPT0=</licence>
+ <output>
+ <title>Documentation for Apache Unomi's
RESTful API ${project.version}</title>
+ <html>
+ <!-- optional html configuration -->
+
<location>${project.parent.build.directory}/staging/rest-api-doc</location>
+ </html>
+ <raml />
+ </output>
+ <restModel>
+ <restFramework>
+ <name>jax-rs</name>
+ <cxfServiceConfig>
+
<item>src/main/resources/OSGI-INF/blueprint/blueprint.xml</item>
+ </cxfServiceConfig>
+ </restFramework>
+ <httpStatusCodes>
+ <httpStatusCode>
+ <httpCode>200</httpCode>
+ <document>always</document>
+ <defaultMessage>The service call has
completed successfully.</defaultMessage>
+ </httpStatusCode>
+ <httpStatusCode>
+ <httpCode>401</httpCode>
+ <document>explicit:
com.acme.exceptions.AuthorizationException</document>
+ <defaultMessage>The user is not
authorized to use this service.</defaultMessage>
+ </httpStatusCode>
+ <httpStatusCode>
+ <httpCode>412</httpCode>
+ <document>put,post</document>
+ <defaultMessage>Invalid JSON/XML
input.</defaultMessage>
+ </httpStatusCode>
+ <httpStatusCode>
+ <httpCode>500</httpCode>
+ <document>always</document>
+ <defaultMessage>The service call has
not succeeded.</defaultMessage>
+ <sticky>true</sticky> <!-- Document
always, even if there is an @statuscode tag -->
+ </httpStatusCode>
+ </httpStatusCodes>
+ <externalSources>
+ <sourceDirs>
+
<sourceDir>../api/src/main/java</sourceDir>
+ </sourceDirs>
+ </externalSources>
+ </restModel>
+ <analysis>
+ <checks>
+
<JAVADOC_MISSING_SUMMARY>warn</JAVADOC_MISSING_SUMMARY>
+
<JAVADOC_MISSING_INTERFACEDOCUMENTATION>warn</JAVADOC_MISSING_INTERFACEDOCUMENTATION>
+
<JAVADOC_MISSING_PARAMETER_DOCUMENTATION>warn</JAVADOC_MISSING_PARAMETER_DOCUMENTATION>
+
<JAVADOC_MISSING_EXCEPTION_DOCUMENTATION>warn</JAVADOC_MISSING_EXCEPTION_DOCUMENTATION>
+
<JAVADOC_MISSING_AUTHORS>ignore</JAVADOC_MISSING_AUTHORS>
+
<JAXRS_MISSING_PRODUCES>warn</JAXRS_MISSING_PRODUCES>
+
<JAXRS_MISSING_CONSUMES>warn</JAXRS_MISSING_CONSUMES>
+
<JAXRS_MISSING_PATH_PARAM>warn</JAXRS_MISSING_PATH_PARAM>
+
<REST_UNMAPPED_EXCEPTION>warn</REST_UNMAPPED_EXCEPTION>
+
<UNREACHABLE_RESOURCE>warn</UNREACHABLE_RESOURCE>
+
<PARTIAL_RESOURCE_OVERLAP>warn</PARTIAL_RESOURCE_OVERLAP>
+ </checks>
+ </analysis>
+ </configuration>
</plugin>
<plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <version>3.1.0</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
<configuration>
- <apiSources>
- <apiSource>
- <springmvc>false</springmvc>
-
<locations>org.apache.unomi.rest</locations>
-
<templatePath>${basedir}/api-doc-template/markdown.hbs</templatePath>
-
<outputPath>${basedir}/generated/document.html</outputPath>
-
<swaggerDirectory>generated/swagger-ui</swaggerDirectory>
- <info>
- <title>Documentation for Apache
Unomi's RESTful API</title>
- <version>${project.version}</version>
- </info>
- <securityDefinitions>
- <securityDefinition>
- <name>MybasicAuth</name>
- <type>basic</type>
- </securityDefinition>
- </securityDefinitions>
- </apiSource>
- </apiSources>
+ <tags>
+ <tag>
+ <name>summary</name>
+ <placement>a</placement>
+ <head>MireDot summary (resource
title)</head>
+ </tag>
+ <tag>
+ <name>title</name>
+ <placement>a</placement>
+ <head>MireDot title (resource title)</head>
+ </tag>
+ <tag>
+ <name>servicetag</name>
+ <placement>a</placement>
+ <head>MireDot resource tag (label)</head>
+ </tag>
+ <tag>
+ <name>statuscode</name>
+ <placement>a</placement>
+ <head>MireDot resource status
code(s)</head>
+ </tag>
+ <tag>
+ <name>responseheader</name>
+ <placement>a</placement>
+ <head>MireDot response header</head>
+ </tag>
+ </tags>
</configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>-->
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>rest-doc-jdk10</id>
+ <activation>
+ <os>
+ <family>!windows</family>
+ </os>
+ <jdk>
+ 1.10
+ </jdk>
+ </activation>
+ <build>
+ <plugins>
<plugin>
<groupId>com.qmino</groupId>
<artifactId>miredot-plugin</artifactId>
diff --git a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml
b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 4390c64..8cc3a8b 100644
--- a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -18,21 +18,23 @@
<blueprint xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
- xmlns:cxf="http://cxf.apache.org/blueprint/core"
xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
+ xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/blueprint/jaxrs
http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
- http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd
+
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
<cm:property-placeholder
persistent-id="org.apache.unomi.rest.segmentserviceendpoint"
update-strategy="reload">
</cm:property-placeholder>
+ <!--
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
+ -->
<bean id="cors-filter"
class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter"/>
<bean id="jacksonMapper"
class="org.apache.unomi.persistence.spi.CustomObjectMapper"/>