Skip to content

Commit 92710ed

Browse files
authored
Attempt to fix maven deploy. (#1582)
1 parent 9cd0dfd commit 92710ed

3 files changed

Lines changed: 36 additions & 45 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
java-version: '17'
2121
distribution: 'temurin'
2222
cache: maven
23-
server-id: ossrh
23+
server-id: central
2424
server-username: MAVEN_USERNAME
2525
server-password: MAVEN_PASSWORD
2626
- name: Publish package
2727
run: ./mvnw --batch-mode -Dstyle.color=always deploy
2828
env:
29-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
30-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
29+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
30+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

.github/workflows/release-from-tag.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
java-version: '17'
3737
distribution: 'temurin'
3838
cache: maven
39-
server-id: ossrh
39+
server-id: central
4040
server-username: MAVEN_USERNAME
4141
server-password: MAVEN_PASSWORD
4242
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
4343

4444
- name: Publish to the Maven Central Repository
45-
run: mvn --batch-mode clean deploy -Possrh
45+
run: mvn --batch-mode clean deploy
4646
env:
47-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
48-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
47+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
48+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

pom.xml

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34
<groupId>net.datafaker</groupId>
45
<artifactId>datafaker</artifactId>
56
<packaging>jar</packaging>
67
<version>2.4.3-SNAPSHOT</version>
78
<name>Datafaker</name>
89
<description>
9-
This library is an improved fork of JavaFaker (as well as Ruby's stympy/faker gem and Perl's Data::Faker library)
10-
that generates fake data. It's useful when you're developing a new project and need some pretty data for showcase.
10+
This library is an improved fork of JavaFaker (as well as Ruby's stympy/faker gem and Perl's Data::Faker
11+
library)
12+
that generates fake data. It's useful when you're developing a new project and need some pretty data for
13+
showcase.
1114
</description>
1215
<url>https://www.datafaker.net</url>
1316
<developers>
@@ -176,16 +179,6 @@
176179
<scope>test</scope>
177180
</dependency>
178181
</dependencies>
179-
<distributionManagement>
180-
<snapshotRepository>
181-
<id>ossrh</id>
182-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
183-
</snapshotRepository>
184-
<repository>
185-
<id>ossrh</id>
186-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
187-
</repository>
188-
</distributionManagement>
189182
<build>
190183
<pluginManagement>
191184
<plugins>
@@ -214,6 +207,15 @@
214207
</plugins>
215208
</pluginManagement>
216209
<plugins>
210+
<plugin>
211+
<groupId>org.sonatype.central</groupId>
212+
<artifactId>central-publishing-maven-plugin</artifactId>
213+
<version>0.8.0</version>
214+
<extensions>true</extensions>
215+
<configuration>
216+
<publishingServerId>central</publishingServerId>
217+
</configuration>
218+
</plugin>
217219
<plugin>
218220
<groupId>org.apache.maven.plugins</groupId>
219221
<artifactId>maven-enforcer-plugin</artifactId>
@@ -240,22 +242,22 @@
240242
<version>${spotless-maven-plugin.version}</version>
241243
<configuration>
242244
<java>
243-
<removeUnusedImports />
245+
<removeUnusedImports/>
244246
</java>
245247
<yaml>
246-
<includes>
247-
<include>src/main/resources/en/**/*.yml</include>
248-
<include>src/test/resources/**/*.yml</include>
249-
</includes>
250-
<jackson>
251-
<features>
252-
<ORDER_MAP_ENTRIES_BY_KEYS>true</ORDER_MAP_ENTRIES_BY_KEYS>
253-
</features>
254-
<yamlFeatures>
255-
<WRITE_DOC_START_MARKER>false</WRITE_DOC_START_MARKER>
256-
<SPLIT_LINES>false</SPLIT_LINES>
257-
</yamlFeatures>
258-
</jackson>
248+
<includes>
249+
<include>src/main/resources/en/**/*.yml</include>
250+
<include>src/test/resources/**/*.yml</include>
251+
</includes>
252+
<jackson>
253+
<features>
254+
<ORDER_MAP_ENTRIES_BY_KEYS>true</ORDER_MAP_ENTRIES_BY_KEYS>
255+
</features>
256+
<yamlFeatures>
257+
<WRITE_DOC_START_MARKER>false</WRITE_DOC_START_MARKER>
258+
<SPLIT_LINES>false</SPLIT_LINES>
259+
</yamlFeatures>
260+
</jackson>
259261
</yaml>
260262
</configuration>
261263
<executions>
@@ -358,17 +360,6 @@
358360
</execution>
359361
</executions>
360362
</plugin>
361-
<plugin>
362-
<groupId>org.sonatype.plugins</groupId>
363-
<artifactId>nexus-staging-maven-plugin</artifactId>
364-
<version>${nexus-staging-maven-plugin.version}</version>
365-
<extensions>true</extensions>
366-
<configuration>
367-
<serverId>ossrh</serverId>
368-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
369-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
370-
</configuration>
371-
</plugin>
372363
<!-- Attaching source to comply OSSRH -->
373364
<plugin>
374365
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)