Skip to content

Commit efdf5eb

Browse files
added maven-central OSSRH integration
1 parent 5482390 commit efdf5eb

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ target/*
2929
pom.xml.versionsBackup
3030
pom.xml.releaseBackup
3131
release.properties%
32+
settings.xml

pom.xml

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,30 @@
4646
</dependencies>
4747

4848
<distributionManagement>
49-
<repository>
50-
<uniqueVersion>false</uniqueVersion>
51-
<id>java-sdk-releases</id>
52-
<name>java-sdk releases</name>
53-
<url>file:///tmp</url>
54-
<layout>default</layout>
55-
</repository>
5649
<snapshotRepository>
57-
<uniqueVersion>true</uniqueVersion>
58-
<id>java-sdk-snapshots</id>
59-
<name>java-sdk snapshots</name>
60-
<url>file:///tmp</url>
61-
<layout>default</layout>
50+
<id>ossrh</id>
51+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
6252
</snapshotRepository>
53+
<repository>
54+
<id>ossrh</id>
55+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
56+
</repository>
6357
</distributionManagement>
64-
<!-- https://stackoverflow.com/questions/14013644/hosting-a-maven-repository-on-github?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa -->
6558

6659
<build>
6760
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
6861
<plugins>
62+
<plugin>
63+
<groupId>org.sonatype.plugins</groupId>
64+
<artifactId>nexus-staging-maven-plugin</artifactId>
65+
<version>1.6.8</version>
66+
<extensions>true</extensions>
67+
<configuration>
68+
<serverId>ossrh</serverId>
69+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
70+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
71+
</configuration>
72+
</plugin>
6973
<plugin>
7074
<artifactId>maven-clean-plugin</artifactId>
7175
<version>3.1.0</version>
@@ -102,11 +106,27 @@
102106
<groupId>org.apache.maven.plugins</groupId>
103107
<artifactId>maven-source-plugin</artifactId>
104108
<version>3.0.1</version>
109+
<executions>
110+
<execution>
111+
<id>attach-sources</id>
112+
<goals>
113+
<goal>jar-no-fork</goal>
114+
</goals>
115+
</execution>
116+
</executions>
105117
</plugin>
106118
<plugin>
107119
<groupId>org.apache.maven.plugins</groupId>
108120
<artifactId>maven-javadoc-plugin</artifactId>
109121
<version>3.0.0</version>
122+
<executions>
123+
<execution>
124+
<id>attach-javadocs</id>
125+
<goals>
126+
<goal>jar</goal>
127+
</goals>
128+
</execution>
129+
</executions>
110130
</plugin>
111131
<plugin>
112132
<groupId>org.apache.maven.plugins</groupId>
@@ -118,6 +138,20 @@
118138
<completionGoals>git-changelog:git-changelog scm:checkin -DpushChanges=false -Dincludes=CHANGELOG.md -Dmessage="[maven-release-plugin] Update CHANGELOG.md"</completionGoals>
119139
</configuration>
120140
</plugin>
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-gpg-plugin</artifactId>
144+
<version>1.6</version>
145+
<executions>
146+
<execution>
147+
<id>sign-artifacts</id>
148+
<phase>verify</phase>
149+
<goals>
150+
<goal>sign</goal>
151+
</goals>
152+
</execution>
153+
</executions>
154+
</plugin>
121155
<plugin>
122156
<groupId>info.plichta.maven.plugins</groupId>
123157
<artifactId>git-changelog-maven-plugin</artifactId>

0 commit comments

Comments
 (0)