chore: prepare docs and tests for maven 4
Some checks failed
amazoncorretto-17-windowsservercore / build (push) Has been cancelled
amazoncorretto-17 / build (push) Has been cancelled
amazoncorretto-21-al2023 / build (push) Has been cancelled
amazoncorretto-21-debian / build (push) Has been cancelled
amazoncorretto-8-al2023 / build (push) Has been cancelled
amazoncorretto-21 / build (push) Has been cancelled
amazoncorretto-8-debian / build (push) Has been cancelled
amazoncorretto-11-al2023 / build (push) Has been cancelled
amazoncorretto-11-debian / build (push) Has been cancelled
amazoncorretto-11-windowsservercore / build (push) Has been cancelled
amazoncorretto-11 / build (push) Has been cancelled
amazoncorretto-17-al2023 / build (push) Has been cancelled
amazoncorretto-17-debian / build (push) Has been cancelled
amazoncorretto-8-windowsservercore / build (push) Has been cancelled
amazoncorretto-8 / build (push) Has been cancelled
azulzulu-11-alpine / build (push) Has been cancelled
azulzulu-11-debian / build (push) Has been cancelled
azulzulu-11-windowsservercore / build (push) Has been cancelled
azulzulu-11 / build (push) Has been cancelled
azulzulu-17-alpine / build (push) Has been cancelled
azulzulu-17-debian / build (push) Has been cancelled
azulzulu-21-alpine / build (push) Has been cancelled
azulzulu-21-debian / build (push) Has been cancelled
azulzulu-21 / build (push) Has been cancelled
azulzulu-8 / build (push) Has been cancelled
eclipse-temurin-11-alpine / build (push) Has been cancelled
eclipse-temurin-11-focal / build (push) Has been cancelled
azulzulu-17-windowsservercore / build (push) Has been cancelled
azulzulu-17 / build (push) Has been cancelled
azulzulu-8-alpine / build (push) Has been cancelled
azulzulu-8-debian / build (push) Has been cancelled
eclipse-temurin-11 / build (push) Has been cancelled
eclipse-temurin-17-alpine / build (push) Has been cancelled
eclipse-temurin-17-focal / build (push) Has been cancelled
eclipse-temurin-17 / build (push) Has been cancelled
eclipse-temurin-21 / build (push) Has been cancelled
eclipse-temurin-22-alpine / build (push) Has been cancelled
eclipse-temurin-22-jammy / build (push) Has been cancelled
eclipse-temurin-22 / build (push) Has been cancelled
eclipse-temurin-8-alpine / build (push) Has been cancelled
eclipse-temurin-8-focal / build (push) Has been cancelled
eclipse-temurin-8 / build (push) Has been cancelled
graalvm-community-17 / build (push) Has been cancelled
ibm-semeru-11-focal / build (push) Has been cancelled
eclipse-temurin-21-alpine / build (push) Has been cancelled
eclipse-temurin-21-jammy / build (push) Has been cancelled
graalvm-community-21 / build (push) Has been cancelled
ibm-semeru-17-focal / build (push) Has been cancelled
ibm-semeru-21-jammy / build (push) Has been cancelled
ibmjava-8 / build (push) Has been cancelled
libericaopenjdk-11-alpine / build (push) Has been cancelled
libericaopenjdk-11-debian / build (push) Has been cancelled
libericaopenjdk-17-alpine / build (push) Has been cancelled
libericaopenjdk-17-debian / build (push) Has been cancelled
libericaopenjdk-8-alpine / build (push) Has been cancelled
libericaopenjdk-8-debian / build (push) Has been cancelled
microsoft-openjdk-11-ubuntu / build (push) Has been cancelled
microsoft-openjdk-17-ubuntu / build (push) Has been cancelled
microsoft-openjdk-21-ubuntu / build (push) Has been cancelled
openjdk-11-windowsservercore / build (push) Has been cancelled
openjdk-8-windowsservercore / build (push) Has been cancelled
openjdk-11-nanoserver / build (push) Has been cancelled
openjdk-8-nanoserver / build (push) Has been cancelled
oracle-graalvm-17 / build (push) Has been cancelled
oracle-graalvm-21 / build (push) Has been cancelled
sapmachine-11 / build (push) Has been cancelled
sapmachine-17 / build (push) Has been cancelled
sapmachine-21 / build (push) Has been cancelled
sapmachine-22 / build (push) Has been cancelled

This commit is contained in:
Carlos Sanchez 2024-08-20 21:14:35 +02:00
parent 03b409ff98
commit d6d849139e
5 changed files with 10 additions and 10 deletions

View file

@ -118,18 +118,18 @@ passing a Maven command to `docker run`:
### Linux
docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn verify
docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-17 mvn verify
### Windows
```powershell
docker run -it --rm --name my-maven-project -v "$(Get-Location)":C:/Src -w C:/Src csanchez/maven:3.3-jdk-8-windows mvn verify
docker run -it --rm --name my-maven-project -v "$(Get-Location)":C:/Src -w C:/Src csanchez/maven:3.3-jdk-17-windows mvn verify
```
### Windows
```powershell
docker run -it --rm --name my-maven-project -v "$(Get-Location)":C:/Src -w C:/Src maven:3.3-jdk-8-windows mvn clean install
docker run -it --rm --name my-maven-project -v "$(Get-Location)":C:/Src -w C:/Src maven:3.3-jdk-17-windows mvn clean install
```
## Building local Docker image (optional)
@ -153,7 +153,7 @@ COPY . .
RUN mvn -B -e -o -T 1C verify
# package without maven
FROM openjdk
FROM eclipse-temurin:17-jdk
COPY --from=0 /usr/src/app/target/*.jar ./
```
@ -343,7 +343,7 @@ Pester comes with most modern Windows (Windows 10 and Windows Server 2019), but
## Updating Maven version
* Search and replace all references to the previous version by the new version.
* Update environment variable SHA in `eclipse-temurin-11/Dockerfile` with value found in [maven download page](https://maven.apache.org/download.cgi) for the binary tar.gz archive.
* Update environment variable SHA in `eclipse-temurin-17/Dockerfile` with value found in [maven download page](https://maven.apache.org/download.cgi) for the binary tar.gz archive.
* Update environment variable SHA in `*-{nanoserver,windowsservercore}/Dockerfile` with value found in [maven download page](https://maven.apache.org/download.cgi) for the binary zip archive.
## Publishing to Docker Hub

View file

@ -15,7 +15,7 @@ declare -A jdk_latest=(
["eclipse-temurin"]=$latest
["ibmjava"]="8"
["ibm-semeru"]=""
["amazoncorretto"]="11"
["amazoncorretto"]="17"
["libericaopenjdk"]="17"
["sapmachine"]="21"
["graalvm-community"]="21"

View file

@ -18,7 +18,7 @@ fi
for dir in "${all_dirs[@]}"; do
if [[ "$dir" == *"windows"* ]] || [[ "$dir" == *"nanoserver"* ]]; then
from=openjdk-11-windowsservercore
from=amazoncorretto-17-windowsservercore
if [[ "$dir" != "$from" ]]; then
cp $from/mvn-entrypoint.ps1 "$dir/"
cp $from/settings-docker.xml "$dir/"

View file

@ -1,6 +1,6 @@
BeforeAll {
$SUT_IMAGE="maven"
$SUT_TAG="openjdk-8-windowsservercore"
$SUT_TAG="amazoncorretto-17-windowsservercore"
if(![System.String]::IsNullOrWhiteSpace($env:TAG)) {
$SUT_TAG=$env:TAG
}
@ -60,7 +60,7 @@ Describe "$SUT_TAG settings.xml is setup" {
Describe "$SUT_TAG repository is created" {
It 'created repository' {
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} if(Test-Path C:/Users/ContainerUser/.m2/repository/junit/junit/4.13.1/junit-4.13.1.jar) { exit 0 } else {exit 1 }"
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} if(Test-Path C:/Users/ContainerUser/.m2/repository/org/junit/junit-bom/5.7.2/junit-bom-5.7.2.pom) { exit 0 } else {exit 1 }"
$exitCode | Should -Be 0
}
}

View file

@ -56,7 +56,7 @@ base_image=eclipse-temurin-17
}
@test "$SUT_TAG repository is created" {
run docker run --rm $SUT_TEST_IMAGE:$SUT_TAG test -f /root/.m2/repository/junit/junit/4.13.1/junit-4.13.1.jar
run docker run --rm $SUT_TEST_IMAGE:$SUT_TAG test -f /root/.m2/repository/org/junit/junit-bom/5.7.2/junit-bom-5.7.2.pom
assert_success
}