Skip to content

Commit 68d0d10

Browse files
committed
♻️ migrate to maven central
1 parent 41b8d5c commit 68d0d10

File tree

3 files changed

+17
-38
lines changed

3 files changed

+17
-38
lines changed

.github/workflows/_publish-code.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,10 @@ jobs:
2424
with:
2525
java-version: "8"
2626
distribution: "adopt"
27-
server-id: ossrh
28-
server-username: MAVEN_USERNAME
29-
server-password: MAVEN_PASSWORD
3027

3128
- id: publish-to-central
3229
name: Publish to Central Repository
33-
env:
34-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
35-
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
3630
run: |
3731
mvn \
38-
--no-transfer-progress \
39-
--batch-mode \
4032
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
41-
clean deploy -P release
33+
clean deploy -P release verify

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ hs_err_pid*
4646

4747
# Mindee Test files
4848
local_test/
49+
50+
# local config
51+
settings.xml

pom.xml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,8 @@
3030
</developer>
3131
</developers>
3232

33-
<distributionManagement>
34-
<snapshotRepository>
35-
<id>ossrh</id>
36-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
37-
</snapshotRepository>
38-
<repository>
39-
<id>ossrh</id>
40-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
41-
</repository>
42-
</distributionManagement>
43-
4433
<build>
45-
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
34+
<pluginManagement>
4635
<plugins>
4736
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
4837
<plugin>
@@ -70,10 +59,6 @@
7059
<artifactId>maven-install-plugin</artifactId>
7160
<version>${org.apache.maven.install.version}</version>
7261
</plugin>
73-
<plugin>
74-
<artifactId>maven-deploy-plugin</artifactId>
75-
<version>${org.apache.maven.deploy.version}</version>
76-
</plugin>
7762
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
7863
<plugin>
7964
<artifactId>maven-site-plugin</artifactId>
@@ -136,17 +121,6 @@
136121
</execution>
137122
</executions>
138123
</plugin>
139-
<plugin>
140-
<groupId>org.sonatype.plugins</groupId>
141-
<artifactId>nexus-staging-maven-plugin</artifactId>
142-
<version>${org.sonatype.nexus.staging.maven.version}</version>
143-
<extensions>true</extensions>
144-
<configuration>
145-
<serverId>ossrh</serverId>
146-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
147-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
148-
</configuration>
149-
</plugin>
150124
</plugins>
151125
</pluginManagement>
152126
<plugins>
@@ -158,6 +132,15 @@
158132
<target>8</target>
159133
</configuration>
160134
</plugin>
135+
<plugin>
136+
<groupId>org.sonatype.central</groupId>
137+
<artifactId>central-publishing-maven-plugin</artifactId>
138+
<version>0.7.0</version>
139+
<extensions>true</extensions>
140+
<configuration>
141+
<publishingServerId>central</publishingServerId>
142+
</configuration>
143+
</plugin>
161144
</plugins>
162145
</build>
163146

@@ -219,6 +202,9 @@
219202
<goals>
220203
<goal>sign</goal>
221204
</goals>
205+
<configuration>
206+
<keyname>opensource@mindee.co</keyname>
207+
</configuration>
222208
</execution>
223209
</executions>
224210
</plugin>
@@ -405,7 +391,6 @@
405391
<org.apache.httpcomponents.httpmime.version>4.5.14</org.apache.httpcomponents.httpmime.version>
406392
<org.apache.maven.clean.version>3.1.0</org.apache.maven.clean.version>
407393
<org.apache.maven.compiler.version>3.12.1</org.apache.maven.compiler.version>
408-
<org.apache.maven.deploy.version>3.1.1</org.apache.maven.deploy.version>
409394
<org.apache.maven.failsafe.version>3.3.0</org.apache.maven.failsafe.version>
410395
<org.apache.maven.gpg.version>1.5</org.apache.maven.gpg.version>
411396
<org.apache.maven.install.version>2.5.2</org.apache.maven.install.version>
@@ -426,7 +411,6 @@
426411
<org.projectlombok.lombok-mapstruct-binding.version>0.2.0</org.projectlombok.lombok-mapstruct-binding.version>
427412
<org.projectlombok.version>1.18.32</org.projectlombok.version>
428413
<org.slf4j.version>2.0.17</org.slf4j.version>
429-
<org.sonatype.nexus.staging.maven.version>1.6.12</org.sonatype.nexus.staging.maven.version>
430414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
431415
<wiremock.version>2.27.2</wiremock.version>
432416
</properties>

0 commit comments

Comments
 (0)