You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILDING.md
+45-22Lines changed: 45 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,30 +17,23 @@
17
17
18
18
# Requirements
19
19
20
-
* JDK 8 and 9+
21
-
* Apache Maven 3.x
20
+
* JDK 11+
21
+
* JDK 8 (optional)
22
+
* Apache Maven 3.x (optional)
22
23
* A modern Linux, OSX, or Windows host
23
24
24
-
<aname="toolchains"></a>
25
-
# Configuring Maven Toolchains
26
-
27
-
Maven Toolchains is used to employ multiple JDKs required for compilation.
28
-
You either need to have a user-level configuration in `~/.m2/toolchains.xml` or explicitly provide one to the Maven: `./mvnw --global-toolchains /path/to/toolchains.xml`.
29
-
See [`.github/workflows/maven-toolchains.xml`](.github/workflows/maven-toolchains.xml) used by CI for a sample Maven Toolchains configuration.
30
-
Note that this file requires `JAVA_HOME_8_X64` and `JAVA_HOME_11_X64` environment variables to be defined, though these can very well be hardcoded.
31
-
32
25
<aname="building"></a>
33
26
# Building the sources
34
27
35
28
You can build and verify the sources as follows:
36
-
37
-
./mvnw verify
38
-
29
+
```sh
30
+
./mvnw verify
31
+
```
39
32
`verify` goal runs validation and test steps next to building (i.e., compiling) the sources.
40
33
To speed up the build, you can skip verification:
41
-
42
-
./mvnw -DskipTests package
43
-
34
+
```sh
35
+
./mvnw -DskipTests package
36
+
```
44
37
If you want to install generated artifacts to your local Maven repository, replace above `verify` and/or `package` goals with `install`.
45
38
46
39
<aname="dns"></a>
@@ -50,16 +43,46 @@ Note that if your `/etc/hosts` file does not include an entry for your computer'
50
43
many unit tests may execute slow due to DNS lookups to translate your hostname to an IP address in
printf'127.0.0.1 %s\n::1 %s\n'`hostname``hostname`| sudo tee -a /etc/hosts
48
+
```
53
49
54
-
printf '127.0.0.1 %s\n::1 %s\n' `hostname` `hostname` | sudo tee -a /etc/hosts
50
+
<aname="java8-tests"></a>
51
+
# Java 8 tests
52
+
53
+
To test the library against the target JRE (JRE 8), you need to configure a JDK 8 toolchains as explained below and run Maven with the `java8-tests` profile:
54
+
```sh
55
+
./mvnw verify -Pjava8-tests
56
+
```
57
+
58
+
<aname="toolchains"></a>
59
+
## Configuring Maven Toolchains
60
+
61
+
Maven Toolchains is used to employ additional JDKs required for tests.
62
+
You either need to have a user-level configuration in `~/.m2/toolchains.xml` or explicitly provide one to the Maven: `./mvnw --global-toolchains /path/to/toolchains.xml`.
0 commit comments