Skip to content
Permalink
Browse files
Merge pull request #115 from timothyjward/fix/resolve
Make the JAX-RS whiteboard easily resolvable with minimal pom dependencies
  • Loading branch information
timothyjward committed Jul 22, 2021
2 parents e2781c0 + ce3e7bc commit 4d32beca37857a5914e44ea85e4d25fd9de25647
Showing 28 changed files with 389 additions and 115 deletions.
@@ -21,3 +21,6 @@ Test-Cases: \
${classes;CONCRETE;ANNOTATED;org.junit.Test}

Require-Capability: osgi.service;filter:="(objectClass=org.osgi.service.cm.ConfigurationAdmin)"

# We have a wide range for JAX-B to run on Java 8
Import-Package: javax.xml.bind.*;version="${range;[0,+)}", *
@@ -25,14 +25,20 @@
org.slf4j.event;version=${slf4j.version},\
org.slf4j.helpers;version=${slf4j.version},\
org.slf4j.spi;version=${slf4j.version}

-runfw: org.eclipse.osgi

-resolve.effective: resolve, active

-runrequires: \
java.8.reqs: \
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.jaxb.json.cxf-jettison-itest)'

java.9.plus.reqs: \
${java.8.reqs},\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-osgi)'

-runrequires: ${if;${is;${-runee};JavaSE-1.8};${java.8.reqs};${java.9.plus.reqs}}

-runsystemcapabilities: ${native_capability}

-runproperties: \
@@ -46,8 +52,6 @@

-runbundles: \
com.fasterxml.woodstox.woodstox-core;version='[6.2.4,6.2.5)',\
com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\
org.apache.aries.jax.rs.jaxb.json.cxf-jettison;version='[2.0.1,2.0.2)',\
org.apache.aries.jax.rs.jaxb.json.cxf-jettison-itest;version='[2.0.1,2.0.2)',\
@@ -60,8 +64,8 @@
org.apache.cxf.cxf-rt-rs-sse;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-security;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-transports-http;version='[3.4.3,3.4.4)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\
org.apache.felix.http.jetty;version='[4.1.8,4.1.9)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.geronimo.specs.geronimo-annotation_1.3_spec;version='[1.3.0,1.3.1)',\
org.apache.geronimo.specs.geronimo-jaxrs_2.1_spec;version='[1.1.0,1.1.1)',\
@@ -73,6 +77,10 @@
org.osgi.util.promise;version='[1.1.1,1.1.2)',\
stax2-api;version='[4.2.1,4.2.2)'

blacklist.java.8.jaxb: osgi.identity;filter:=(osgi.identity=jakarta.xml.bind-api)

-runblacklist: ${if;${is;${-runee};JavaSE-1.8};${blacklist.java.8.jaxb}}

-runstartlevel: \
order=sortbynameversion,\
begin=-1
@@ -65,6 +65,10 @@
<artifactId>org.apache.aries.jax.rs.whiteboard</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.aries.jax.rs</groupId>
<artifactId>org.apache.aries.jax.rs.jaxb.json.cxf-jettison</artifactId>
@@ -14,3 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# We have a wide range for JAX-B to run on Java 8
Import-Package: javax.xml.bind.*;version="${range;[0,+)}", *
@@ -42,6 +42,10 @@
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

<build>
@@ -30,9 +30,15 @@

-resolve.effective: resolve, active

-runrequires: \
java.8.reqs: \
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.jackson.itest)'

java.9.plus.reqs: \
${java.8.reqs},\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-osgi)'

-runrequires: ${if;${is;${-runee};JavaSE-1.8};${java.8.reqs};${java.9.plus.reqs}}

-runsystemcapabilities: ${native_capability}
-runproperties: \
logback.configurationFile=file:${.}/logback.xml,\
@@ -51,7 +57,6 @@
com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider;version='[2.12.3,2.12.4)',\
com.fasterxml.jackson.module.jackson-module-jaxb-annotations;version='[2.12.3,2.12.4)',\
com.fasterxml.woodstox.woodstox-core;version='[6.2.4,6.2.5)',\
com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\
org.apache.aries.jax.rs.jackson;version='[2.0.1,2.0.2)',\
@@ -64,8 +69,8 @@
org.apache.cxf.cxf-rt-rs-sse;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-security;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-transports-http;version='[3.4.3,3.4.4)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\
org.apache.felix.http.jetty;version='[4.1.8,4.1.9)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.geronimo.specs.geronimo-annotation_1.3_spec;version='[1.3.0,1.3.1)',\
org.apache.geronimo.specs.geronimo-jaxrs_2.1_spec;version='[1.1.0,1.1.1)',\
@@ -36,16 +36,6 @@
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.aries.component-dsl</groupId>
@@ -33,10 +33,16 @@

-resolve.effective: resolve, active

-runrequires: \
java.8.reqs: \
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.openapi.resource)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.openapi.itest)'

java.9.plus.reqs: \
${java.8.reqs},\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-osgi)'

-runrequires: ${if;${is;${-runee};JavaSE-1.8};${java.8.reqs};${java.9.plus.reqs}}

-runsystemcapabilities: ${native_capability}
-runproperties: \
logback.configurationFile=file:${.}/logback.xml,\
@@ -54,7 +60,6 @@
com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.12.1,2.12.2)',\
com.fasterxml.jackson.datatype.jackson-datatype-jsr310;version='[2.12.1,2.12.2)',\
com.fasterxml.woodstox.woodstox-core;version='[6.2.4,6.2.5)',\
com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
io.github.classgraph.classgraph;version='[4.8.95,4.8.96)',\
io.swagger.core.v3.swagger-annotations;version='[2.1.9,2.1.10)',\
io.swagger.core.v3.swagger-core;version='[2.1.9,2.1.10)',\
@@ -75,8 +80,8 @@
org.apache.cxf.cxf-rt-rs-sse;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-security;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-transports-http;version='[3.4.3,3.4.4)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\
org.apache.felix.http.jetty;version='[4.1.8,4.1.9)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.geronimo.specs.geronimo-annotation_1.3_spec;version='[1.3.0,1.3.1)',\
org.apache.geronimo.specs.geronimo-jaxrs_2.1_spec;version='[1.1.0,1.1.1)',\
@@ -18,3 +18,6 @@
Bundle-Description: Integration Test bundle for the REST Management integration

Test-Cases: ${classes;CONCRETE;ANNOTATED;org.junit.jupiter.api.Test}

# We have a wide range for JAX-B to run on Java 8
Import-Package: javax.xml.bind.*;version="${range;[0,+)}", *
@@ -22,12 +22,16 @@
ch.qos.logback.core,\
org.apache.felix.logback,\
slf4j.api

jaxb.export: javax.xml.bind;javax.xml.bind.annotation;javax.xml.bind.helpers;javax.xml.bind.util;version=2.3.0

-runsystempackages: \
org.slf4j;version=${slf4j.version},\
org.slf4j.event;version=${slf4j.version},\
org.slf4j.helpers;version=${slf4j.version},\
org.slf4j.spi;version=${slf4j.version},\
com.sun.net.httpserver
com.sun.net.httpserver,\
${if;${is;${-runee};JavaSE-1.8};${jaxb.export}}

-runfw: org.eclipse.osgi

@@ -36,14 +40,20 @@

-resolve.effective: resolve, active

-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.rest.management)',\
java.8.reqs: \
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.rest.management)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.rest.management.itest)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
osgi.identity;filter:='(osgi.identity=org.apache.johnzon.mapper)',\
bnd.identity;id='junit-jupiter-engine',\
bnd.identity;id='junit-platform-launcher'

java.9.plus.reqs: \
${java.8.reqs},\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-osgi)'

-runrequires: ${if;${is;${-runee};JavaSE-1.8};${java.8.reqs};${java.9.plus.reqs}}

-runsystemcapabilities: ${native_capability}
-runproperties: \
logback.configurationFile=${fileuri;${.}/logback.xml},\
@@ -65,21 +75,18 @@
com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider;version='[2.12.1,2.12.2)',\
com.fasterxml.woodstox.woodstox-core;version='[6.2.4,6.2.5)',\
com.jayway.jsonpath.json-path;version='[2.4.0,2.4.1)',\
com.sun.istack.commons-runtime;version='[3.0.11,3.0.12)',\
com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
io.github.classgraph.classgraph;version='[4.8.95,4.8.96)',\
io.swagger.core.v3.swagger-annotations;version='[2.1.9,2.1.10)',\
io.swagger.core.v3.swagger-core;version='[2.1.9,2.1.10)',\
io.swagger.core.v3.swagger-integration;version='[2.1.9,2.1.10)',\
io.swagger.core.v3.swagger-jaxrs2;version='[2.1.9,2.1.10)',\
io.swagger.core.v3.swagger-models;version='[2.1.9,2.1.10)',\
jakarta.validation.jakarta.validation-api;version='[2.0.2,2.0.3)',\
jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
junit-jupiter-api;version='[5.7.1,5.7.2)',\
junit-jupiter-engine;version='[5.7.1,5.7.2)',\
junit-platform-commons;version='[1.7.1,1.7.2)',\
junit-platform-engine;version='[1.7.1,1.7.2)',\
junit-platform-launcher;version='[1.7.1,1.7.2)',\
junit-jupiter-api;version='[5.7.2,5.7.3)',\
junit-jupiter-engine;version='[5.7.2,5.7.3)',\
junit-platform-commons;version='[1.7.2,1.7.3)',\
junit-platform-engine;version='[1.7.2,1.7.3)',\
junit-platform-launcher;version='[1.7.2,1.7.3)',\
net.javacrumbs.json-unit.json-unit-assertj;version='[2.25.0,2.25.1)',\
net.javacrumbs.json-unit.json-unit-core;version='[2.25.0,2.25.1)',\
net.javacrumbs.json-unit.json-unit-json-path;version='[2.25.0,2.25.1)',\
@@ -98,11 +105,11 @@
org.apache.cxf.cxf-rt-rs-sse;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-security;version='[3.4.3,3.4.4)',\
org.apache.cxf.cxf-rt-transports-http;version='[3.4.3,3.4.4)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\
org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\
org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\
org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.http.jetty;version='[4.1.8,4.1.9)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.geronimo.specs.geronimo-annotation_1.3_spec;version='[1.3.0,1.3.1)',\
org.apache.geronimo.specs.geronimo-jaxrs_2.1_spec;version='[1.1.0,1.1.1)',\
@@ -125,6 +132,10 @@
org.yaml.snakeyaml;version='[1.27.0,1.27.1)',\
stax2-api;version='[4.2.1,4.2.2)'

blacklist.java.8.jaxb: osgi.identity;filter:='(osgi.identity=jakarta.xml.bind-api)'

-runblacklist: ${if;${is;${-runee};JavaSE-1.8};${blacklist.java.8.jaxb}}

-runstartlevel: \
order=sortbynameversion,\
begin=-1
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

Multi-Release: true

# No need to customise the import for JAX-B
@@ -15,8 +15,7 @@
# specific language governing permissions and limitations
# under the License.

Import-Package: \
javax.xml.bind;version="[2.3.0,3)",\
javax.xml.bind.annotation;version="[2.3.0,3)",\
javax.xml.bind.annotation.adapters;version="[2.3.0,3)",\
*
Multi-Release: true

# We have a wide range for JAX-B to run on Java 8
Import-Package: javax.xml.bind.*;version="${range;[0,+)}", *
@@ -34,6 +34,10 @@
<groupId>org.apache.aries.component-dsl</groupId>
<artifactId>org.apache.aries.component-dsl.component-dsl</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.aries.jax.rs</groupId>
<artifactId>org.apache.aries.jax.rs.openapi.resource</artifactId>
@@ -55,6 +59,21 @@
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>

<executions>
<execution>
<id>java-9-plus</id>
<phase>process-classes</phase>
<goals>
<goal>bnd-process</goal>
</goals>
<inherited>false</inherited>
<configuration>
<bndfile>bnd-java-9-plus.bnd</bndfile>
<manifestPath>${project.build.outputDirectory}/META-INF/versions/9/OSGI-INF/MANIFEST.MF</manifestPath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

0 comments on commit 4d32bec

Please sign in to comment.