Skip to content

Commit 0676245

Browse files
BananeweizenCalixte
authored andcommitted
Simplify target platform editing
The nightly build of the TPD editor can meanwhile convert Maven coordinates from TPD to .target. Therefore we can simplify our target platform definition to use a single file again (instead of using nested target files, with one for Eclipse plugins and one for Maven libraries). There is no functional change, no version upgrades, really just simplifying how to write the target file.
1 parent c6ef26d commit 0676245

File tree

6 files changed

+162
-174
lines changed

6 files changed

+162
-174
lines changed

net.sf.eclipsecs.target/net.sf.eclipsecs.partial.eclipse.target

Lines changed: 0 additions & 29 deletions
This file was deleted.

net.sf.eclipsecs.target/net.sf.eclipsecs.partial.eclipse.tpd

Lines changed: 0 additions & 30 deletions
This file was deleted.

net.sf.eclipsecs.target/net.sf.eclipsecs.partial.maven.target

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 79 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,81 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
3-
<target name="Eclipse Checkstyle" sequenceNumber="1653761205">
4-
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
5-
<locations>
6-
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
7-
<repository location="https://download.eclipse.org/cbi/updates/license/"/>
8-
<unit id="org.eclipse.license.feature.group" version="0.0.0"/>
9-
</location>
10-
<location type="Target" uri="file:${project_loc:/net.sf.eclipsecs.core}/../net.sf.eclipsecs.target/net.sf.eclipsecs.partial.maven.target"/>
11-
<location type="Target" uri="file:${project_loc:/net.sf.eclipsecs.core}/../net.sf.eclipsecs.target/net.sf.eclipsecs.partial.eclipse.target"/>
12-
</locations>
13-
</target>
3+
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4+
<target name="Eclipse Checkstyle" sequenceNumber="1683469992">
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+
<unit id="org.eclipse.ecf" version="3.9.100.v20200611-2221"/>
11+
<unit id="org.eclipse.ecf.filetransfer" version="5.1.100.v20200611-2221"/>
12+
<unit id="org.eclipse.ecf.identity" version="3.9.400.v20200611-2221"/>
13+
<unit id="org.eclipse.ecf.provider.filetransfer" version="3.2.600.v20200611-2221"/>
14+
<repository location="https://download.eclipse.org/releases/2020-09/202009161000/"/>
15+
</location>
16+
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
17+
<unit id="org.junit.jupiter.api" version="5.6.0.v20200203-2009"/>
18+
<unit id="org.junit.jupiter.engine" version="5.6.0.v20200203-2009"/>
19+
<unit id="org.junit.jupiter.params" version="5.6.0.v20200203-2009"/>
20+
<unit id="org.junit.platform.commons" version="1.6.0.v20200203-2009"/>
21+
<unit id="org.junit.platform.engine" version="1.6.0.v20200203-2009"/>
22+
<unit id="org.junit.platform.launcher" version="1.6.0.v20200203-2009"/>
23+
<unit id="org.junit.platform.runner" version="1.6.0.v20200203-2009"/>
24+
<unit id="org.junit.platform.suite.api" version="1.6.0.v20200203-2009"/>
25+
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/>
26+
</location>
27+
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven" label="MavenDependencies">
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.dom4j</groupId>
31+
<artifactId>dom4j</artifactId>
32+
<version>2.1.3</version>
33+
<type>jar</type>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.javassist</groupId>
37+
<artifactId>javassist</artifactId>
38+
<version>3.29.2-GA</version>
39+
<type>jar</type>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.yaml</groupId>
43+
<artifactId>snakeyaml</artifactId>
44+
<version>1.33</version>
45+
<type>jar</type>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.jfree</groupId>
49+
<artifactId>jcommon</artifactId>
50+
<version>1.0.23</version>
51+
<type>jar</type>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.jfree</groupId>
55+
<artifactId>jfreechart</artifactId>
56+
<version>1.0.19</version>
57+
<type>jar</type>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.jfree</groupId>
61+
<artifactId>jfreechart-swt</artifactId>
62+
<version>1.0</version>
63+
<type>jar</type>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.jfree</groupId>
67+
<artifactId>swtgraphics2d</artifactId>
68+
<version>1.1.0</version>
69+
<type>jar</type>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.apache.commons</groupId>
73+
<artifactId>commons-lang3</artifactId>
74+
<version>3.12.0</version>
75+
<type>jar</type>
76+
</dependency>
77+
</dependencies>
78+
</location>
79+
</locations>
80+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
81+
</target>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Install https://download.eclipse.org/cbi/updates/tpd/nightly/latest to use this target definition.
2+
// Read https://github.com/eclipse-cbi/targetplatform-dsl for more details.
3+
target "Eclipse Checkstyle"
4+
with source configurePhase
5+
environment JavaSE-11
6+
7+
location "https://download.eclipse.org/releases/2020-09/202009161000/" {
8+
org.eclipse.jdt.feature.group
9+
org.eclipse.sdk.ide
10+
11+
// the following are not actually needed by eclipse-cs itself, but required to avoid
12+
// unresolved dependencies of platform bundles contained in the above features
13+
org.eclipse.emf.feature.group // e4.ui -> EMF
14+
org.eclipse.ecf // org.eclipse.platform -> P2 -> ECF
15+
org.eclipse.ecf.filetransfer
16+
org.eclipse.ecf.identity
17+
org.eclipse.ecf.provider.filetransfer
18+
}
19+
20+
// matching release of JUnit 5 from Eclipse Orbit
21+
location "https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository" {
22+
org.junit.jupiter.api
23+
org.junit.jupiter.engine
24+
org.junit.jupiter.params
25+
org.junit.platform.commons
26+
org.junit.platform.engine
27+
org.junit.platform.launcher
28+
org.junit.platform.runner
29+
org.junit.platform.suite.api
30+
}
31+
32+
// If the following part has errors and no syntax highlighting, then please use Help>About>Installation>Installed Software>Target Platform DSL>Uninstall.
33+
// After restarting please install the current version from the URL in line 1.
34+
maven MavenDependencies
35+
scope=compile
36+
dependencyDepth=none
37+
missingManifest=generate
38+
includeSources
39+
{
40+
dependency {
41+
groupId="org.dom4j"
42+
artifactId="dom4j"
43+
version="2.1.3"
44+
}
45+
dependency {
46+
groupId="org.javassist"
47+
artifactId="javassist"
48+
version="3.29.2-GA"
49+
}
50+
dependency {
51+
groupId="org.yaml"
52+
artifactId="snakeyaml"
53+
version="1.33"
54+
}
55+
dependency {
56+
groupId="org.jfree"
57+
artifactId="jcommon"
58+
version="1.0.23"
59+
}
60+
dependency {
61+
groupId="org.jfree"
62+
artifactId="jfreechart"
63+
version="1.0.19"
64+
}
65+
dependency {
66+
groupId="org.jfree"
67+
artifactId="jfreechart-swt"
68+
version="1.0"
69+
}
70+
dependency {
71+
groupId="org.jfree"
72+
artifactId="swtgraphics2d"
73+
version="1.1.0"
74+
}
75+
dependency {
76+
groupId="org.apache.commons"
77+
artifactId="commons-lang3"
78+
version="3.12.0"
79+
}
80+
}

net.sf.eclipsecs.target/readme.md

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Right now that is 2020-09 (since that is the first version officially running on
88

99
To use the target platform, these plugins must be installed in your Eclipse IDE:
1010
* [Eclipse M2E](https://marketplace.eclipse.org/content/eclipse-m2e-maven-support-eclipse-ide)
11-
* [Target Platform DSL](https://github.com/eclipse-cbi/targetplatform-dsl)
11+
* [Target Platform DSL](https://github.com/eclipse-cbi/targetplatform-dsl), must be from the nightly update site
1212

1313

1414
## How to use the target platform
@@ -29,55 +29,8 @@ which will lead to runtime errors for end users that are still on an old Eclipse
2929

3030
Target files are hard to maintain manually.
3131
Therefore we use a custom DSL to maintain most of the target platform, and to derive the `.target` file.
32-
However, that DSL based generation is not possible for the part of the target platform that shall include Maven coordinates.
33-
That's why the target platform is split over multiple files.
34-
The root target platform includes 2 child target platforms:
35-
* one containing all the Maven artifacts
36-
* one containing normal Eclipse plugins
37-
38-
The following is a PlantUML diagram of that structure:
39-
40-
```
41-
@startuml
42-
package "net.sf.eclipsecs.target.target" {
43-
[net.sf.eclipsecs.partial.maven.target] as maven
44-
[net.sf.eclipsecs.partial.eclipse.target] as eclipse
45-
}
46-
47-
note bottom of maven
48-
dependencies like in pom.xml
49-
from Maven Central
50-
end note
51-
note bottom of eclipse
52-
features/plugins from
53-
from eclipse.org update sites
54-
end note
55-
@enduml
56-
```
57-
58-
While that structure may look confusing at first glance, it simplifies the actual editing a lot,
59-
because you either only edit Maven coordinates or entries in the `.tpd` file.
60-
61-
### Eclipse plugins
62-
63-
Edit the `net.sf.eclipsecs.partial.eclipse.tpd` file.
64-
After saving use the context menu of the .tpd file to create a new version of the `net.sf.eclipsecs.partial.eclipse.target` file.
65-
66-
### Maven libraries
67-
68-
Meanwhile Eclipse PDE and Tycho can also use Maven libraries directly in the target platform
69-
(by automatically wrapping them into a generated OSGi bundle).
70-
Those libraries are contained in `net.sf.eclipsecs.partial.maven.target`.
71-
You can open that with a text editor and edit the Maven coordinates like in a `pom.xml`.
72-
73-
### Eclipse license entry
74-
75-
Unfortunately there is a [bug in Eclipse PDE when resolving target files](https://github.com/eclipse-pde/eclipse.pde/issues/558) that contain only nested target files.
76-
The issue leads to logging a (harmless) exception in the console when launching Eclipse-CS from the IDE.
77-
This is only relevant for Eclipse-CS developers, not Eclipse-CS users.
78-
The workaround is to simply add another (not nested) target location in the first position.
79-
Therefore this target contains a reference to the Eclipse license feature in the target platform.
80-
That license feature is not used anywhere.
32+
Edit the `net.sf.eclipsecs.target.tpd` file.
33+
After saving use the context menu of the .tpd file to create a new version of the `net.sf.eclipsecs.target.target` file.
8134

8235
## Committing changes
8336

0 commit comments

Comments
 (0)