Skip to content

Commit 1c787ff

Browse files
committed
Bump tycho from 1.7.0 to 2.3.0
This requires to use toolchains
1 parent fdff154 commit 1c787ff

File tree

5 files changed

+84
-7
lines changed

5 files changed

+84
-7
lines changed

.ci/build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ SCRIPT_INCLUDES="log.bash utils.bash setup-secrets.bash openjdk.bash maven.bash
88
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
99

1010
function build() {
11-
pmd_ci_log_group_start "Install OpenJDK"
11+
pmd_ci_log_group_start "Install OpenJDK 8+11"
1212
pmd_ci_openjdk_install_adoptopenjdk 8
13-
pmd_ci_openjdk_setdefault 8
13+
pmd_ci_openjdk_install_adoptopenjdk 11
14+
pmd_ci_openjdk_setdefault 11
1415
pmd_ci_log_group_end
1516

1617
pmd_ci_log_group_start "Install xvfb"
@@ -26,7 +27,9 @@ function build() {
2627

2728
if pmd_ci_utils_is_fork_or_pull_request; then
2829
pmd_ci_log_group_start "Build with mvnw"
29-
xvfb-run --auto-servernum ./mvnw clean verify --show-version --errors --batch-mode --no-transfer-progress
30+
xvfb-run --auto-servernum ./mvnw clean verify \
31+
--show-version --errors --batch-mode --no-transfer-progress \
32+
--toolchains .ci/files/toolchains.xml
3033
pmd_ci_log_group_end
3134
exit 0
3235
fi
@@ -59,6 +62,7 @@ function snapshot_build() {
5962
# Build
6063
xvfb-run --auto-servernum ./mvnw clean verify --show-version --errors --batch-mode \
6164
--no-transfer-progress \
65+
--toolchains .ci/files/toolchains.xml \
6266
--activate-profiles sign
6367

6468
# Upload update site to sourceforge
@@ -109,6 +113,7 @@ function release_build() {
109113
# Build
110114
xvfb-run --auto-servernum ./mvnw clean verify --show-version --errors --batch-mode \
111115
--no-transfer-progress \
116+
--toolchains .ci/files/toolchains.xml \
112117
--activate-profiles sign
113118
pmd_ci_log_group_end
114119

.ci/files/toolchains.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF8"?>
2+
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
5+
<!-- JDK toolchains: https://maven.apache.org/guides/mini/guide-using-toolchains.html -->
6+
<toolchain>
7+
<type>jdk</type>
8+
<provides>
9+
<version>1.8</version>
10+
<vendor>openjdk</vendor>
11+
<id>JavaSE-1.8</id>
12+
</provides>
13+
<configuration>
14+
<jdkHome>${env.HOME}/openjdk8</jdkHome>
15+
</configuration>
16+
</toolchain>
17+
<toolchain>
18+
<type>jdk</type>
19+
<provides>
20+
<version>11</version>
21+
<vendor>openjdk</vendor>
22+
<id>JavaSE-11</id>
23+
</provides>
24+
<configuration>
25+
<jdkHome>${env.HOME}/openjdk11</jdkHome>
26+
</configuration>
27+
</toolchain>
28+
</toolchains>

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,18 @@ the repository on github and create pull requests. Any contributions are welcome
1919

2020

2121
### Testing the latest version
22-
Simply build the plugin locally using maven:
22+
23+
The plugin builds with Java 11 but also requires Java 8. This is achieved through
24+
[maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
25+
You can use [toolchains.xml](.ci/files/toolchains.xml) from this repo to
26+
configure your own `toolchains.xml` file.
27+
28+
Then simply build the plugin locally using maven:
2329

2430
./mvnw clean verify
2531

26-
You'll find the zipped update site in the folder `net.sourceforge.pmd.eclipse.p2updatesite/target/`. Point eclipse to the zip file in this folder as an update-site and install the
32+
You'll find the zipped update site in the folder `net.sourceforge.pmd.eclipse.p2updatesite/target/`.
33+
Point eclipse to the zip file in this folder as an update-site and install the
2734
latest SNAPSHOT version.
2835

2936

net.sourceforge.pmd.eclipse.plugin.test/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@
2626
<useUIHarness>true</useUIHarness>
2727
<showEclipseLog>true</showEclipseLog>
2828
<trimStackTrace>false</trimStackTrace>
29+
<!-- http://wiki.eclipse.org/Eclipse4/RCP/FAQ#Why_won.27t_my_application_start.3F -->
30+
<bundleStartLevel>
31+
<bundle>
32+
<id>org.eclipse.core.runtime</id>
33+
<level>2</level>
34+
<autoStart>true</autoStart>
35+
</bundle>
36+
<bundle>
37+
<id>org.eclipse.equinox.ds</id>
38+
<level>3</level>
39+
<autoStart>true</autoStart>
40+
</bundle>
41+
<bundle>
42+
<id>org.eclipse.equinox.event</id>
43+
<level>3</level>
44+
<autoStart>true</autoStart>
45+
</bundle>
46+
</bundleStartLevel>
2947
</configuration>
3048
</plugin>
3149
<plugin>

pom.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<target.platform>kepler</target.platform>
2020
<orbit.version>R20140114142710</orbit.version>
2121

22-
<tycho.version>1.7.0</tycho.version>
22+
<tycho.version>2.3.0</tycho.version>
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<pmd.version>6.33.0</pmd.version>
2525
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
@@ -127,8 +127,27 @@
127127
<artifactId>maven-checkstyle-plugin</artifactId>
128128
<!-- configuration is in plugin management section -->
129129
</plugin>
130-
</plugins>
131130

131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-toolchains-plugin</artifactId>
134+
<version>3.0.0</version>
135+
<configuration>
136+
<toolchains>
137+
<jdk>
138+
<id>JavaSE-1.8</id>
139+
</jdk>
140+
</toolchains>
141+
</configuration>
142+
<executions>
143+
<execution>
144+
<goals>
145+
<goal>toolchain</goal>
146+
</goals>
147+
</execution>
148+
</executions>
149+
</plugin>
150+
</plugins>
132151
<pluginManagement>
133152
<plugins>
134153
<plugin>

0 commit comments

Comments
 (0)