Skip to content

Commit d28373e

Browse files
committed
Fixes for running in an OSGi environment
1 parent 2e2f312 commit d28373e

1 file changed

Lines changed: 76 additions & 29 deletions

File tree

pom.xml

Lines changed: 76 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,25 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5-
<packaging>bundle</packaging>
6-
<repositories>
7-
<repository>
8-
<id>jitpack.io</id>
9-
<url>https://jitpack.io</url>
10-
</repository>
11-
<repository>
12-
<snapshots>
13-
<enabled>false</enabled>
14-
</snapshots>
15-
<id>bintray-unitsofmeasurement-maven</id>
16-
<name>bintray</name>
17-
<url>http://dl.bintray.com/unitsofmeasurement/maven</url>
18-
</repository>
19-
</repositories>
205
<groupId>org.lemsml.exprparser</groupId>
216
<artifactId>org.lemsml.exprparser</artifactId>
227
<version>0.0.4</version>
8+
<packaging>bundle</packaging>
9+
<properties>
10+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11+
</properties>
2312
<dependencies>
2413
<dependency>
2514
<groupId>org.antlr</groupId>
26-
<artifactId>antlr4-maven-plugin</artifactId>
27-
<version>4.5.3</version>
15+
<artifactId>antlr4-runtime</artifactId>
16+
<version>4.7</version>
2817
</dependency>
2918
<dependency>
3019
<groupId>junit</groupId>
3120
<artifactId>junit</artifactId>
3221
<version>4.11</version>
3322
</dependency>
34-
<dependency>
35-
<groupId>javax.measure</groupId>
36-
<artifactId>unit-api</artifactId>
37-
<version>0.7</version>
38-
<type>jar</type>
39-
</dependency>
23+
4024
<dependency>
4125
<groupId>com.github.unitsofmeasurement</groupId>
4226
<artifactId>unit-ri</artifactId>
@@ -48,9 +32,20 @@
4832
<version>3.3.2</version>
4933
</dependency>
5034
</dependencies>
51-
<properties>
52-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
53-
</properties>
35+
<repositories>
36+
<repository>
37+
<id>jitpack.io</id>
38+
<url>https://jitpack.io</url>
39+
</repository>
40+
<repository>
41+
<snapshots>
42+
<enabled>false</enabled>
43+
</snapshots>
44+
<id>bintray-unitsofmeasurement-maven</id>
45+
<name>bintray</name>
46+
<url>http://dl.bintray.com/unitsofmeasurement/maven</url>
47+
</repository>
48+
</repositories>
5449
<build>
5550
<plugins>
5651
<plugin>
@@ -93,8 +88,7 @@
9388
<instructions>
9489
<Bundle-Name>${project.artifactId}-${project.version}</Bundle-Name>
9590
<Bundle-SymbolicName>${project.artifactId}-${project.version}</Bundle-SymbolicName>
96-
<Bundle-Version>0</Bundle-Version>
97-
91+
<Provide-Capability>osgi.ee;osgi.ee=JavaSE;version=1.7</Provide-Capability>
9892
</instructions>
9993
</configuration>
10094
</plugin>
@@ -123,9 +117,16 @@
123117
</configuration>
124118
</plugin>
125119
<plugin>
120+
<dependencies>
121+
<dependency>
122+
<groupId>org.antlr</groupId>
123+
<artifactId>antlr4-maven-plugin</artifactId>
124+
<version>4.7</version>
125+
</dependency>
126+
</dependencies>
126127
<groupId>org.antlr</groupId>
127128
<artifactId>antlr4-maven-plugin</artifactId>
128-
<version>4.5.3</version>
129+
<version>4.7</version>
129130
<configuration>
130131
<listener>false</listener>
131132
<visitor>true</visitor>
@@ -138,6 +139,52 @@
138139
</execution>
139140
</executions>
140141
</plugin>
142+
<plugin>
143+
<groupId>org.apache.maven.plugins</groupId>
144+
<artifactId>maven-dependency-plugin</artifactId>
145+
<configuration>
146+
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
147+
<includeScope>runtime</includeScope>
148+
<excludeScope>provided</excludeScope>
149+
</configuration>
150+
<executions>
151+
<execution>
152+
<id>copy-dependencies</id>
153+
<phase>generate-resources</phase>
154+
<goals>
155+
<goal>copy-dependencies</goal>
156+
</goals>
157+
</execution>
158+
</executions>
159+
</plugin>
141160
</plugins>
161+
<pluginManagement>
162+
<plugins>
163+
<plugin>
164+
<groupId>org.eclipse.m2e</groupId>
165+
<artifactId>lifecycle-mapping</artifactId>
166+
<version>1.0.0</version>
167+
<configuration>
168+
<lifecycleMappingMetadata>
169+
<pluginExecutions>
170+
<pluginExecution>
171+
<pluginExecutionFilter>
172+
<groupId>org.apache.maven.plugins</groupId>
173+
<artifactId>maven-dependency-plugin</artifactId>
174+
<versionRange>[2.0,)</versionRange>
175+
<goals>
176+
<goal>copy-dependencies</goal>
177+
</goals>
178+
</pluginExecutionFilter>
179+
<action>
180+
<ignore />
181+
</action>
182+
</pluginExecution>
183+
</pluginExecutions>
184+
</lifecycleMappingMetadata>
185+
</configuration>
186+
</plugin>
187+
</plugins>
188+
</pluginManagement>
142189
</build>
143190
</project>

0 commit comments

Comments
 (0)