-
Notifications
You must be signed in to change notification settings - Fork 875
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MailboxServiceShadedIT for shaded dropwizard deps (#1724)
* Don't load dropwizard dependency for shaded osgi tests * Remove com.codahale.metrics import from shaded jar manifest and add javax.management (required by dropwizard) * Separate osgi tests into shaded and non-shaded to each compile with respective version of driver-code * Move common osgi test harness to separate subproject, osgi-unshaded and osgi-shaded depend on osgi-common sources which they recompile with the respective version of the driver-core jar --------- Co-authored-by: Bret McGuire <bret.mcguire@datastax.com>
- Loading branch information
1 parent
e96d148
commit 4af251a
Showing
28 changed files
with
493 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- | ||
Copyright DataStax, Inc. | ||
Licensed 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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.datastax.cassandra</groupId> | ||
<artifactId>cassandra-driver-tests-osgi</artifactId> | ||
<version>3.11.5-SNAPSHOT</version> | ||
</parent> | ||
|
||
<packaging>jar</packaging> | ||
<artifactId>cassandra-driver-tests-osgi-common</artifactId> | ||
<name>DataStax Java Driver for Apache Cassandra Tests - OSGi - Shaded</name> | ||
<description>Common classes for testing DataStax Java Driver in an OSGi container.</description> | ||
|
||
<!-- | ||
This submodule holds the common test classes for the shaded and unshaded osgi tests. | ||
Since each testing submodule uses a different version of driver-core, each copies | ||
these common classes into it's build-dir and recompiles them with the correct driver | ||
artifact. This is required because MailboxImpl uses dropwizard classes that may or | ||
may not be shaded. In order for the shaded/unshaded classes on the classpath to match | ||
those referenced in the compiled .class files we need the correct driver-core | ||
dependency loaded at compile-time, hence why each submodule must recompile the common | ||
test code. | ||
--> | ||
|
||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
<!-- | ||
Copyright DataStax, Inc. | ||
Licensed 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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.datastax.cassandra</groupId> | ||
<artifactId>cassandra-driver-tests-osgi</artifactId> | ||
<version>3.11.5-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>cassandra-driver-tests-osgi-shaded</artifactId> | ||
<name>DataStax Java Driver for Apache Cassandra Tests - OSGi - Shaded</name> | ||
<description>A test for the shaded DataStax Java Driver in an OSGi container.</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.datastax.cassandra</groupId> | ||
<artifactId>cassandra-driver-core</artifactId> | ||
<!-- note we're depending on the *shaded* driver-core jar --> | ||
<classifier>shaded</classifier> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.github.jnr</groupId> | ||
<artifactId>jnr-ffi</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.github.jnr</groupId> | ||
<artifactId>jnr-posix</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<!-- copy over common submodule classes as we need to recompile them with the correct driver-core dependency --> | ||
<executions> | ||
<execution> | ||
<id>copy-common-sources</id> | ||
<phase>process-sources</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/dependency-sources/cassandra-driver-tests-osgi-common</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>../common/src/main/java/</directory> | ||
<includes> | ||
<include>**/*.*</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>copy-common-test-sources</id> | ||
<phase>process-test-sources</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/dependency-test-sources/cassandra-driver-tests-osgi-common</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>../common/src/test/java/</directory> | ||
<includes> | ||
<include>**/*.*</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>add-source</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${project.build.directory}/dependency-sources/cassandra-driver-tests-osgi-common</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>add-test-source</id> | ||
<phase>generate-test-sources</phase> | ||
<goals> | ||
<goal>add-test-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${project.build.directory}/dependency-test-sources/cassandra-driver-tests-osgi-common</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<configuration> | ||
<skip>${test.osgi.skip}</skip> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>bundle-manifest</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>manifest</goal> | ||
</goals> | ||
<configuration> | ||
<manifestLocation>${project.build.outputDirectory}/META-INF</manifestLocation> | ||
<instructions> | ||
<Bundle-SymbolicName>com.datastax.driver.osgi</Bundle-SymbolicName> | ||
<Export-Package>com.datastax.driver.osgi.api,!com.datastax.driver.osgi.impl</Export-Package> | ||
<Bundle-Activator>com.datastax.driver.osgi.impl.Activator</Bundle-Activator> | ||
<_include>-osgi.bnd</_include> | ||
</instructions> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ | |
# | ||
|
||
pax.exam.system=test | ||
pax.exam.logging=none | ||
pax.exam.logging=none |
File renamed without changes.
Oops, something went wrong.