summaryrefslogtreecommitdiffstats
path: root/container-spifly
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2022-06-07 16:26:34 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2022-06-08 13:44:26 +0200
commit2af24a81aa7c2351e6e2a7dd22419dd65b0be79b (patch)
treea1e107b7d680f09047f474c3aecf446d8c94241c /container-spifly
parent5b69de35fb321ccd52757f4dac75df52f1c711d8 (diff)
Package spifly and asm dependencies into container-spifly bundle
Diffstat (limited to 'container-spifly')
-rw-r--r--container-spifly/.gitignore1
-rw-r--r--container-spifly/CMakeLists.txt2
-rw-r--r--container-spifly/README.md1
-rw-r--r--container-spifly/pom.xml105
4 files changed, 109 insertions, 0 deletions
diff --git a/container-spifly/.gitignore b/container-spifly/.gitignore
new file mode 100644
index 00000000000..916e17c097a
--- /dev/null
+++ b/container-spifly/.gitignore
@@ -0,0 +1 @@
+dependency-reduced-pom.xml
diff --git a/container-spifly/CMakeLists.txt b/container-spifly/CMakeLists.txt
new file mode 100644
index 00000000000..cd4b4a43488
--- /dev/null
+++ b/container-spifly/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+install_jar(container-spifly.jar)
diff --git a/container-spifly/README.md b/container-spifly/README.md
new file mode 100644
index 00000000000..4477c6dabb9
--- /dev/null
+++ b/container-spifly/README.md
@@ -0,0 +1 @@
+Repackaging of SPIFly with ASM embedded
diff --git a/container-spifly/pom.xml b/container-spifly/pom.xml
new file mode 100644
index 00000000000..19051999aaf
--- /dev/null
+++ b/container-spifly/pom.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>container-spifly</artifactId>
+ <packaging>jar</packaging>
+ <parent>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>parent</artifactId>
+ <version>7-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <properties>
+ <relocation-pkg-prefix>com.yahoo.vespa.spifly.repackaged</relocation-pkg-prefix>
+ </properties>
+
+ <dependencies>
+ <!-- Required for ServiceLoader to function in OSGi environment. ServiceLoader is used by Jetty -->
+ <dependency>
+ <groupId>org.apache.aries.spifly</groupId>
+ <artifactId>org.apache.aries.spifly.dynamic.bundle</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <minimizeJar>false</minimizeJar>
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>module-info.class</exclude>
+ <exclude>META-INF/*</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <relocations>
+ <relocation>
+ <pattern>org.apache.aries.spifly</pattern>
+ <shadedPattern>${relocation-pkg-prefix}.spifly</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>aQute</pattern>
+ <shadedPattern>${relocation-pkg-prefix}.aQute</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.objectweb.asm</pattern>
+ <shadedPattern>${relocation-pkg-prefix}.asm</shadedPattern>
+ </relocation>
+ </relocations>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Bundle-Name>container-spifly</Bundle-Name>
+ <Bundle-SymbolicName>container-spifly</Bundle-SymbolicName>
+ <Bundle-Version>${spifly.version}</Bundle-Version>
+ <Export-Package>
+ ${relocation-pkg-prefix}.spifly;version="${spifly.version}",
+ ${relocation-pkg-prefix}.spifly.dynamic;version="${spifly.version}",
+ ${relocation-pkg-prefix}.spifly.weaver;version="${spifly.version}"
+ </Export-Package>
+ <Import-Package>
+ org.osgi.framework;version="[1.7,2)",
+ org.osgi.framework.hooks.weaving;version="[1.0,2)",
+ org.osgi.framework.wiring;version="[1.1,2)",
+ org.osgi.util.tracker;version="[1.5,2)"
+ </Import-Package>
+ <Require-Capability>osgi.ee</Require-Capability>
+ <Provide-Capability>
+ osgi.extender;osgi.extender="osgi.serviceloader.registrar";version:Version="1.0",
+ osgi.extender;osgi.extender="osgi.serviceloader.processor";version:Version="1.0";uses:="${relocation-pkg-prefix}.spifly"
+ </Provide-Capability>
+ <Bundle-Activator>
+ ${relocation-pkg-prefix}.spifly.dynamic.DynamicWeavingActivator
+ </Bundle-Activator>
+ </manifestEntries>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>