Skip to content

Commit 41569f9

Browse files
authored
update CONTRIBUTING.md (#3346)
1 parent ae6ebb4 commit 41569f9

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

CONTRIBUTING.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@ Please make sure to read and observe our [Code of Conduct](./CODE_OF_CONDUCT.md)
1111

1212
### Setting up your development environment
1313

14-
You should have JDK 1.8 or later installed in your system.
14+
You should have JDK 17 or later installed in your system.
15+
16+
### How to run test
17+
18+
1. add `~/.m2/toolchains.xml`, to define JDK and path. See [toolcahinas-example.xml](./toolchains-example.xml).
19+
2. With JDK 17 as your default JDK, you could specify the JDK version to run test,
20+
21+
i.e. Run test at JDK 8:
22+
23+
```bash
24+
mvn test -Dsurefire.jdk-toolchain-version=8
25+
```
1526

1627
## Contributing
1728

toolchains-example.xml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0"?>
2+
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
4+
<toolchain>
5+
<type>jdk</type>
6+
<provides>
7+
<version>8</version>
8+
<vendor>temurin</vendor>
9+
<id>temurin_8</id>
10+
</provides>
11+
<configuration>
12+
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home</jdkHome>
13+
</configuration>
14+
</toolchain>
15+
<toolchain>
16+
<type>jdk</type>
17+
<provides>
18+
<version>11</version>
19+
<vendor>temurin</vendor>
20+
<id>temurin_11</id>
21+
</provides>
22+
<configuration>
23+
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home</jdkHome>
24+
</configuration>
25+
</toolchain>
26+
<toolchain>
27+
<type>jdk</type>
28+
<provides>
29+
<version>17</version>
30+
<vendor>temurin</vendor>
31+
<id>temurin_17</id>
32+
</provides>
33+
<configuration>
34+
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home</jdkHome>
35+
</configuration>
36+
</toolchain>
37+
<toolchain>
38+
<type>jdk</type>
39+
<provides>
40+
<version>21</version>
41+
<vendor>temurin</vendor>
42+
<id>temurin_21</id>
43+
</provides>
44+
<configuration>
45+
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home</jdkHome>
46+
</configuration>
47+
</toolchain>
48+
</toolchains>

0 commit comments

Comments
 (0)