update CONTRIBUTING.md (#3346)

This commit is contained in:
Robert Lu 2024-02-27 06:02:31 -05:00 committed by GitHub
parent ae6ebb49d0
commit 41569f9a41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 60 additions and 1 deletions

View File

@ -11,7 +11,18 @@ Please make sure to read and observe our [Code of Conduct](./CODE_OF_CONDUCT.md)
### Setting up your development environment
You should have JDK 1.8 or later installed in your system.
You should have JDK 17 or later installed in your system.
### How to run test
1. add `~/.m2/toolchains.xml`, to define JDK and path. See [toolcahinas-example.xml](./toolchains-example.xml).
2. With JDK 17 as your default JDK, you could specify the JDK version to run test,
i.e. Run test at JDK 8:
```bash
mvn test -Dsurefire.jdk-toolchain-version=8
```
## Contributing

48
toolchains-example.xml Normal file
View File

@ -0,0 +1,48 @@
<?xml version="1.0"?>
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
<version>8</version>
<vendor>temurin</vendor>
<id>temurin_8</id>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
<vendor>temurin</vendor>
<id>temurin_11</id>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
<vendor>temurin</vendor>
<id>temurin_17</id>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>21</version>
<vendor>temurin</vendor>
<id>temurin_21</id>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
</toolchains>