Skip to content

Commit 84545bf

Browse files
committed
infra: convert nested libs to wrapped OSGi bundles
EclipseCS uses several external libraries, which are copied manually into the libs folder. Since everything else comes from the Eclipse target platform, those 3 libraries are easier to maintain by fetching them directly from maven and letting Eclipse PDE automatically wrap them into OSGi bundles. With that change in place, updating the external libraries is as easy as changing the version number in the .target file.
1 parent 538e4a7 commit 84545bf

File tree

9 files changed

+62
-34
lines changed

9 files changed

+62
-34
lines changed

net.sf.eclipsecs.core/.classpath

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
48
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
59
<accessrules>
610
<accessrule kind="accessible" pattern="com/puppycrawl/tools/checkstyle/meta/**"/>
711
</accessrules>
812
</classpathentry>
913
<classpathentry kind="src" path="src"/>
10-
<classpathentry exported="true" kind="lib" path="lib/dom4j-2.1.3.jar"/>
11-
<classpathentry exported="true" kind="lib" path="lib/snakeyaml-1.33.jar"/>
12-
<classpathentry exported="true" kind="lib" path="lib/javassist-3.28.0-GA.jar"/>
1314
<classpathentry kind="lib" path="lib/checkstyle-10.4-all.jar"/>
1415
<classpathentry kind="output" path="target/classes"/>
1516
</classpath>

net.sf.eclipsecs.core/META-INF/MANIFEST.MF

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ Bundle-SymbolicName: net.sf.eclipsecs.core;singleton:=true
55
Bundle-Version: 10.4.0.qualifier
66
Bundle-RequiredExecutionEnvironment: JavaSE-11
77
Bundle-ClassPath: .,
8-
lib/dom4j-2.1.3.jar,
9-
lib/snakeyaml-1.33.jar,
10-
lib/javassist-3.28.0-GA.jar,
118
lib/checkstyle-10.4-all.jar
129
Bundle-Activator: net.sf.eclipsecs.core.CheckstylePlugin
1310
Bundle-ActivationPolicy: lazy
@@ -25,7 +22,9 @@ Export-Package: net.sf.eclipsecs.core,
2522
net.sf.eclipsecs.core.projectconfig,
2623
net.sf.eclipsecs.core.projectconfig.filters,
2724
net.sf.eclipsecs.core.util
28-
Import-Package: org.eclipse.core.filebuffers,
25+
Import-Package: org.dom4j;version="2.1.3",
26+
org.dom4j.io;version="2.1.3",
27+
org.eclipse.core.filebuffers,
2928
org.eclipse.core.resources,
3029
org.eclipse.core.runtime,
3130
org.eclipse.core.runtime.jobs,
@@ -42,6 +41,7 @@ Import-Package: org.eclipse.core.filebuffers,
4241
org.eclipse.team.core.subscribers;resolution:=optional,
4342
org.eclipse.team.core.synchronize;resolution:=optional,
4443
org.osgi.framework,
45-
org.osgi.service.prefs
44+
org.osgi.service.prefs,
45+
org.yaml.snakeyaml;version="1.33.0"
4646
Automatic-Module-Name: net.sf.eclipsecs.core
4747

net.sf.eclipsecs.core/build.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ bin.includes = .,\
77
plugin.xml,\
88
schema/,\
99
core.properties,\
10-
lib/dom4j-2.1.3.jar,\
11-
lib/snakeyaml-1.33.jar,\
1210
lib/checkstyle-10.4-all.jar
1311

14-
source.. = src/
1512
javacDefaultEncoding.. = UTF-8
1613

-316 KB
Binary file not shown.
-832 KB
Binary file not shown.
-324 KB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?pde?>
3+
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4+
<target name="Eclipse Checkstyle" sequenceNumber="1668246028">
5+
<locations>
6+
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
7+
<unit id="org.eclipse.jdt.feature.group" version="3.18.500.v20200902-1800"/>
8+
<unit id="org.eclipse.sdk.ide" version="4.17.0.I20200902-1800"/>
9+
<unit id="org.eclipse.emf.feature.group" version="2.23.0.v20200822-0801"/>
10+
<repository location="https://download.eclipse.org/releases/2020-09/202009161000/"/>
11+
</location>
12+
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
13+
<unit id="org.junit.jupiter.api" version="5.6.0.v20200203-2009"/>
14+
<unit id="org.junit.jupiter.engine" version="5.6.0.v20200203-2009"/>
15+
<unit id="org.junit.jupiter.params" version="5.6.0.v20200203-2009"/>
16+
<unit id="org.junit.platform.commons" version="1.6.0.v20200203-2009"/>
17+
<unit id="org.junit.platform.engine" version="1.6.0.v20200203-2009"/>
18+
<unit id="org.junit.platform.launcher" version="1.6.0.v20200203-2009"/>
19+
<unit id="org.junit.platform.runner" version="1.6.0.v20200203-2009"/>
20+
<unit id="org.junit.platform.suite.api" version="1.6.0.v20200203-2009"/>
21+
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/>
22+
</location>
23+
</locations>
24+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
25+
</target>
Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
3-
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="Eclipse Checkstyle" sequenceNumber="1653761205">
5-
<locations>
6-
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
7-
<unit id="org.eclipse.jdt.feature.group" version="3.18.500.v20200902-1800"/>
8-
<unit id="org.eclipse.sdk.ide" version="4.17.0.I20200902-1800"/>
9-
<unit id="org.eclipse.emf.feature.group" version="2.23.0.v20200822-0801"/>
10-
<repository location="https://download.eclipse.org/releases/2020-09/202009161000/"/>
11-
</location>
12-
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
13-
<unit id="org.junit.jupiter.api" version="5.6.0.v20200203-2009"/>
14-
<unit id="org.junit.jupiter.engine" version="5.6.0.v20200203-2009"/>
15-
<unit id="org.junit.jupiter.params" version="5.6.0.v20200203-2009"/>
16-
<unit id="org.junit.platform.commons" version="1.6.0.v20200203-2009"/>
17-
<unit id="org.junit.platform.engine" version="1.6.0.v20200203-2009"/>
18-
<unit id="org.junit.platform.launcher" version="1.6.0.v20200203-2009"/>
19-
<unit id="org.junit.platform.runner" version="1.6.0.v20200203-2009"/>
20-
<unit id="org.junit.platform.suite.api" version="1.6.0.v20200203-2009"/>
21-
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/>
22-
</location>
23-
</locations>
3+
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --><target name="Eclipse Checkstyle" sequenceNumber="1653761205">
244
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
25-
</target>
5+
<locations>
6+
<location type="Target" uri="file:${project_loc:/net.sf.eclipsecs.core}/../net.sf.eclipsecs.target/net.sf.eclipsecs.partial.target"/>
7+
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
8+
<dependencies>
9+
<dependency>
10+
<groupId>org.dom4j</groupId>
11+
<artifactId>dom4j</artifactId>
12+
<version>2.1.3</version>
13+
<type>jar</type>
14+
</dependency>
15+
<dependency>
16+
<groupId>org.javassist</groupId>
17+
<artifactId>javassist</artifactId>
18+
<version>3.29.2-GA</version>
19+
<type>jar</type>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.yaml</groupId>
23+
<artifactId>snakeyaml</artifactId>
24+
<version>1.33</version>
25+
<type>jar</type>
26+
</dependency>
27+
</dependencies>
28+
</location>
29+
</locations>
30+
</target>

0 commit comments

Comments
 (0)