Skip to content

Commit 022bbb6

Browse files
gl-johnsonGitHub Enterprise
authored andcommitted
Merge pull request #21 from Conjur-Enterprise/CNJR-9556-migration-to-central-portal
CNJR-9556: Migrating to central portal.
2 parents 6017c15 + c8fc7d5 commit 022bbb6

File tree

4 files changed

+20
-32
lines changed

4 files changed

+20
-32
lines changed

bin/publish.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ fi
2424
mkdir -p maven_cache
2525

2626
if [[ "${MODE:-}" == "PROMOTE" ]]; then
27-
echo "PROMOTE build, publishing to internal artifactory and ossrh (maven central)"
28-
maven_profiles="artifactory,ossrh,sign"
27+
echo "PROMOTE build, publishing to internal artifactory and central portal (maven central)"
28+
maven_profiles="artifactory,central-portal,sign"
2929
else
3030
echo "Release build, publishing to internal artifactory"
3131
maven_profiles="artifactory,sign"
3232
fi
3333

3434
docker run \
35-
-e OSSRH_USERNAME \
36-
-e OSSRH_PASSWORD \
35+
-e CENTRAL_PORTAL_USERNAME \
36+
-e CENTRAL_PORTAL_TOKEN \
3737
-e JFROG_USERNAME \
3838
-e JFROG_APIKEY \
3939
-e JFROG_URL \

pom.xml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,37 +58,25 @@
5858
</distributionManagement>
5959
</profile>
6060

61-
<!-- Profile for deploying and releasing to Maven Central through OSSRH -->
61+
<!-- Profile for deploying and releasing to Maven Central through Central Portal -->
6262
<profile>
63-
<id>ossrh</id>
64-
<distributionManagement>
65-
<snapshotRepository>
66-
<id>ossrh</id>
67-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
68-
</snapshotRepository>
69-
<repository>
70-
<id>ossrh</id>
71-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
72-
</repository>
73-
</distributionManagement>
74-
63+
<id>central-portal</id>
7564
<build>
7665
<plugins>
7766
<plugin>
78-
<groupId>org.sonatype.plugins</groupId>
79-
<artifactId>nexus-staging-maven-plugin</artifactId>
80-
<version>1.6.7</version>
67+
<groupId>org.sonatype.central</groupId>
68+
<artifactId>central-publishing-maven-plugin</artifactId>
69+
<version>0.7.0</version>
8170
<extensions>true</extensions>
8271
<configuration>
83-
<serverId>ossrh</serverId>
84-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
85-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
72+
<publishingServerId>central</publishingServerId>
73+
<autoPublish>true</autoPublish>
8674
</configuration>
8775
</plugin>
8876
<plugin>
8977
<groupId>org.apache.maven.plugins</groupId>
9078
<artifactId>maven-source-plugin</artifactId>
91-
<version>2.2.1</version>
79+
<version>3.2.1</version>
9280
<executions>
9381
<execution>
9482
<id>attach-sources</id>
@@ -101,7 +89,7 @@
10189
<plugin>
10290
<groupId>org.apache.maven.plugins</groupId>
10391
<artifactId>maven-javadoc-plugin</artifactId>
104-
<version>2.9.1</version>
92+
<version>3.4.0</version>
10593
<executions>
10694
<execution>
10795
<id>attach-javadocs</id>
@@ -295,11 +283,11 @@
295283
<plugin>
296284
<groupId>org.apache.maven.plugins</groupId>
297285
<artifactId>maven-release-plugin</artifactId>
298-
<version>2.5.3</version>
286+
<version>3.1.1</version>
299287
<configuration>
300288
<autoVersionSubmodules>true</autoVersionSubmodules>
301289
<useReleaseProfile>false</useReleaseProfile>
302-
<releaseProfiles>ossrh,sign</releaseProfiles>
290+
<releaseProfiles>central-portal,sign</releaseProfiles>
303291
<goals>deploy</goals>
304292
<tagNameFormat>v@{project.version}</tagNameFormat>
305293
</configuration>

secrets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ JFROG_USERNAME: !var ci/artifactory/users/jenkins/username
44
JFROG_APIKEY: !var ci/artifactory/users/jenkins/password
55
JFROG_REPO: "libs-snapshot-local"
66

7-
OSSRH_USERNAME: !var ecosystems/java/ossrh/token/username
8-
OSSRH_PASSWORD: !var ecosystems/java/ossrh/token/password
7+
CENTRAL_PORTAL_USERNAME: !var ecosystems/java/ossrh/token/username
8+
CENTRAL_PORTAL_TOKEN: !var ecosystems/java/ossrh/token/password
99
GPG_PRIVATE_KEY: !var:file ecosystems/java/gpg/private-key
1010
GPG_PASSWORD: !var:file ecosystems/java/gpg/password

settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<password>${env.JFROG_APIKEY}</password>
1515
</server>
1616
<server>
17-
<id>ossrh</id>
18-
<username>${env.OSSRH_USERNAME}</username>
19-
<password>${env.OSSRH_PASSWORD}</password>
17+
<id>central</id>
18+
<username>${env.CENTRAL_PORTAL_USERNAME}</username>
19+
<password>${env.CENTRAL_PORTAL_TOKEN}</password>
2020
</server>
2121
</servers>
2222
<profiles>

0 commit comments

Comments
 (0)