Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jakartified OSGi tests #4635

Merged
merged 3 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
<version>${osgi.service.cm.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.glassfish.main.ejb</groupId>
<artifactId>ejb-container</artifactId>
Expand Down Expand Up @@ -2071,6 +2078,7 @@
<opentracing.version>0.30.0</opentracing.version>
<osgi.version>6.0.0</osgi.version>
<osgi.compendium.version>5.0.0</osgi.compendium.version>
<osgi.service.cm.version>1.5.0</osgi.service.cm.version>
<pax.exam.version>4.13.2</pax.exam.version>
<pax.web.version>0.7.4</pax.web.version><!-- TODO: UPGRADE! -->
<paxexam.mvn.plugin.version>1.2.4</paxexam.mvn.plugin.version>
Expand Down
98 changes: 15 additions & 83 deletions tests/osgi/functional/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@
<artifactId>jakarta.annotation-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam</artifactId>
Expand Down Expand Up @@ -372,89 +387,6 @@
</dependencies>

<profiles>
<profile>
<id>testsSkipJdk8</id>
<activation>
<jdk>[1.8,11)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Exclude unit tests JSONP & MOXY for now -->
<excludes>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonMoxyTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonProcessingTest.java</exclude>
<!-- TODO remove after jakartification -->
<exclude>org/glassfish/jersey/osgi/test/basic/ApacheOsgiIntegrationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/BasicOsgiIntegrationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/BeanValidationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonJettisonTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/MultiPartTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/PackageScanningTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/ResourceBundleTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/SseTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/WebResourceFactoryTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk11dependency</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Exclude unit tests on jdk 11 for now -->
<excludes>
<exclude>org/glassfish/jersey/osgi/test/basic/ApacheOsgiIntegrationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/BasicOsgiIntegrationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/BeanValidationTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonJettisonTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonMoxyTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/JsonProcessingTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/MultiPartTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/PackageScanningTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/ResourceBundleTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/SseTest.java</exclude>
<exclude>org/glassfish/jersey/osgi/test/basic/WebResourceFactoryTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>testsSkipJdk6</id>
<activation>
<jdk>1.6</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/PackageScanningTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>sonar</id>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static Option[] configuration() {
final List<Option> options = Helper.getCommonOsgiOptions();
options.addAll(Helper.expandedList(
mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").versionAsInProject(),
mavenBundle().groupId("org.osgi").artifactId("org.osgi.service.cm").versionAsInProject(),
mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpcore-osgi").versionAsInProject(),
mavenBundle().groupId("org.apache.httpcomponents").artifactId("httpclient-osgi").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.connectors").artifactId("jersey-apache-connector")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public static Option[] configuration() {
mavenBundle().groupId("org.hibernate.validator").artifactId("hibernate-validator").versionAsInProject(),
mavenBundle().groupId("org.jboss.logging").artifactId("jboss-logging").versionAsInProject(),
mavenBundle().groupId("com.fasterxml").artifactId("classmate").versionAsInProject(),
mavenBundle().groupId("jakarta.el").artifactId("jakarta.el-api").versionAsInProject(),
mavenBundle().groupId("org.glassfish").artifactId("jakarta.el").versionAsInProject()

));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public static List<Option> getCommonOsgiOptions(final boolean includeJerseyJaxRs

// jakarta.annotation has to go first!
mavenBundle().groupId("jakarta.annotation").artifactId("jakarta.annotation-api").versionAsInProject(),
mavenBundle().groupId("jakarta.activation").artifactId("jakarta.activation-api").versionAsInProject(),
mavenBundle().groupId("jakarta.inject").artifactId("jakarta.inject-api").versionAsInProject(),
mavenBundle().groupId("jakarta.xml.bind").artifactId("jakarta.xml.bind-api").versionAsInProject(),
junitBundles(),

Expand Down