Skip to content

Commit 17f8af4

Browse files
SNOW-2277590 New Maven Central publish plugin (#1158)
1 parent d8573f8 commit 17f8af4

File tree

3 files changed

+20
-30
lines changed

3 files changed

+20
-30
lines changed

deploy.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ if ! gpg --list-secret-key | grep "$GPG_KEY_ID"; then
2525
gpg --allow-secret-key-import --import "$GPG_PRIVATE_KEY"
2626
fi
2727

28-
OSSRH_DEPLOY_SETTINGS_XML="$THIS_DIR/mvn_settings_ossrh_deploy.xml"
28+
CENTRAL_DEPLOY_SETTINGS_XML="$THIS_DIR/mvn_settings_central_deploy.xml"
2929

30-
cat > $OSSRH_DEPLOY_SETTINGS_XML << SETTINGS.XML
30+
cat > $CENTRAL_DEPLOY_SETTINGS_XML << SETTINGS.XML
3131
<?xml version="1.0" encoding="UTF-8"?>
3232
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3333
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3434
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
3535
<servers>
3636
<server>
37-
<id>ossrh</id>
37+
<id>central</id>
3838
<username>$SONATYPE_USER</username>
3939
<password>$SONATYPE_PWD</password>
4040
</server>
4141
</servers>
4242
<profiles>
4343
<profile>
44-
<id>ossrh</id>
44+
<id>central</id>
4545
<activation>
4646
<activeByDefault>true</activeByDefault>
4747
</activation>
@@ -55,10 +55,10 @@ cat > $OSSRH_DEPLOY_SETTINGS_XML << SETTINGS.XML
5555
</settings>
5656
SETTINGS.XML
5757

58-
mvn --settings $OSSRH_DEPLOY_SETTINGS_XML -DskipTests clean deploy
58+
mvn --settings $CENTRAL_DEPLOY_SETTINGS_XML -DskipTests clean deploy
5959

6060
#confluent release
61-
mvn -f pom_confluent.xml --settings $OSSRH_DEPLOY_SETTINGS_XML -DskipTests clean package
61+
mvn -f pom_confluent.xml --settings $CENTRAL_DEPLOY_SETTINGS_XML -DskipTests clean package
6262
#white source
6363
# whitesource/run_whitesource.sh
6464

pom.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<connection>
4040
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
4141
</connection>
42+
<developerConnection>
43+
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
44+
</developerConnection>
4245
<url>https://github.com/snowflakedb/snowflake-kafka-connector</url>
4346
</scm>
4447

@@ -89,12 +92,6 @@
8992
</repository>
9093
</repositories>
9194

92-
<distributionManagement>
93-
<snapshotRepository>
94-
<id>ossrh</id>
95-
<url>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots</url>
96-
</snapshotRepository>
97-
</distributionManagement>
9895
<build>
9996
<plugins>
10097
<plugin>
@@ -156,14 +153,12 @@
156153
</executions>
157154
</plugin>
158155
<plugin>
159-
<groupId>org.sonatype.plugins</groupId>
160-
<artifactId>nexus-staging-maven-plugin</artifactId>
161-
<version>1.7.0</version>
156+
<groupId>org.sonatype.central</groupId>
157+
<artifactId>central-publishing-maven-plugin</artifactId>
158+
<version>0.8.0</version>
162159
<extensions>true</extensions>
163160
<configuration>
164-
<serverId>ossrh</serverId>
165-
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
166-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
161+
<autoPublish>true</autoPublish>
167162
</configuration>
168163
</plugin>
169164
<plugin>

pom_confluent.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<connection>
4040
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
4141
</connection>
42+
<developerConnection>
43+
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
44+
</developerConnection>
4245
<url>https://github.com/snowflakedb/snowflake-kafka-connector</url>
4346
</scm>
4447

@@ -99,12 +102,6 @@
99102
</repository>
100103
</repositories>
101104

102-
<distributionManagement>
103-
<snapshotRepository>
104-
<id>ossrh</id>
105-
<url>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots</url>
106-
</snapshotRepository>
107-
</distributionManagement>
108105
<build>
109106
<plugins>
110107
<!--
@@ -314,14 +311,12 @@
314311
</executions>
315312
</plugin>
316313
<plugin>
317-
<groupId>org.sonatype.plugins</groupId>
318-
<artifactId>nexus-staging-maven-plugin</artifactId>
319-
<version>1.7.0</version>
314+
<groupId>org.sonatype.central</groupId>
315+
<artifactId>central-publishing-maven-plugin</artifactId>
316+
<version>0.8.0</version>
320317
<extensions>true</extensions>
321318
<configuration>
322-
<serverId>ossrh</serverId>
323-
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
324-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
319+
<autoPublish>true</autoPublish>
325320
</configuration>
326321
</plugin>
327322
<plugin>

0 commit comments

Comments
 (0)