Skip to content

Commit

Permalink
Cleanup used dependencies and streamline manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Läubrich committed Jul 7, 2024
1 parent e331f7c commit 52efd48
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 525 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/[email protected]
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build with Maven
Expand Down
64 changes: 21 additions & 43 deletions pax-jpa-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<packaging>pom</packaging>

<properties>
<bnd.version>6.4.0-SNAPSHOT</bnd.version>
<bnd.version>7.0.0</bnd.version>
<org.eclipse.osgi.version>3.17.200</org.eclipse.osgi.version>
<eclipselink.version>2.4.2</eclipselink.version>
</properties>
<repositories>
<repository>
Expand All @@ -21,19 +22,6 @@
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bnd-snapshots</id>
<url>https://bndtools.jfrog.io/bndtools/libs-snapshot/</url>
<layout>default</layout>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -85,35 +73,28 @@
<groupId>org.ops4j.pax.jpa</groupId>
<artifactId>pax-jpa</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.2_spec</artifactId>
<version>1.1</version>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jdbc</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<scope>provided</scope>
<version>${eclipselink.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
Expand All @@ -126,21 +107,23 @@
<artifactId>slf4j-simple</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
<version>1.6.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.test.cases.jpa</artifactId>
<version>8.0.0-SNAPSHOT</version>
<version>8.1.0</version>
<!-- <scope>runtime</scope>-->
<!-- See https://github.com/osgi/osgi/issues/731 -->
<exclusions>
<exclusion>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand All @@ -149,14 +132,9 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.function</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.promise</artifactId>
<version>1.2.0</version>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.5</version>
</dependency>
</dependencies>
</project>
43 changes: 36 additions & 7 deletions pax-jpa-tck/tck.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,62 @@
-runrequires.testcase: \
bnd.identity;id='org.osgi.test.cases.jpa'

-runee: JavaSE-11
-runee: JavaSE-17
-runfw: org.eclipse.osgi

-runrequires: \
bnd.identity;id='org.ops4j.pax.jpa',\
bnd.identity;id='slf4j.simple',\
bnd.identity;id='com.sun.xml.bind.jaxb-impl',\
bnd.identity;id='org.glassfish.hk2.osgi-resource-locator',\
bnd.identity;id='org.eclipse.persistence.jpa'
bnd.identity;id='org.eclipse.persistence.jpa', \
bnd.identity;id='com.sun.xml.bind.jaxb-impl'

-runbundles: \
assertj-core;version='[3.22.0,3.22.1)',\
assertj-core;version='[3.23.1,3.23.2)',\
com.sun.xml.bind.jaxb-core;version='[4.0.5,4.0.6)',\
com.sun.xml.bind.jaxb-impl;version='[4.0.5,4.0.6)',\
jakarta.activation-api;version='[2.1.0,2.1.1)',\
jakarta.xml.bind-api;version='[4.0.0,4.0.1)',\
javax.persistence;version='[2.0.5,2.0.6)',\
org.apache.geronimo.specs.geronimo-jpa_2.0_spec;version='[1.1.0,1.1.1)',\
net.bytebuddy.byte-buddy;version='[1.12.10,1.12.11)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)',\
org.eclipse.persistence.asm;version='[3.3.1,3.3.2)',\
org.eclipse.persistence.core;version='[2.4.2,2.4.3)',\
org.eclipse.persistence.jpa;version='[2.4.2,2.4.3)',\
org.glassfish.hk2.osgi-resource-locator;version='[2.4.0,2.4.1)',\
org.ops4j.pax.jpa;version='[1.0.0,1.0.1)',\
org.osgi.service.cm;version='[1.6.1,1.6.2)',\
org.osgi.service.jdbc;version='[1.0.0,1.0.1)',\
org.osgi.service.jpa;version='[1.1.1,1.1.2)',\
org.osgi.service.jdbc;version='[1.1.0,1.1.1)',\
org.osgi.test.cases.jpa;version='[8.1.0,8.1.1)',\
slf4j.api;version='[1.7.0,1.7.1)',\
slf4j.simple;version='[1.7.0,1.7.1)'
assertj-core;version='[3.20.2,3.20.3)',\
jakarta.activation-api;version='[2.1.0,2.1.1)',\
jakarta.xml.bind-api;version='[4.0.0,4.0.1)',\
javax.persistence;version='[2.0.5,2.0.6)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)',\
org.eclipse.persistence.asm;version='[3.3.1,3.3.2)',\
org.eclipse.persistence.core;version='[2.4.2,2.4.3)',\
org.eclipse.persistence.jpa;version='[2.4.2,2.4.3)',\
org.glassfish.hk2.osgi-resource-locator;version='[2.4.0,2.4.1)',\
org.ops4j.pax.jpa;version='[1.0.0,1.0.1)',\
org.osgi.service.cm;version='[1.6.1,1.6.2)',\
org.osgi.service.jdbc;version='[1.1.0,1.1.1)',\
org.osgi.test.cases.jpa;version='[8.0.0,8.0.1)',\
slf4j.api;version='[1.7.0,1.7.1)',\
slf4j.simple;version='[1.7.0,1.7.1)'
assertj-core;version='[3.20.2,3.20.3)',\
jakarta.activation-api;version='[2.1.0,2.1.1)',\
jakarta.xml.bind-api;version='[4.0.0,4.0.1)',\
javax.persistence;version='[2.0.5,2.0.6)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)',\
org.eclipse.persistence.asm;version='[3.3.1,3.3.2)',\
org.eclipse.persistence.core;version='[2.4.2,2.4.3)',\
org.eclipse.persistence.jpa;version='[2.4.2,2.4.3)',\
org.glassfish.hk2.osgi-resource-locator;version='[2.4.0,2.4.1)',\
org.ops4j.pax.jpa;version='[1.0.0,1.0.1)',\
org.osgi.service.cm;version='[1.6.1,1.6.2)',\
org.osgi.service.jdbc;version='[1.1.0,1.1.1)',\
org.osgi.test.cases.jpa;version='[8.0.0,8.0.1)',\
slf4j.api;version='[1.7.0,1.7.1)',\
slf4j.simple;version='[1.7.0,1.7.1)'
126 changes: 75 additions & 51 deletions pax-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,85 +10,116 @@
</parent>
<groupId>org.ops4j.pax.jpa</groupId>
<artifactId>pax-jpa</artifactId>
<packaging>bundle</packaging>
<packaging>jar</packaging>
<name>OPS4J::Pax::JPA::Extender</name>

<properties>
<bundle.symbolicName>org.ops4j.pax.jpa</bundle.symbolicName>
<bundle.namespace>org.ops4j.pax.jpa</bundle.namespace>
<jaxb.version />
</properties>

<dependencies>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<version>7.0.0</version>
<scope>provided</scope>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- junit dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<scope>test</scope>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jdbc</artifactId>
<scope>provided</scope>
</dependency>
<!-- osgi mock -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.osgi-mock.junit5</artifactId>
<version>3.2.2</version>
<scope>test</scope>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>7.0.0</version>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
<configuration>
<bnd>
<![CDATA[
Bundle-Activator: org.ops4j.pax.jpa.impl.PaxJPA
Bundle-SymbolicName: org.ops4j.pax.jpa
Import-Package: javax.persistence.*;version="[1.1,3)", org.slf4j;version="[1.7,3)", org.osgi.service.jdbc;version="[1,2)", *
Export-Package: org.ops4j.pax.jpa;version="1.0.0", org.osgi.service.jpa;version="1.1.1";uses:="javax.persistence,org.osgi.framework",org.osgi.service.jpa.annotations;version="1.1"
Bundle-DocURL: ${pax.jpa.wiki.url}
Bundle-Description: ${project.name}
Bundle-License: "Apache License, Version 2.0";link="http://www.apache.org/licenses/LICENSE-2.0"
Provide-Capability: osgi.extender;osgi.extender="osgi.jpa";version:Version="1.1";uses:="org.osgi.service.jpa,javax.persistence
-includeresource: org.osgi.service.jpa.jar=target/dependency/org.osgi.service.jpa.jar;lib:=true
]]>
</bnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>org.ops4j.pax.jpa</Bundle-SymbolicName>
<Bundle-Activator>org.ops4j.pax.jpa.impl.PaxJPA</Bundle-Activator>
<Export-Package>org.ops4j.pax.jpa</Export-Package>
<Import-Package>
javax.persistence.*;version=2.0,
*
</Import-Package>
<Provide-Capability>osgi.extender;osgi.extender="osgi.jpa";version:Version="1.1";uses:="org.osgi.service.jpa,javax.persistence"</Provide-Capability>
</instructions>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>com.evolvedbinary.maven.mojohaus</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>3.0.0</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Due to https://github.com/osgi/osgi/issues/731 we need to embedd and reexport this here -->
<artifactItem>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jpa</artifactId>
<destFileName>org.osgi.service.jpa.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>xsd-to-java</id>
Expand All @@ -101,13 +132,6 @@
<xsdPathWithinArtifact>META-INF/JAXB/xsd</xsdPathWithinArtifact>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<forkMode>always</forkMode>
</configuration>
</plugin>
</plugins>
</build>
</project>
3 changes: 3 additions & 0 deletions pax-jpa/src/main/java/org/ops4j/pax/jpa/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("1.0.0")
package org.ops4j.pax.jpa;
Loading

0 comments on commit 52efd48

Please sign in to comment.