From 37171aef59b48be518f3d78361b0e893f666d092 Mon Sep 17 00:00:00 2001 From: Lars Martin Date: Tue, 29 Nov 2016 22:22:03 +0100 Subject: [PATCH 1/2] osgify artefact MANIFEST.MF (jar + sources) --- driver/osgi.bnd | 9 +++++++++ driver/pom.xml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 driver/osgi.bnd diff --git a/driver/osgi.bnd b/driver/osgi.bnd new file mode 100644 index 0000000000..4bd855ab52 --- /dev/null +++ b/driver/osgi.bnd @@ -0,0 +1,9 @@ +package-version=${version;===;${Bundle-Version}} + +Export-Package: \ + !*.internal.*, \ + *;version="${package-version}" + +Import-Package: \ + * + diff --git a/driver/pom.xml b/driver/pom.xml index 98ff214048..b20b1e3978 100644 --- a/driver/pom.xml +++ b/driver/pom.xml @@ -6,6 +6,8 @@ UTF-8 + ${project.groupId} + 'v'yyyyMMdd-HHmm @@ -115,6 +117,16 @@ jar + + + + ${project.name} (Source) + ${bundle.name}.source + ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${build.timestamp} + ${bundle.name};version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${build.timestamp}";roots:="." + + + @@ -144,6 +156,7 @@ true + ${project.build.outputDirectory}/META-INF/MANIFEST.MF org/neo4j/driver @@ -154,6 +167,47 @@ + + org.codehaus.mojo + build-helper-maven-plugin + 1.12 + + + set-osgi-version + validate + + parse-version + + + + + + org.apache.felix + maven-bundle-plugin + 3.2.0 + true + + + bundle-manifest + process-classes + + manifest + + + + + + ${bundle.name} + ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${build.timestamp} + <_snapshot>${maven.build.timestamp} + <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@))) + <_removeheaders>Bnd-*,Private-Package + <_nouses>true + + <_include>-osgi.bnd + + + org.apache.maven.plugins maven-surefire-plugin From d4116c050479d820e3c964ed0a4085ab5f58e30f Mon Sep 17 00:00:00 2001 From: Lars Martin Date: Wed, 30 Nov 2016 22:54:50 +0100 Subject: [PATCH 2/2] use groupId + artifactId as the Bundle-SymbolicName to match the name pattern as used in other Neo4j OSGi bundles --- driver/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/pom.xml b/driver/pom.xml index b20b1e3978..207b4403d0 100644 --- a/driver/pom.xml +++ b/driver/pom.xml @@ -6,7 +6,7 @@ UTF-8 - ${project.groupId} + ${project.groupId}.${project.artifactId} 'v'yyyyMMdd-HHmm