Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#508: Support Maven Toolchains #509

Merged
merged 33 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
404994f
Update vscode config
kaklakariada Dec 18, 2023
662c974
Upgrade github actions
kaklakariada Dec 18, 2023
baa0cc8
Increment version & upgrade dependencies
kaklakariada Dec 18, 2023
7479e42
Downgrade jgit because of error:
kaklakariada Dec 18, 2023
6fbe666
Fix artifact download
kaklakariada Dec 18, 2023
1a42dc6
Refactor Node installation in GH action
kaklakariada Dec 18, 2023
f1291ee
#508: Add toolchain plugin
kaklakariada Dec 18, 2023
d74965c
Move sonar configuration from GH workflow to generated POM
kaklakariada Dec 18, 2023
3b7b4fc
Install Java 17 in GH Action
kaklakariada Dec 18, 2023
6de3b52
Update GH Actions
kaklakariada Dec 18, 2023
45eda70
Adapt vscode config to new version
kaklakariada Dec 18, 2023
7028a88
Add comments to generated GH Workflows
kaklakariada Dec 18, 2023
1610e6c
Increment major version
kaklakariada Dec 18, 2023
234efd1
Mark PK verify workflow as generated
kaklakariada Dec 18, 2023
d183cf8
Enforce Java 17 using maven-enforcer-plugin
kaklakariada Dec 18, 2023
2928f00
#508: Add requirements & design
kaklakariada Dec 18, 2023
5e3949b
#508: Update developer guide
kaklakariada Dec 18, 2023
fd30dd2
Fix java versions in GH workflows
kaklakariada Dec 18, 2023
cdfc530
Add changelog entry
kaklakariada Dec 18, 2023
c77bfa2
Fix java versions
kaklakariada Dec 18, 2023
9939c38
Fix test under windows
kaklakariada Dec 18, 2023
e8ba891
Fix go caching
kaklakariada Dec 18, 2023
e7803bb
Add debug output for java_home
kaklakariada Dec 18, 2023
798019f
Fix integration test
kaklakariada Dec 18, 2023
7bbbcf8
Generate `org.eclipse.jdt.core.prefs` with correct Java version
kaklakariada Dec 18, 2023
6368d4d
Fix sonar analysis
kaklakariada Dec 18, 2023
e7335ab
Restore fix
kaklakariada Dec 18, 2023
12a7d65
Rename setup-java action
kaklakariada Dec 18, 2023
020cba5
Fix running PK
kaklakariada Dec 18, 2023
0cc9ad8
Add missing javadoc comment
kaklakariada Dec 18, 2023
26588cd
Update release date
kaklakariada Dec 18, 2023
270ac2a
Refactor template reader
kaklakariada Dec 18, 2023
12f4933
Document overriding Java version
kaklakariada Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/broken_links_checker.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Generated by Project Keeper
# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/workflows/broken_links_checker.yml
name: Broken Links Checker

on:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci-build-next-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ jobs:
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
cache: "maven"
- name: Run tests and build with Maven
run: |
mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \
-Djava.version=17 \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Publish Test Report
- name: Publish Test Report for Java 17
uses: scacap/action-surefire-report@v1
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
with:
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: CI Build

on:
push:
branches:
Expand All @@ -17,27 +16,19 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11 & 17
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: |
17
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/setup-go@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: "1.21"
cache-dependency-path: .github/workflows/ci-build.yml
- name: Install Go tools
run: go install github.com/google/[email protected]
- name: Cache SonarCloud packages
Expand All @@ -48,8 +39,6 @@ jobs:
restore-keys: ${{ runner.os }}-sonar
- name: Run tests and build with Maven
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
mvn --version
mvn --batch-mode clean verify install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false
Expand All @@ -61,7 +50,7 @@ jobs:
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN != null }}
run: |
JAVA_HOME=$JAVA_HOME_17_X64 mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false \
-Dsonar.organization=exasol \
Expand All @@ -71,4 +60,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Run project-keeper itself
run: JAVA_HOME=$JAVA_HOME_11_X64 mvn --batch-mode com.exasol:project-keeper-maven-plugin:verify --projects .
run: mvn --batch-mode com.exasol:project-keeper-maven-plugin:verify --projects .
9 changes: 6 additions & 3 deletions .github/workflows/dependencies_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"

- name: Install Projects
# This fixes https://github.com/exasol/project-keeper/issues/330
run: |
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/release_droid_prepare_original_checksum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,31 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.21"
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}
${{ runner.os }}-go-
- name: Install Go tools
run: go install github.com/google/[email protected]
- name: Run tests and build with Maven
run: |
mvn --batch-mode clean verify install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false
run: mvn --batch-mode clean verify install
- name: Prepare checksum
run: find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + > original_checksum
- name: Upload checksum to the artifactory
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release_droid_print_quick_checksum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Build with Maven skipping tests
run: mvn --batch-mode clean verify -DskipTests
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release_droid_release_on_maven_central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ jobs:
with:
fetch-depth: 0
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Central Repository
run: mvn --batch-mode -Dgpg.skip=false -DskipTests clean deploy # --settings maven-central-settings.xml
run: mvn --batch-mode -Dgpg.skip=false -DskipTests clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/release_droid_upload_github_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,34 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Build with Maven skipping tests
run: mvn --batch-mode clean verify -DskipTests
- name: Generate sha256sum files
run: find */target/ -name "*.jar" -exec bash -c 'sha256sum {} > {}.sha256' \;
run: |
cd project-keeper-cli/target
find . -maxdepth 1 -name \*.jar -exec bash -c 'sha256sum {} > {}.sha256' \;
- name: Upload assets to the GitHub release draft
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: "**/target/*.jar"
asset_path: project-keeper-cli/target/*.jar
- name: Upload sha256sum files
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: "**/target/*.sha256"
asset_path: project-keeper-cli/target/*.sha256
- name: Zip error-code-reports
run: zip -v error_code_report.zip */target/error_code_report.json
- name: Upload error-code-report
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: error_code_report.zip
asset_path: target/error_code_report.json
25 changes: 14 additions & 11 deletions .github/workflows/test_linux_build_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,26 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.21"
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}
${{ runner.os }}-go-
- name: Install Go tools
run: go install github.com/google/[email protected]
Expand Down Expand Up @@ -68,14 +69,16 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Download jar
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: project-keeper-jar
- name: List files
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.21"
- name: Cache Go modules
uses: actions/cache@v3
with:
Expand Down
35 changes: 18 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.generate.finalModifiers": true
},
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"java.test.config": {
"vmArgs": [
"-Djava.util.logging.config.file=src/test/resources/logging.properties"
]
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "com.exasol:project-keeper-root"
}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.generate.finalModifiers": "explicit",
"source.fixAll": "explicit"
},
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"java.test.config": {
"vmArgs": [
"-Djava.util.logging.config.file=src/test/resources/logging.properties"
]
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "com.exasol:project-keeper-root"
}
}
Loading
Loading