Skip to content

Commit 66abe9d

Browse files
authored
Add instructions for releasing to Maven Central.
1 parent 9619b0c commit 66abe9d

File tree

3 files changed

+107
-9
lines changed

3 files changed

+107
-9
lines changed

javaparser-core/cfMavenCentral.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
4+
<modelVersion>4.0.0</modelVersion>
5+
<packaging>jar</packaging>
6+
7+
<name>Stub Parser</name>
8+
<url>https://github.com/typetools/stubparser</url>
9+
<description>This project contains a parser for the Checker Framework's stub files: https://checkerframework.org/manual/#stub . It is a fork of the JavaParser project.</description>
10+
11+
<groupId>org.checkerframework</groupId>
12+
<artifactId>stubparser</artifactId>
13+
14+
<licenses>
15+
<license>
16+
<name>Apache License 2.0</name>
17+
<url>http://www.apache.org/licenses/</url>
18+
<distribution>repo</distribution>
19+
</license>
20+
</licenses>
21+
22+
<version>3.25.5</version>
23+
24+
<scm>
25+
<url>https://github.com/typetools/stubparser.git</url>
26+
<connection>https://github.com/typetools/stubparser.git</connection>
27+
</scm>
28+
29+
<developers>
30+
31+
<developer>
32+
<id>Michael Ernst</id>
33+
<name>Michael Ernst</name>
34+
<email>[email protected]</email>
35+
<url>http://homes.cs.washington.edu/~mernst/</url>
36+
<organization>University of Washington</organization>
37+
<organizationUrl>https://www.cs.washington.edu/</organizationUrl>
38+
</developer>
39+
40+
<developer>
41+
<id>Suzanne Millstein</id>
42+
<name>Suzanne Millstein</name>
43+
<email>[email protected]</email>
44+
<organization>University of Washington</organization>
45+
<organizationUrl>https://www.cs.washington.edu/research/plse/</organizationUrl>
46+
</developer>
47+
48+
</developers>
49+
50+
</project>

javaparser-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</properties>
3131

3232
<build>
33-
<finalName>stubparser-3.25.3</finalName>
33+
<finalName>stubparser-3.25.5</finalName>
3434
<plugins>
3535
<plugin>
3636
<groupId>com.helger.maven</groupId>

readme.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,83 @@ git checkout -b updating-${TAG_NAME}
5454
git pull https://github.com/javaparser/javaparser ${TAG_NAME}
5555
```
5656
5. Resolve conflicts if required and commit it (but don't push yet).
57-
6. Update the StubParser version to the JavaParser version in the `<finalName>` block of `javaparser-core/pom.xml`.
57+
6. Update the StubParser version to the JavaParser version to the version number in the `<finalName>` block of `javaparser-core/pom.xml`.
5858
(There should not be "-SNAPSHOT" there or in `<version>` in `pom.xml`.)
5959
7. Run Maven tests in the root directory:
6060
```bash
6161
./mvnw install test
6262
```
6363
If any tests fail, fix them before continuing.
6464

65-
8. Update the stubparser version number in the Checker Framework. Create
65+
8. Deploy the snapshot. (This has been tested on tern.)
66+
Update the `version` block in `javaparser-core/cfMavenCentral.xml` to be the same as the
67+
JavaParser version plus `-SNAPSHOT`. Run the following in `javaparser-core`
68+
```
69+
export STUBPARSER=stubparser-3.25.5
70+
export HOSTING_INFO_DIR=/projects/swlab1/checker-framework/hosting-info
71+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/content/repositories/snapshots/ \
72+
-DpomFile=cfMavenCentral.xml -Dfile=target/$STUBPARSER_JAR.jar\
73+
74+
-Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" \
75+
-DrepositoryId=sonatype-nexus-staging
76+
```
77+
(You must have a file at `~/.m2/settings.xml` that lists a username and password for Sonatypes.)
78+
79+
9. Update the stubparser version number in the Checker Framework. Create
6680
a branch with the same name as your StubParser branch. In
6781
`checker-framework/build.gradle`, update `stubparserJar`.
68-
9. Run Checker Framework tests (`./gradlew build`), using your StubParser branch.
82+
10. Run Checker Framework tests (`./gradlew build`), using your StubParser branch.
6983
If any tests fail, fix them before continuing.
70-
10. Commit and push your changes to Checker Framework.
71-
11. Push commits to your fork of StubParser.
84+
11. Commit and push your changes to Checker Framework.
85+
12. Once the Azure tests pass, release the Stubparser:
86+
87+
Delete `-SNAPSHOT` from the version in `javaparser-core/cfMavenCentral.xml`.
88+
89+
```
90+
mvn source:jar && \
91+
mvn javadoc:javadoc && (cd target/site/apidocs && jar -c -f target/$STUBPARSER-javadoc.jar com)
92+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
93+
-DpomFile=cfMavenCentral.xml -Dfile=target/$STUBPARSER.jar \
94+
95+
-Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" \
96+
-DrepositoryId=sonatype-nexus-staging
97+
98+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
99+
-DpomFile=cfMavenCentral.xml \
100+
101+
-Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" \
102+
-DrepositoryId=sonatype-nexus-staging \
103+
-Dclassifier=javadoc -Dfile=target/$STUBPARSER-javadoc.jar
104+
105+
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
106+
-DpomFile=cfMavenCentral.xml \
107+
108+
-Dgpg.passphrase="`cat $HOSTING_INFO_DIR/release-private.password`" \
109+
-DrepositoryId=sonatype-nexus-staging \
110+
-Dclassifier=sources -Dfile=target/$STUBPARSER-sources.jar
111+
112+
```
113+
114+
Complete the release at https://oss.sonatype.org/#stagingRepositories.
115+
116+
13. In the Checker Framework, remove `SNAPSHOT` in the StubParser version numbers.
117+
Commit and push your changes to Checker Framework.
118+
119+
14. Push commits to your fork of StubParser.
72120
```bash
73121
git push
74122
```
75123
GitHub Actions CI will not run for your branch.
76124

77-
12. Create a [pull request to `typetools/stubparser`](https://github.com/typetools/stubparser).
125+
15. Create a [pull request to `typetools/stubparser`](https://github.com/typetools/stubparser).
78126
Give it a title like "Update to JavaParser 3.24.3".
79127
Do *not* squash-and-merge the pull request;
80128
you want to keep a history of what upstream commits were merged in.
81129

82-
13. Create a [pull request to `typetools/checker-framework`](https://github.com/typetools/checkerframework).
130+
16. Create a [pull request to `typetools/checker-framework`](https://github.com/typetools/checkerframework).
83131
Give it a title like "Update to StubParser 3.24.3".
84132

85-
14. Merge both pull requests when both pass.
133+
17. Merge both pull requests when both pass.
86134

87135

88136
## Changes to StubParser that break the Checker Framework

0 commit comments

Comments
 (0)