Skip to content

Commit

Permalink
JDK 11+ - update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Apr 5, 2023
1 parent 3e2211a commit 1cb0f36
Show file tree
Hide file tree
Showing 249 changed files with 3,510 additions and 352 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/maven-master-pulls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PR build - master

on:
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]

steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B -U verify --file pom.xml
59 changes: 59 additions & 0 deletions .github/workflows/maven-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build - master

on:
push:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]

steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- name: Docker Login
run: |
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }}
set -e
- uses: s4u/maven-settings-action@v2.8.0
name: setup maven settings.xml
with:
servers: |
[{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
},
{
"id": "sonatype-nexus-snapshots",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
}]
- name: Build with Maven
run: mvn -B -U verify --file pom.xml
- name: Deploy Maven Snapshot
if: ${{ matrix.java == 11 }}
run: |
export DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator
export DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli
export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
then
./mvnw clean deploy -U --settings $HOME/.m2/settings.xml
docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME:unstable ./modules/swagger-generator
docker push $DOCKER_GENERATOR_IMAGE_NAME:unstable
docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable ./modules/swagger-codegen-cli
docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable
else
echo "not deploying release nor building and pushing release docker image: " ${MY_POM_VERSION}
fi
35 changes: 33 additions & 2 deletions .github/workflows/maven-pr-3.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
"password": "${{ secrets.OSSRH_TOKEN }}"
}]
- name: Build with Maven
if: ${{ matrix.java != 8 }}
run: |
export MY_POM_VERSION=`mvn -Dswagger-codegen-generators-version=1.0.37 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
Expand Down Expand Up @@ -78,8 +79,38 @@ jobs:
echo "GENERATORS_VERSION_PROPERTY ${GENERATORS_VERSION_PROPERTY}"
echo "GENERATORS_VERSION_PROPERTY=${GENERATORS_VERSION_PROPERTY}" >> $GITHUB_ENV
mvn clean verify -U -DJETTY_TEST_HTTP_PORT=8070 -DJETTY_TEST_STOP_PORT=8069 ${GENERATORS_VERSION_PROPERTY}
- name: Test samples
- name: Build and test samples Java 8
if: ${{ matrix.java == 8 }}
run: |
export MY_POM_VERSION=`mvn -Dswagger-codegen-generators-version=1.0.37 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
export GENERATORS_VERSION=`sed -n 's/<swagger\-codegen\-generators\-version>\([^\s]*\)<\/swagger\-codegen\-generators\-version>/\1/p' pom.xml`
export GENERATORS_VERSION=`echo ${GENERATORS_VERSION} | tr -d '[:space:]'`
echo "GENERATORS_VERSION" ${GENERATORS_VERSION}
export GENERATORS_VERSION_PROPERTY=""
if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
then
if [[ ! $GENERATORS_VERSION =~ ^.*SNAPSHOT$ ]];
then
# check release version exists
export GENERATORS_FOUND_JSON=`curl -s --max-time 60 --retry 15 --connect-timeout 20 https://search.maven.org/solrsearch/select?q=g:io.swagger.codegen.v3%20AND%20a:swagger-codegen-generators%20AND%20v:${GENERATORS_VERSION}%20AND%20p:jar`
export GENERATORS_FOUND=`echo ${GENERATORS_FOUND_JSON} | jq '.response.numFound'`
echo "GENERATORS_FOUND" ${GENERATORS_FOUND}
if [[ $GENERATORS_FOUND == '0' ]];
then
echo "generators version not found"
rm -f maven-metadata.json
curl -o maven-metadata.json -s --max-time 60 --retry 15 --connect-timeout 30 -H "accept: application/json" https://oss.sonatype.org/service/local/repositories/snapshots/content/io/swagger/codegen/v3/swagger-codegen-generators/
LAST_SNAP=`jq '.data | sort_by(.lastModified) | reverse | .[0].text' maven-metadata.json`
export LAST_SNAP=${LAST_SNAP:1:${#LAST_SNAP}-2}
echo "LAST_SNAP $LAST_SNAP"
export GENERATORS_VERSION_PROPERTY=-Dswagger-codegen-generators-version=$LAST_SNAP
fi
fi
fi
echo "GENERATORS_VERSION_PROPERTY ${GENERATORS_VERSION_PROPERTY}"
echo "GENERATORS_VERSION_PROPERTY=${GENERATORS_VERSION_PROPERTY}" >> $GITHUB_ENV
cp -a pom.java8.xml pom.xml
echo "Test samples - GENERATORS_VERSION_PROPERTY ${{ env.GENERATORS_VERSION_PROPERTY }}"
mvn -q verify -U -Psamples -Dproject.build.sourceEncoding=UTF8 -Dfile.encoding=UTF8 ${{ env.GENERATORS_VERSION_PROPERTY }}
mvn verify -U -Psamples -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true -Dproject.build.sourceEncoding=UTF8 -Dfile.encoding=UTF8 ${{ env.GENERATORS_VERSION_PROPERTY }}
cp -a pom.java11.xml pom.xml
37 changes: 34 additions & 3 deletions .github/workflows/maven-push-3.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
"password": "${{ secrets.OSSRH_TOKEN }}"
}]
- name: Build with Maven
if: ${{ matrix.java != 8 }}
run: |
export MY_POM_VERSION=`mvn -Dswagger-codegen-generators-version=1.0.37 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
Expand Down Expand Up @@ -82,11 +83,41 @@ jobs:
echo "GENERATORS_VERSION_PROPERTY=${GENERATORS_VERSION_PROPERTY}" >> $GITHUB_ENV
mvn clean verify -U -DJETTY_TEST_HTTP_PORT=8070 -DJETTY_TEST_STOP_PORT=8069 ${GENERATORS_VERSION_PROPERTY}
mvn clean install -U -Pdocker -Plinux -DJETTY_TEST_HTTP_PORT=8090 -DJETTY_TEST_STOP_PORT=8089 ${GENERATORS_VERSION_PROPERTY}
- name: Test samples
- name: Build and test samples Java 8
if: ${{ matrix.java == 8 }}
run: |
echo "Test samples - GENERATORS_VERSION_PROPERTY ${{ env.GENERATORS_VERSION_PROPERTY }}"
mvn -q verify -U -Psamples -Dproject.build.sourceEncoding=UTF8 -Dfile.encoding=UTF8 ${{ env.GENERATORS_VERSION_PROPERTY }}
export MY_POM_VERSION=`mvn -Dswagger-codegen-generators-version=1.0.37 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
export GENERATORS_VERSION=`sed -n 's/<swagger\-codegen\-generators\-version>\([^\s]*\)<\/swagger\-codegen\-generators\-version>/\1/p' pom.xml`
export GENERATORS_VERSION=`echo ${GENERATORS_VERSION} | tr -d '[:space:]'`
echo "GENERATORS_VERSION" ${GENERATORS_VERSION}
export GENERATORS_VERSION_PROPERTY=""
if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
then
if [[ ! $GENERATORS_VERSION =~ ^.*SNAPSHOT$ ]];
then
# check release version exists
export GENERATORS_FOUND_JSON=`curl -s --max-time 60 --retry 15 --connect-timeout 20 https://search.maven.org/solrsearch/select?q=g:io.swagger.codegen.v3%20AND%20a:swagger-codegen-generators%20AND%20v:${GENERATORS_VERSION}%20AND%20p:jar`
export GENERATORS_FOUND=`echo ${GENERATORS_FOUND_JSON} | jq '.response.numFound'`
echo "GENERATORS_FOUND" ${GENERATORS_FOUND}
if [[ $GENERATORS_FOUND == '0' ]];
then
echo "generators version not found"
rm -f maven-metadata.json
curl -o maven-metadata.json -s --max-time 60 --retry 15 --connect-timeout 30 -H "accept: application/json" https://oss.sonatype.org/service/local/repositories/snapshots/content/io/swagger/codegen/v3/swagger-codegen-generators/
LAST_SNAP=`jq '.data | sort_by(.lastModified) | reverse | .[0].text' maven-metadata.json`
export LAST_SNAP=${LAST_SNAP:1:${#LAST_SNAP}-2}
echo "LAST_SNAP $LAST_SNAP"
export GENERATORS_VERSION_PROPERTY=-Dswagger-codegen-generators-version=$LAST_SNAP
fi
fi
fi
echo "GENERATORS_VERSION_PROPERTY ${GENERATORS_VERSION_PROPERTY}"
echo "GENERATORS_VERSION_PROPERTY=${GENERATORS_VERSION_PROPERTY}" >> $GITHUB_ENV
cp -a pom.java8.xml pom.xml
echo "Test samples - GENERATORS_VERSION_PROPERTY ${{ env.GENERATORS_VERSION_PROPERTY }}"
mvn -q verify -U -Psamples -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true -Dproject.build.sourceEncoding=UTF8 -Dfile.encoding=UTF8 ${{ env.GENERATORS_VERSION_PROPERTY }}
cp -a pom.java11.xml pom.xml
- name: docker cli and minimal build and push
if: ${{ matrix.java == 17 }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-ada.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-no-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-sbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-v2-ada.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-v2-android-httpclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-v2-android-volley.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-v2-aspnetcore-v22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-framework-v2-aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
java: [ 8 ]
java: [ 11 ]

steps:
- uses: actions/checkout@v2
Expand Down
Loading

0 comments on commit 1cb0f36

Please sign in to comment.