Skip to content

Commit f0faa94

Browse files
lauraharkercopybara-github
authored andcommitted
Migrate Maven config to use new publisher portal
PiperOrigin-RevId: 802458231
1 parent 6635b94 commit f0faa94

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

maven/closure-compiler-parent.pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,18 @@
9292

9393
<properties>
9494
<classesDirectory>${project.artifactId}-classes</classesDirectory>
95-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
9695
</properties>
9796

9897
<build>
9998
<plugins>
10099
<plugin>
101-
<groupId>org.sonatype.plugins</groupId>
102-
<artifactId>nexus-staging-maven-plugin</artifactId>
103-
<version>1.7.0</version>
100+
<groupId>org.sonatype.central</groupId>
101+
<artifactId>central-publishing-maven-plugin</artifactId>
102+
<version>0.8.0</version>
104103
<extensions>true</extensions>
105104
<configuration>
106-
<serverId>ossrh</serverId>
107-
<nexusUrl>${nexusUrl}</nexusUrl>
105+
<publishingServerId>central</publishingServerId>
106+
<autoPublish>${autoPublish}</autoPublish>
108107
</configuration>
109108
</plugin>
110109
<plugin>

release.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ readonly SCRIPT_NAME=$(basename "$0")
1919
readonly MAVEN_PROJECTS="parent main shaded unshaded externs"
2020

2121
deploy_to_sonatype=true
22-
sonatype_auto_release=false
22+
sonatype_auto_publish=false
2323
bazel_executable=""
2424
bazel_bin=$(pwd)/bazel-bin
2525
bazel_define_flag=""
@@ -28,12 +28,12 @@ usage() {
2828
echo ""
2929
echo "${SCRIPT_NAME}: Build and release script for Closure Compiler."
3030
echo ""
31-
echo "Usage: ${SCRIPT_NAME} [--no-deploy] [--sonatype-auto-release] [--help]"
31+
echo "Usage: ${SCRIPT_NAME} [--no-deploy] [--sonatype-auto-publish] [--help]"
3232
echo ""
3333
echo "Options:"
3434
echo " --help Print this help output and exit."
3535
echo " --no-deploy Prepare all the maven artifacts but skip the deployment to Sonatype."
36-
echo " --sonatype-auto-release Automatically release the staging repository on Sonatype after deployment."
36+
echo " --sonatype-auto-publish Automatically publish the staging repository to Sonatype after deployment."
3737
echo ""
3838
echo "Use the environment variable RELEASE_NUM to specify the release number:"
3939
echo " RELEASE_NUM=v1234567890 ./${SCRIPT_NAME}"
@@ -46,8 +46,8 @@ parse_arguments() {
4646
deploy_to_sonatype=false
4747
shift
4848
;;
49-
--sonatype-auto-release)
50-
sonatype_auto_release=true
49+
--sonatype-auto-publish)
50+
sonatype_auto_publish=true
5151
shift
5252
;;
5353
--help)
@@ -131,7 +131,7 @@ package_and_deploy() {
131131

132132
if [[ "${deploy_to_sonatype}" == true ]]; then
133133
echo "Deploying Maven artifacts to Sonatype..."
134-
mvn -f closure-compiler-parent.pom.xml deploy "-DautoReleaseAfterClose=${sonatype_auto_release}"
134+
mvn -f closure-compiler-parent.pom.xml deploy "-DautoPublish=${sonatype_auto_publish}"
135135
rm -rf "${mvn_temp_wd}"
136136
else
137137
echo "Packaging Maven artifacts..."

0 commit comments

Comments
 (0)