Skip to content

Commit 1c940d4

Browse files
LarsEckartJayBazuziisidore
committed
. e almost releasing
Co-authored-by: Jay Bazuzi <[email protected]> Co-authored-by: Llewellyn Falco <[email protected]>
1 parent 6c15664 commit 1c940d4

File tree

7 files changed

+115
-13
lines changed

7 files changed

+115
-13
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ __pycache__/
2828

2929
# Claude Code local settings
3030
.claude/settings.local.json
31+
32+
# Maven Flatten Plugin generated files
33+
.flattened-pom.xml

approvaltests-util/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,31 @@
1010

1111
<artifactId>approvaltests-util</artifactId>
1212
<packaging>jar</packaging>
13+
<name>ApprovalTests Utilities</name>
14+
<description>Utilities for ApprovalTests</description>
15+
<url>http://approvaltests.com/</url>
16+
17+
<licenses>
18+
<license>
19+
<name>The Apache License, Version 2.0</name>
20+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
21+
</license>
22+
</licenses>
23+
24+
<developers>
25+
<developer>
26+
<name>Llewellyn Falco</name>
27+
</developer>
28+
<developer>
29+
<name>Lars Eckart</name>
30+
</developer>
31+
</developers>
32+
33+
<scm>
34+
<connection>scm:git:git://github.com/approvals/ApprovalTests.Java.git</connection>
35+
<developerConnection>scm:git:ssh://github.com:approvals/ApprovalTests.Java.git</developerConnection>
36+
<url>https://github.com/approvals/ApprovalTests.Java</url>
37+
</scm>
1338

1439
<dependencies>
1540
<dependency>

approvaltests/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,31 @@
1111

1212
<artifactId>approvaltests</artifactId>
1313
<packaging>jar</packaging>
14+
<name>ApprovalTests</name>
15+
<description>Unit testing asserts made easy</description>
16+
<url>http://approvaltests.com/</url>
1417

18+
<licenses>
19+
<license>
20+
<name>The Apache License, Version 2.0</name>
21+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
22+
</license>
23+
</licenses>
24+
25+
<developers>
26+
<developer>
27+
<name>Llewellyn Falco</name>
28+
</developer>
29+
<developer>
30+
<name>Lars Eckart</name>
31+
</developer>
32+
</developers>
33+
34+
<scm>
35+
<connection>scm:git:git://github.com/approvals/ApprovalTests.Java.git</connection>
36+
<developerConnection>scm:git:ssh://github.com:approvals/ApprovalTests.Java.git</developerConnection>
37+
<url>https://github.com/approvals/ApprovalTests.Java</url>
38+
</scm>
1539

1640
<dependencies>
1741
<dependency>

deploy_with_jreleaser.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ echo "********** Staging artifacts with Maven"
1919
# Get the key ID from the imported key
2020
KEY_ID=$(echo "$GPG_PRIVATE_KEY" | gpg --list-packets 2>/dev/null | grep -E "keyid:" | head -1 | awk '{print $2}')
2121
echo "Using GPG key: $KEY_ID"
22-
mvn clean deploy -Ppublication -DskipTests -Dgpg.keyname="$KEY_ID" -Dgpg.passphrase="$GPG_PASSPHRASE"
22+
mvn clean deploy -Ppublication -DskipTests -Dmaven.javadoc.failOnError=false -Dgpg.keyname="$KEY_ID" -Dgpg.passphrase="$GPG_PASSPHRASE"
2323

2424
echo "********** Setting JReleaser environment variables"
2525
export JRELEASER_MAVENCENTRAL_USERNAME="$MAVEN_USERNAME_2025"
@@ -28,5 +28,12 @@ export JRELEASER_GPG_PASSPHRASE="$GPG_PASSPHRASE"
2828
export JRELEASER_GPG_PUBLIC_KEY=$(gpg --armor --export)
2929
export JRELEASER_GPG_SECRET_KEY="$GPG_PRIVATE_KEY"
3030

31+
echo "********** Removing artifacts we don't want to deploy"
32+
rm -rf target/staging-deploy/com/approvaltests/approvaltests-parent
33+
rm -rf target/staging-deploy/com/approvaltests/approvaltests-util-tests
34+
rm -rf target/staging-deploy/com/approvaltests/approvaltests-tests
35+
rm -rf target/staging-deploy/com/approvaltests/CounterDisplay
36+
rm -rf target/staging-deploy/com/approvaltests/HtmlLocker
37+
3138
echo "********** Running JReleaser deploy"
32-
mvn jreleaser:deploy
39+
mvn -N jreleaser:deploy

internal_documentation/release.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,21 @@
88
1. the action succeeded (https://github.com/approvals/ApprovalTests.Java/actions/workflows/release.yml) (this takes ~3 minutes)
99
2. the release is available on Maven Central (https://search.maven.org/artifact/com.approvaltests/approvaltests) (takes usually ~30 minutes)
1010

11+
12+
## Release requirements
13+
14+
- [ ] Need a username and password from sonatype account (token)
15+
- Environmental variables MAVEN_USERNAME_2025 and MAVEN_PASSWORD_2025
16+
- [ ] We need a GPG key to sign the artifacts
17+
- Environmental variables GPG_PRIVATE_KEY and GPG_PASSPHRASE
18+
- You can test this with `internal_documentation/test_gpg_key.sh`
19+
- You can set versions using
20+
```
21+
mvn versions:set -DnewVersion=100.0.0-SNAPSHOT
22+
```
23+
- We only deploy `approvaltests` and `approvaltests-util`, the other projects do not need to be deployed
24+
- You can check the status at
25+
- https://central.sonatype.com/publishing/deployments
26+
- Note: You must be logged in as Llewellyn.
27+
- https://repo1.maven.org/maven2/com/approvaltests/approvaltests/
28+
- https://central.sonatype.com/artifact/com.approvaltests/approvaltests

jreleaser.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
project:
22
name: ApprovalTests.Java
33
description: Unit testing asserts can be difficult to use. Approval tests simplify this by taking a snapshot of the results, and confirming that they have not changed.
4-
website: http://approvaltests.com/
4+
links:
5+
homepage: http://approvaltests.com/
56
authors:
67
- Llewellyn Falco
78
- Lars Eckart
89
- Jay Bazuzi
910
license: Apache-2.0
10-
java:
11-
groupId: com.approvaltests
12-
version: 8
11+
languages:
12+
java:
13+
groupId: com.approvaltests
14+
version: 8
1315

1416
release:
1517
github:
1618
overwrite: false
1719

1820
signing:
19-
active: ALWAYS
21+
active: NEVER
2022
armored: true
2123

2224
deploy:
@@ -27,9 +29,4 @@ deploy:
2729
url: https://central.sonatype.com/api/v1/publisher
2830
stagingRepositories:
2931
- target/staging-deploy
30-
excludedArtifacts:
31-
- "approvaltests-parent*.pom"
32-
- "approvaltests-util-tests*"
33-
- "approvaltests-tests*"
34-
- "counter_display*"
35-
- "html_locker*"
32+
sign: false

pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,34 @@
133133
<artifactId>jreleaser-maven-plugin</artifactId>
134134
<version>1.19.0</version>
135135
<inherited>false</inherited>
136+
<configuration>
137+
<configFile>jreleaser.yml</configFile>
138+
</configuration>
139+
</plugin>
140+
<plugin>
141+
<groupId>org.codehaus.mojo</groupId>
142+
<artifactId>flatten-maven-plugin</artifactId>
143+
<version>1.6.0</version>
144+
<configuration>
145+
<updatePomFile>true</updatePomFile>
146+
<flattenMode>ossrh</flattenMode>
147+
</configuration>
148+
<executions>
149+
<execution>
150+
<id>flatten</id>
151+
<phase>process-resources</phase>
152+
<goals>
153+
<goal>flatten</goal>
154+
</goals>
155+
</execution>
156+
<execution>
157+
<id>flatten.clean</id>
158+
<phase>clean</phase>
159+
<goals>
160+
<goal>clean</goal>
161+
</goals>
162+
</execution>
163+
</executions>
136164
</plugin>
137165
</plugins>
138166
<resources>

0 commit comments

Comments
 (0)