Skip to content

Commit da8e949

Browse files
committed
Maven for egg__12_sc_junit
1 parent b293f9c commit da8e949

File tree

7 files changed

+236
-5
lines changed

7 files changed

+236
-5
lines changed

.github/workflows/gradle_test.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
test-groovy:
15+
test-gradle-groovy:
1616
runs-on: ubuntu-latest
1717

1818
steps:
@@ -29,7 +29,7 @@ jobs:
2929
run: ./gradle-groovy-test.sh
3030
working-directory: egg__12_sc_junit
3131

32-
test-kotlin:
32+
test-gradle-kotlin:
3333
runs-on: ubuntu-latest
3434

3535
steps:
@@ -45,3 +45,27 @@ jobs:
4545
- name: run build script
4646
run: ./gradle-kotlin-test.sh
4747
working-directory: egg__12_sc_junit
48+
49+
test-maven:
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: get code
54+
uses: actions/checkout@v3
55+
56+
- name: Set up JDK 19
57+
uses: actions/setup-java@v3
58+
with:
59+
java-version: '19'
60+
distribution: 'adopt'
61+
62+
- name: Setup Maven Action
63+
64+
with:
65+
java-version: 19
66+
maven-version: 3.8.6
67+
68+
- name: run build script
69+
run: ./mvn-test.sh
70+
working-directory: egg__12_sc_junit
71+

.github/workflows/mvn_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535
java-version: 19
3636
maven-version: ${{ matrix.maven }}
3737

38-
# - name: run build script
39-
# run: ./mvn-build-all.sh
38+
- name: run build script
39+
run: ./mvn-build-all.sh

egg__12_sc_junit/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Summary:
33
---------
44

55
* address how to run JUnit5 with preview/incubating features
6-
* Gradle Groovy & Gradle Kotlin
76

87
Build Notes:
98
------------
@@ -18,6 +17,11 @@ To Run (using Gradle):
1817
* with Groovy: `./gradle-groovy-test.sh`
1918
* with Kotlin: `./gradle-kotlin-test.sh`
2019

20+
To Run (using Maven):
21+
---------------------
22+
23+
* `./mvn-test.sh`
24+
2125
useful commands:
2226

2327
* `sdk env`

egg__12_sc_junit/mvn-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn install
6+
mvn clean
7+
mvn compile
8+
9+
echo "build complete"

egg__12_sc_junit/mvn-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn install
6+
mvn clean
7+
mvn compile
8+
mvn test
9+
10+
echo "test complete"

egg__12_sc_junit/pom.xml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>net.codetojoy</groupId>
8+
<artifactId>egg__12_sc_junit</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<name>egg__12_sc_junit</name>
12+
<url>https://github.com/codetojoy/easter_eggs_for_java_loom</url>
13+
14+
<properties>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
<maven.compiler.source>19</maven.compiler.source>
17+
<maven.compiler.target>19</maven.compiler.target>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.junit.jupiter</groupId>
23+
<artifactId>junit-jupiter</artifactId>
24+
<version>5.9.1</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.junit.jupiter</groupId>
28+
<artifactId>junit-jupiter-api</artifactId>
29+
<version>5.9.1</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.junit.jupiter</groupId>
33+
<artifactId>junit-jupiter-engine</artifactId>
34+
<version>5.9.1</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.junit.jupiter</groupId>
38+
<artifactId>junit-jupiter-migrationsupport</artifactId>
39+
<version>5.9.1</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.junit.jupiter</groupId>
43+
<artifactId>junit-jupiter-params</artifactId>
44+
<version>5.9.1</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.junit.platform</groupId>
48+
<artifactId>junit-platform-commons</artifactId>
49+
<version>1.9.1</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.junit.platform</groupId>
53+
<artifactId>junit-platform-console</artifactId>
54+
<version>1.9.1</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.junit.platform</groupId>
58+
<artifactId>junit-platform-engine</artifactId>
59+
<version>1.9.1</version>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.junit.platform</groupId>
63+
<artifactId>junit-platform-jfr</artifactId>
64+
<version>1.9.1</version>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.junit.platform</groupId>
68+
<artifactId>junit-platform-launcher</artifactId>
69+
<version>1.9.1</version>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.junit.platform</groupId>
73+
<artifactId>junit-platform-reporting</artifactId>
74+
<version>1.9.1</version>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.junit.platform</groupId>
78+
<artifactId>junit-platform-runner</artifactId>
79+
<version>1.9.1</version>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.junit.platform</groupId>
83+
<artifactId>junit-platform-suite</artifactId>
84+
<version>1.9.1</version>
85+
</dependency>
86+
<dependency>
87+
<groupId>org.junit.platform</groupId>
88+
<artifactId>junit-platform-suite-api</artifactId>
89+
<version>1.9.1</version>
90+
</dependency>
91+
<dependency>
92+
<groupId>org.junit.platform</groupId>
93+
<artifactId>junit-platform-suite-commons</artifactId>
94+
<version>1.9.1</version>
95+
</dependency>
96+
<dependency>
97+
<groupId>org.junit.platform</groupId>
98+
<artifactId>junit-platform-suite-engine</artifactId>
99+
<version>1.9.1</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>org.junit.platform</groupId>
103+
<artifactId>junit-platform-testkit</artifactId>
104+
<version>1.9.1</version>
105+
</dependency>
106+
<dependency>
107+
<groupId>org.junit.vintage</groupId>
108+
<artifactId>junit-vintage-engine</artifactId>
109+
<version>5.9.1</version>
110+
</dependency>
111+
</dependencies>
112+
113+
<build>
114+
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
115+
<plugins>
116+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
117+
<plugin>
118+
<artifactId>maven-clean-plugin</artifactId>
119+
<version>3.1.0</version>
120+
</plugin>
121+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
122+
<plugin>
123+
<artifactId>maven-resources-plugin</artifactId>
124+
<version>3.0.2</version>
125+
</plugin>
126+
<plugin>
127+
<artifactId>maven-compiler-plugin</artifactId>
128+
<version>3.10.1</version>
129+
<configuration>
130+
<compilerArgs>
131+
<arg>--enable-preview</arg>
132+
<arg>--add-modules=jdk.incubator.concurrent</arg>
133+
</compilerArgs>
134+
</configuration>
135+
</plugin>
136+
<plugin>
137+
<artifactId>maven-surefire-plugin</artifactId>
138+
<version>2.22.1</version>
139+
</plugin>
140+
<plugin>
141+
<artifactId>maven-jar-plugin</artifactId>
142+
<version>3.0.2</version>
143+
</plugin>
144+
<plugin>
145+
<artifactId>maven-install-plugin</artifactId>
146+
<version>2.5.2</version>
147+
</plugin>
148+
<plugin>
149+
<artifactId>maven-deploy-plugin</artifactId>
150+
<version>2.8.2</version>
151+
</plugin>
152+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
153+
<plugin>
154+
<artifactId>maven-site-plugin</artifactId>
155+
<version>3.7.1</version>
156+
</plugin>
157+
<plugin>
158+
<artifactId>maven-project-info-reports-plugin</artifactId>
159+
<version>3.0.0</version>
160+
</plugin>
161+
162+
<plugin>
163+
<groupId>org.codehaus.mojo</groupId>
164+
<artifactId>exec-maven-plugin</artifactId>
165+
<version>3.1.0</version>
166+
<configuration>
167+
<executable>${java.home}/bin/java</executable>
168+
<arguments>
169+
<argument>--add-modules=jdk.incubator.concurrent</argument>
170+
<argument>--enable-preview</argument>
171+
<argument>--class-path</argument>
172+
<classpath/>
173+
<argument>net.codetojoy.Runner</argument>
174+
</arguments>
175+
</configuration>
176+
</plugin>
177+
178+
</plugins>
179+
</pluginManagement>
180+
</build>
181+
</project>

mvn-build-all.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ cd $MY_HOME/egg__11_sc_utility
4646
cd $MY_HOME/egg__11b_sc_utility
4747
./mvn-build.sh
4848

49+
cd $MY_HOME/egg__12_sc_junit
50+
./mvn-build.sh
51+
4952
cd $MY_HOME
5053

5154
echo "Ready."

0 commit comments

Comments
 (0)