Skip to content

Commit dd78eb6

Browse files
authored
Add Maven wrapper and switch CI to mvnw
1 parent e833e27 commit dd78eb6

5 files changed

Lines changed: 497 additions & 9 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
cache: 'maven'
2424
- name: Ensure to use tagged version
2525
if: startsWith(github.ref, 'refs/tags/')
26-
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
26+
run: ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
2727
- name: Build and Test
28-
run: mvn -B verify --no-transfer-progress
28+
run: ./mvnw -B verify --no-transfer-progress
2929
- name: Attest
3030
if: startsWith(github.ref, 'refs/tags/')
3131
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
@@ -56,14 +56,14 @@ jobs:
5656
server-password: MAVEN_CENTRAL_PASSWORD
5757
- name: Ensure to use tagged version
5858
if: startsWith(github.ref, 'refs/tags/')
59-
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
59+
run: ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
6060
- name: Verify project version is -SNAPSHOT
6161
if: startsWith(github.ref, 'refs/tags/') == false
6262
run: |
63-
PROJECT_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
63+
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
6464
test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
6565
- name: Deploy to Maven Central
66-
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
66+
run: ./mvnw deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
6767
env:
6868
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
6969
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
@@ -87,14 +87,14 @@ jobs:
8787
cache: 'maven'
8888
- name: Ensure to use tagged version
8989
if: startsWith(github.ref, 'refs/tags/')
90-
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
90+
run: ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
9191
- name: Verify project version is -SNAPSHOT
9292
if: startsWith(github.ref, 'refs/tags/') == false
9393
run: |
94-
PROJECT_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
94+
PROJECT_VERSION=$(./mvnw help:evaluate "-Dexpression=project.version" -q -DforceStdout)
9595
test "${PROJECT_VERSION: -9}" = "-SNAPSHOT"
9696
- name: Deploy to GitHub Packages
97-
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
97+
run: ./mvnw deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
with:
3030
languages: java
3131
- name: Build
32-
run: mvn -B compile
32+
run: ./mvnw -B compile
3333
- name: Perform CodeQL Analysis
3434
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
wrapperVersion=3.3.4
2+
distributionType=only-script
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
4+
distributionSha256Sum=305773a68d6ddfd413df58c82b3f8050e89778e777f3a745c8e5b8cbea4018ef

‎mvnw‎

Lines changed: 295 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)