Skip to content

Commit e47ba88

Browse files
committed
Merge branch 'task/maven-3.9.0'
2 parents 9508405 + 0f8deb1 commit e47ba88

File tree

40 files changed

+1291
-115
lines changed

40 files changed

+1291
-115
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ jobs:
265265

266266
publish-documentation:
267267
name: Publish documentation
268+
# Do not run multiple builds at once, as it can fail.
269+
concurrency:
270+
cancel-in-progress: true
271+
group: snapshot-javadocs
268272
runs-on: ubuntu-22.04
269273
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
270274

@@ -277,7 +281,7 @@ jobs:
277281

278282
steps:
279283
- name: Deploy JavaDocs build artifact to GitHub Pages
280-
id: javadocs
284+
id: snapshot-javadocs
281285
uses: actions/[email protected]
282286

283287
- name: Delete temporary artifacts

.github/workflows/deploy.yml

Lines changed: 60 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: Deploy a branch
33
on:
44
workflow_dispatch:
55
inputs:
6-
dry-run:
7-
description: "Dry run"
8-
default: true
9-
type: boolean
10-
116
deploy-to-staging:
127
description: "Deploy to staging"
138
default: true
@@ -29,13 +24,9 @@ jobs:
2924
name: Build and deploy code
3025
runs-on: ubuntu-22.04
3126

32-
# No concurrency groups, as we do not want to risk cancelling this job midway through a
33-
# run and producing a tag without pushing to Maven Central at the same time.
34-
3527
permissions:
3628
contents: write
3729
id-token: write
38-
pages: write
3930

4031
steps:
4132
- name: Checkout repository
@@ -59,75 +50,92 @@ jobs:
5950
shell: bash
6051
run: |-
6152
source ./scripts/common.sh
62-
63-
info "Applying Git user configuration"
6453
run <<SCRIPT
6554
git config user.name '${{ github.actor }}'
6655
git config user.email '${{ github.actor }}@users.noreply.github.com'
6756
SCRIPT
6857
69-
- name: Perform release to Maven Central
58+
- name: Determine groupId
7059
shell: bash
7160
run: |-
72-
source ./scripts/common.sh
73-
74-
info "Determining group ID..."
7561
group_id="$(./mvnw help:evaluate -q -DforceStdout -Dexpression="project.groupId")"
62+
echo "group_id=${group_id}" >> "${GITHUB_ENV}"
7663
77-
info "Determining (root) artifact ID..."
64+
- name: Determine artifactId
65+
shell: bash
66+
run: |-
7867
artifact_id="$(./mvnw help:evaluate -q -DforceStdout -Dexpression="project.artifactId")"
68+
echo "artifact_id=${artifact_id}" >> "${GITHUB_ENV}"
7969
80-
info "Determining release version to use..."
70+
- name: Determine final release version number
71+
shell: bash
72+
run: |-
8173
if [[ '${{ inputs.version }}' == "" ]]; then
8274
release_version="$(./mvnw -B help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//g')"
8375
else
8476
release_version='${{ inputs.version }}'
8577
fi
78+
echo "release_version=${release_version}" >> "${GITHUB_ENV}"
79+
80+
- name: Perform release to Staging
81+
id: maven-central-staging
82+
if: inputs.deploy-to-staging
83+
shell: bash
84+
run: |-
85+
source ./scripts/common.sh
8686
8787
info "Will release ${group_id}/${artifact_id}/${release_version} to Nexus staging"
8888
89-
info "Preparing and performing the release"
9089
ensure-set OSSRH_USERNAME OSSRH_TOKEN GPG_PASSPHRASE
91-
92-
if [ '${{ inputs.deploy-to-staging }}' == "true" ]; then
93-
build_args=(
94-
"-Dmaven.test.skip"
95-
"-DskipTests"
96-
"-Dlicense.skip=true"
97-
"-Dcheckstyle.skip=true"
98-
"-Preleases"
99-
)
100-
101-
run <<-SCRIPT
102-
./mvnw -B -e \
103-
-Preleases \
104-
-Darguments='${build_args[@]}' \
105-
-DdryRun='${{ inputs.dry-run }}' \
106-
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
107-
-DreleaseVersion='${release_version}' \
108-
-DsignTag=false \
109-
-Dtag='v${release_version}' \
110-
release:prepare release:perform
90+
info "Preparing and performing the release"
91+
92+
build_args=(
93+
"-Dmaven.test.skip"
94+
"-DskipTests"
95+
"-Dlicense.skip=true"
96+
"-Dcheckstyle.skip=true"
97+
"-Preleases"
98+
)
99+
100+
run <<-SCRIPT
101+
./mvnw -B -e \
102+
-Preleases \
103+
-Darguments='${build_args[@]}' \
104+
-DdryRun='false' \
105+
-Dpassword='${{ secrets.GITHUB_TOKEN }}' \
106+
-DreleaseVersion='${release_version}' \
107+
-DsignTag=false \
108+
-Dtag='v${release_version}' \
109+
release:prepare release:perform
111110
SCRIPT
112111
113-
success "Release has been promoted to Nexus Staging successfully"
114-
fi
112+
success "Release has been promoted to Nexus Staging successfully"
113+
env:
114+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
115+
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
116+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
117+
118+
- name: Promote Nexus staging to releases repo
119+
id: maven-central-releases
120+
if: inputs.promote-to-release && !inputs.dry-run
121+
shell: bash
122+
run: |-
123+
source ./scripts/common.sh
115124
116-
if [ "${{ inputs.promote-to-release }}" == "true" ] && [ "${{ inputs.dry-run }}" == "false" ]; then
117-
info "Will now promote ${group_id}/${artifact_id}/${release_version} to Maven Central"
125+
ensure-set OSSRH_USERNAME OSSRH_TOKEN GPG_PASSPHRASE
126+
info "Will now promote ${group_id}/${artifact_id}/${release_version} to Maven Central"
118127
119-
run <<-SCRIPT
120-
./scripts/close-nexus-repository.sh \
121-
-u "${OSSRH_USERNAME}" \
122-
-p "${OSSRH_TOKEN}" \
123-
-g "${group_id}" \
124-
-a "${artifact_id}" \
125-
-v "${release_version}" \
126-
-s "https://s01.oss.sonatype.org/"
128+
run <<-SCRIPT
129+
./scripts/close-nexus-repository.sh \
130+
-u "${OSSRH_USERNAME}" \
131+
-p "${OSSRH_TOKEN}" \
132+
-g "${group_id}" \
133+
-a "${artifact_id}" \
134+
-v "${release_version}" \
135+
-s "https://s01.oss.sonatype.org/"
127136
SCRIPT
128137
129-
success "Released ${group_id}/${artifact_id}/${release_version} to Maven Central successfully"
130-
fi
138+
success "Released ${group_id}/${artifact_id}/${release_version} to Maven Central successfully"
131139
env:
132140
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
133141
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}

.mvn/maven.config

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
-e -T1C -Dstyle.color=always -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 --no-transfer-progress
1+
-e
2+
-T1C
3+
-Dstyle.color=always
4+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
5+
--no-transfer-progress
6+

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717
# Make sure you also update the Maven version in lgtm.yml
18-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
18+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
1919
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

acceptance-tests/acceptance-tests-avaje-inject/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

acceptance-tests/acceptance-tests-checkerframework/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

acceptance-tests/acceptance-tests-dagger/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

acceptance-tests/acceptance-tests-dogfood/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

acceptance-tests/acceptance-tests-error-prone/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>io.github.ascopes.jct</groupId>
2424
<artifactId>acceptance-tests</artifactId>
25-
<version>0.2.1-SNAPSHOT</version>
25+
<version>0.2.2-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828

0 commit comments

Comments
 (0)