Skip to content

Commit

Permalink
Issue #225: Improve deployment in OSGi environments
Browse files Browse the repository at this point in the history
- Update to UIMA Parent POM 16-SNAPSHOT
- Add OSGi metadata to several modules using the maven-bundle-plugin
  • Loading branch information
rec-averbis committed Jul 28, 2022
1 parent a79b9ab commit 68a8e28
Show file tree
Hide file tree
Showing 11 changed files with 239 additions and 140 deletions.
Empty file.
64 changes: 43 additions & 21 deletions jVinci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,51 @@
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>org.apache.uima</groupId>
<artifactId>uimaj-parent</artifactId>
<version>3.4.0-SNAPSHOT</version>
<relativePath>../uimaj-parent/pom.xml</relativePath>
</parent>

<artifactId>jVinci</artifactId>
<packaging>jar</packaging>
<name>Apache UIMA Base: ${project.artifactId}: Vinci Transport Library</name>
<description>This is a protocol used by the base UIMA Collection processing manager for supporting
<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>org.apache.uima</groupId>
<artifactId>uimaj-parent</artifactId>
<version>3.4.0-SNAPSHOT</version>
<relativePath>../uimaj-parent/pom.xml</relativePath>
</parent>

<artifactId>jVinci</artifactId>
<packaging>bundle</packaging>

<name>Apache UIMA Base: ${project.artifactId}: Vinci Transport Library</name>
<description>This is a protocol used by the base UIMA Collection processing manager for supporting
networked deployment. See UIMA-AS as a more modern alternative supporting
more standard protocols.</description>
<url>${uimaWebsiteUrl}</url>
<url>${uimaWebsiteUrl}</url>

<properties>
<postNoticeText>${ibmNoticeText}</postNoticeText>
</properties>

<properties>
<postNoticeText>${ibmNoticeText}</postNoticeText>
</properties>
<build>
<finalName>jVinci</finalName>

<build>
<finalName>jVinci</finalName>
</build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Export-Package>
org.apache.vinci.debug,
org.apache.vinci.transport,
org.apache.vinci.transport.*
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Empty file.
30 changes: 29 additions & 1 deletion uimaj-adapter-vinci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
</parent>

<artifactId>uimaj-adapter-vinci</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Apache UIMA Base: ${project.artifactId}: Vinci Adapter</name>
<description>Provides the capability to connect to a remote analysis
engine, using the Vinci protocol</description>
Expand Down Expand Up @@ -71,5 +72,32 @@

<build>
<finalName>uima-adapter-vinci</finalName>

<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
!org.apache.uima.adapter.vinci,
!org.apache.uima.adapter.vinci.*,
!com.apple.eio,
org.slf4j.impl;resolution:=optional,
org.apache.logging.log4j.*;resolution:=optional,
org.apache.logging.slf4j.*;resolution:=optional,
*
</Import-Package>
<Export-Package>
org.apache.uima.adapter.vinci,
org.apache.uima.adapter.vinci.*
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Empty file.
78 changes: 33 additions & 45 deletions uimaj-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
</parent>

<artifactId>uimaj-core</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>

<name>Apache UIMA Base: ${project.artifactId}</name>
<description>The core implementation of the UIMA Java Framework</description>
<url>${uimaWebsiteUrl}</url>
Expand Down Expand Up @@ -151,7 +152,6 @@
5 work when run separately or by mvn, but fail when running all tests from Eclipse:
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '....'
-->

<!--
<dependency>
<groupId>net.sf.saxon</groupId>
Expand All @@ -163,55 +163,18 @@
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
<scope>test</scope>
<artifactId>saxon</artifactId>
<version>8.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
<scope>test</scope>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
<scope>test</scope>
</dependency>
-->

<!-- For decompiling recompiling jcas experiments -->
<!--
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.4.2</version>
</dependency>
-->

<!-- needed for UimaDecompiler class-->
<dependency> <!-- Apache v2 license 2016 checked -->
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-compilertools</artifactId>
<version>0.5.32</version>
</dependency>

<!-- Apache v2 license 2016 checked. Also transitive include from above,
listed here so that binary assembly for distribution includes the jar -->
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-core</artifactId>
<version>0.5.32</version>
</dependency>

<!-- for reading / transforming / generating JCas cover classes -->
<!-- <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.4</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>5.0.4</version>
</dependency>
-->
</dependencies>

<build>
Expand Down Expand Up @@ -290,6 +253,31 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
!org.apache.uima,
!org.apache.uima.*,
!com.apple.eio,
org.slf4j.impl;resolution:=optional,
org.apache.logging.log4j.*;resolution:=optional,
org.apache.logging.slf4j.*;resolution:=optional,
*
</Import-Package>
<Export-Package>
org.apache.uima,
org.apache.uima.*
</Export-Package>
</instructions>
</configuration>
</plugin>

<!-- experiment with CLIRR
gets fatal error:
Expand Down
Empty file.
26 changes: 26 additions & 0 deletions uimaj-cpe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
</parent>

<artifactId>uimaj-cpe</artifactId>
<packaging>bundle</packaging>

<name>Apache UIMA Base: ${project.artifactId}: Collection Processing Engine</name>
<description>The implementation of a simple scaleout capability, called
the Collection Processing Engine. New implementations may find
Expand Down Expand Up @@ -92,5 +94,29 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
!org.apache.uima.collection.impl.metadata.cpe,
!com.apple.eio,
org.slf4j.impl;resolution:=optional,
org.apache.logging.log4j.*;resolution:=optional,
org.apache.logging.slf4j.*;resolution:=optional,
*
</Import-Package>
<Export-Package>
org.apache.uima.collection.impl.metadata.cpe
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
10 changes: 8 additions & 2 deletions uimaj-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<groupId>org.apache.uima</groupId>
<artifactId>parent-pom</artifactId>
<relativePath />
<version>15</version>
<version>16-SNAPSHOT</version>
</parent>

<artifactId>uimaj-parent</artifactId>
Expand Down Expand Up @@ -270,10 +270,16 @@
<!-- See: https://issues.apache.org/jira/browse/UIMA-6349 -->
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.15.3</version>
<version>0.15.7</version>
<configuration>
<newVersion>
<file>
<path>${project.build.directory}/${project.build.finalName}.jar</path>
</file>
</newVersion>
<parameter>
<ignoreMissingClassesByRegularExpressions>
<ignoreMissingClassesByRegularExpression>com\.strobel\..*</ignoreMissingClassesByRegularExpression>
<ignoreMissingClassesByRegularExpression>org\.apache\.logging\.log4j\..*</ignoreMissingClassesByRegularExpression>
</ignoreMissingClassesByRegularExpressions>
</parameter>
Expand Down
Empty file.
Loading

0 comments on commit 68a8e28

Please sign in to comment.