Skip to content

Commit eb2e56d

Browse files
committed
Project setup for github actions
1 parent 4856d7d commit eb2e56d

File tree

13 files changed

+230
-178
lines changed

13 files changed

+230
-178
lines changed

.github/workflows/maven.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# This workflow will build a Java project with Maven
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3-
4-
name: Java 11 build
1+
name: CI build
52

63
on:
74
push:
@@ -10,7 +7,22 @@ on:
107
branches: [ master ]
118

129
jobs:
13-
build:
10+
11+
build8:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: '8'
21+
distribution: 'adopt'
22+
- name: Build with Maven
23+
run: mvn -B package --file pom.xml -DdisableToolchain
24+
25+
build11:
1426

1527
runs-on: ubuntu-latest
1628

@@ -22,4 +34,18 @@ jobs:
2234
java-version: '11'
2335
distribution: 'adopt'
2436
- name: Build with Maven
25-
run: mvn -B package --file pom.xml
37+
run: mvn -B package --file pom.xml -DdisableToolchain
38+
39+
build15:
40+
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Set up JDK 15
46+
uses: actions/setup-java@v2
47+
with:
48+
java-version: '15'
49+
distribution: 'adopt'
50+
- name: Build with Maven
51+
run: mvn -B help:active-profiles && mvn -B package --file pom.xml -DdisableToolchain

bstub/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@
9696

9797
<build>
9898
<plugins>
99-
<plugin>
100-
<groupId>org.apache.maven.plugins</groupId>
101-
<artifactId>maven-compiler-plugin</artifactId>
102-
<configuration>
103-
<source>1.6</source>
104-
<target>1.6</target>
105-
</configuration>
106-
</plugin>
10799
<plugin>
108100
<groupId>org.apache.maven.plugins</groupId>
109101
<artifactId>maven-shade-plugin</artifactId>

gcflow/pom.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,5 @@
5454
<scope>test</scope>
5555
</dependency>
5656
</dependencies>
57-
<build>
58-
<plugins>
59-
<plugin>
60-
<groupId>org.apache.maven.plugins</groupId>
61-
<artifactId>maven-compiler-plugin</artifactId>
62-
<configuration>
63-
<source>1.6</source>
64-
<target>1.6</target>
65-
</configuration>
66-
</plugin>
67-
</plugins>
68-
</build>
57+
6958
</project>

mxdump/pom.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,5 @@
5252
<scope>test</scope>
5353
</dependency>
5454
</dependencies>
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>org.apache.maven.plugins</groupId>
59-
<artifactId>maven-compiler-plugin</artifactId>
60-
<configuration>
61-
<source>1.6</source>
62-
<target>1.6</target>
63-
</configuration>
64-
</plugin>
65-
</plugins>
66-
</build>
55+
6756
</project>

pom.xml

Lines changed: 132 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -170,32 +170,9 @@
170170

171171
<build>
172172

173-
<plugins>
174-
<!-- SJK is 1.6 compatible -->
175-
<plugin>
176-
<groupId>org.apache.maven.plugins</groupId>
177-
<artifactId>maven-toolchains-plugin</artifactId>
178-
<version>1.1</version>
179-
<executions>
180-
<execution>
181-
<goals>
182-
<goal>toolchain</goal>
183-
</goals>
184-
</execution>
185-
</executions>
186-
<configuration>
187-
<toolchains>
188-
<jdk>
189-
<version>1.6</version>
190-
<vendor>sun</vendor>
191-
</jdk>
192-
</toolchains>
193-
</configuration>
194-
</plugin>
195-
</plugins>
196-
197173
<pluginManagement>
198174
<plugins>
175+
199176
<plugin>
200177
<groupId>org.apache.maven.plugins</groupId>
201178
<artifactId>maven-compiler-plugin</artifactId>
@@ -215,11 +192,13 @@
215192
<pushChanges>true</pushChanges>
216193
</configuration>
217194
</plugin>
195+
218196
<plugin>
219197
<groupId>org.apache.maven.plugins</groupId>
220198
<artifactId>maven-surefire-plugin</artifactId>
221199
<version>2.22.2</version>
222200
</plugin>
201+
223202
<plugin>
224203
<groupId>org.apache.maven.plugins</groupId>
225204
<artifactId>maven-javadoc-plugin</artifactId>
@@ -233,6 +212,7 @@
233212
</execution>
234213
</executions>
235214
</plugin>
215+
236216
<plugin>
237217
<groupId>org.apache.maven.plugins</groupId>
238218
<artifactId>maven-source-plugin</artifactId>
@@ -246,6 +226,7 @@
246226
</execution>
247227
</executions>
248228
</plugin>
229+
249230
<plugin>
250231
<groupId>org.apache.maven.plugins</groupId>
251232
<artifactId>maven-resources-plugin</artifactId>
@@ -254,11 +235,13 @@
254235
<encoding>UTF-8</encoding>
255236
</configuration>
256237
</plugin>
238+
257239
<plugin>
258240
<groupId>org.apache.maven.plugins</groupId>
259241
<artifactId>maven-deploy-plugin</artifactId>
260242
<version>2.8.2</version>
261243
</plugin>
244+
262245
<plugin>
263246
<groupId>org.apache.maven.plugins</groupId>
264247
<artifactId>maven-jar-plugin</artifactId>
@@ -275,6 +258,7 @@
275258
<artifactId>formatter-maven-plugin</artifactId>
276259
<version>2.11.0</version>
277260
</plugin>
261+
278262
<plugin>
279263
<groupId>com.diffplug.spotless</groupId>
280264
<artifactId>spotless-maven-plugin</artifactId>
@@ -313,4 +297,128 @@
313297
</plugins>
314298
</pluginManagement>
315299
</build>
300+
301+
<profiles>
302+
303+
<profile>
304+
<id>spotless-check</id>
305+
306+
<activation>
307+
<property>
308+
<name>!disableToolchain</name>
309+
</property>
310+
</activation>
311+
312+
<build>
313+
<plugins>
314+
<plugin>
315+
<groupId>com.diffplug.spotless</groupId>
316+
<artifactId>spotless-maven-plugin</artifactId>
317+
<executions>
318+
<execution>
319+
<id>spotless-check</id>
320+
<goals>
321+
<goal>check</goal>
322+
</goals>
323+
<phase>validate</phase>
324+
</execution>
325+
</executions>
326+
</plugin>
327+
</plugins>
328+
</build>
329+
330+
</profile>
331+
332+
<profile>
333+
<id>enable-toolchain</id>
334+
335+
<activation>
336+
<property>
337+
<name>!disableToolchain</name>
338+
</property>
339+
</activation>
340+
341+
<build>
342+
<plugins>
343+
<!-- SJK is 1.6 compatible -->
344+
<plugin>
345+
<groupId>org.apache.maven.plugins</groupId>
346+
<artifactId>maven-toolchains-plugin</artifactId>
347+
<version>1.1</version>
348+
<executions>
349+
<execution>
350+
<goals>
351+
<goal>toolchain</goal>
352+
</goals>
353+
</execution>
354+
</executions>
355+
<configuration>
356+
<toolchains>
357+
<jdk>
358+
<version>1.6</version>
359+
<vendor>sun</vendor>
360+
</jdk>
361+
</toolchains>
362+
</configuration>
363+
</plugin>
364+
</plugins>
365+
</build>
366+
</profile>
367+
368+
<profile>
369+
<id>fix-surefire</id>
370+
371+
<activation>
372+
<jdk>[11,1000)</jdk>
373+
</activation>
374+
375+
<build>
376+
<pluginManagement>
377+
<plugins>
378+
379+
<plugin>
380+
<!-- Since Java 11 surefire is broken due to text leaking in std out, here is remedy for that. -->
381+
<groupId>org.apache.maven.plugins</groupId>
382+
<artifactId>maven-surefire-plugin</artifactId>
383+
<version>3.0.0-M5</version>
384+
<configuration>
385+
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
386+
<!-- additional encantation to work around Java 11 nonsense -->
387+
<argLine>-Djdk.attach.allowAttachSelf=true --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-opens jdk.attach/sun.tools.attach=ALL-UNNAMED -Dsjk.breakCage=false</argLine>
388+
</configuration>
389+
</plugin>
390+
391+
</plugins>
392+
</pluginManagement>
393+
</build>
394+
</profile>
395+
396+
<profile>
397+
<id>fix-post-11-compile</id>
398+
399+
<activation>
400+
<jdk>[12,1000)</jdk>
401+
</activation>
402+
403+
<build>
404+
<pluginManagement>
405+
<plugins>
406+
407+
<plugin>
408+
<groupId>org.apache.maven.plugins</groupId>
409+
<artifactId>maven-compiler-plugin</artifactId>
410+
<configuration>
411+
<source>1.8</source>
412+
<target>1.8</target>
413+
</configuration>
414+
</plugin>
415+
416+
</plugins>
417+
</pluginManagement>
418+
</build>
419+
420+
</profile>
421+
422+
</profiles>
423+
316424
</project>

sjk-agent/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@
4646

4747
<build>
4848
<plugins>
49-
<plugin>
50-
<groupId>org.apache.maven.plugins</groupId>
51-
<artifactId>maven-compiler-plugin</artifactId>
52-
<configuration>
53-
<source>1.6</source>
54-
<target>1.6</target>
55-
</configuration>
56-
</plugin>
5749
<plugin>
5850
<groupId>org.apache.maven.plugins</groupId>
5951
<artifactId>maven-jar-plugin</artifactId>

sjk-cli/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,4 @@
4444
</dependency>
4545
</dependencies>
4646

47-
<build>
48-
<plugins>
49-
<plugin>
50-
<groupId>org.apache.maven.plugins</groupId>
51-
<artifactId>maven-compiler-plugin</artifactId>
52-
<configuration>
53-
<source>1.6</source>
54-
<target>1.6</target>
55-
</configuration>
56-
</plugin>
57-
</plugins>
58-
</build>
5947
</project>

0 commit comments

Comments
 (0)