feat: added support to pom.xml

This commit is contained in:
AUGMELO 2023-01-08 19:25:29 +00:00
parent e11351903a
commit e1a751b5d3
3 changed files with 133 additions and 5 deletions

View file

@ -337,3 +337,48 @@ jobs:
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
shell: bash
setup-java-version-from-pom-spring-boot-specification:
name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['adopt', 'zulu', 'liberica' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create .java-version file
shell: bash
run: |
echo "<?xml version="1.0" encoding="UTF-8"?>" > pom.xml
echo "<project>" >> pom.xml
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
echo " <groupId>com.test</groupId>" >> pom.xml
echo " <artifactId>Test</artifactId>" >> pom.xml
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
echo " <name>Test</name>" >> pom.xml
echo " <properties>" >> pom.xml
echo " <java.version>11</java.version>" >> pom.xml
echo " </properties>" >> pom.xml
echo " <dependencies>" >> pom.xml
echo " </dependencies>" >> pom.xml
echo " <build>" >> pom.xml
echo " <plugins>" >> pom.xml
echo " <plugin>" >> pom.xml
echo " <groupId>org.springframework.boot</groupId>" >> pom.xml
echo " <artifactId>spring-boot-maven-plugin</artifactId>" >> pom.xml
echo " </plugin>" >> pom.xml
echo " </plugins>" >> pom.xml
echo " </build>" >> pom.xml
echo "</project>" >> pom.xml
- name: setup-java
uses: ./
id: setup-java
with:
distribution: ${{ matrix.distribution }}
java-version-file: 'pom.xml'
- name: Verify Java
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
shell: bash