mirror of
https://github.com/actions/setup-java
synced 2024-12-23 05:34:56 +00:00
docs: added doc regarding parsing the pom.xml
This commit is contained in:
parent
d105eb1d73
commit
cb6ae6bf01
1 changed files with 17 additions and 9 deletions
|
@ -468,7 +468,10 @@ steps:
|
||||||
|
|
||||||
## Java-version file
|
## Java-version file
|
||||||
If the `java-version-file` input is specified, the action will try to extract the version from the file and install it.
|
If the `java-version-file` input is specified, the action will try to extract the version from the file and install it.
|
||||||
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
|
|
||||||
|
It is able to parse the following files as `java-version-file`:
|
||||||
|
|
||||||
|
- `.java-version`: Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
|
||||||
Valid entry options:
|
Valid entry options:
|
||||||
```
|
```
|
||||||
major versions: 8, 11, 16, 17
|
major versions: 8, 11, 16, 17
|
||||||
|
@ -477,3 +480,8 @@ early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
|
||||||
versions with specified distribution: openjdk64-11.0.2
|
versions with specified distribution: openjdk64-11.0.2
|
||||||
```
|
```
|
||||||
If the file contains multiple versions, only the first one will be recognized.
|
If the file contains multiple versions, only the first one will be recognized.
|
||||||
|
- `pom.xml`
|
||||||
|
- Spring Boot: `<java.version>` under project properties.
|
||||||
|
- Maven compiler plugin
|
||||||
|
- Setting the [source](https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html).
|
||||||
|
- Setting the [release](https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html).
|
||||||
|
|
Loading…
Reference in a new issue