Skip to content

Commit a8bc0f8

Browse files
aksOpsclaude
andcommitted
fix: add source JAR, javadoc JAR, GPG signing for Maven Central
Central Portal requires all three artifacts. Moved from release profile to default build so beta releases include them too. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e366852 commit a8bc0f8

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

.github/workflows/beta-java.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
server-id: central
2525
server-username: MAVEN_USERNAME
2626
server-password: MAVEN_PASSWORD
27+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2728

2829
- name: Determine beta version
2930
id: version
@@ -52,7 +53,7 @@ jobs:
5253
env:
5354
MAVEN_USERNAME: ${{ secrets.OSS_NEXUS_USER }}
5455
MAVEN_PASSWORD: ${{ secrets.OSS_NEXUS_PASS }}
55-
run: mvn deploy -DskipTests -Dgpg.skip=true -B
56+
run: mvn deploy -DskipTests -B
5657

5758
- name: Create git tag
5859
env:

pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,59 @@
269269
<autoPublish>true</autoPublish>
270270
</configuration>
271271
</plugin>
272+
273+
<!-- Source JAR (required by Maven Central) -->
274+
<plugin>
275+
<groupId>org.apache.maven.plugins</groupId>
276+
<artifactId>maven-source-plugin</artifactId>
277+
<executions>
278+
<execution>
279+
<id>attach-sources</id>
280+
<goals>
281+
<goal>jar-no-fork</goal>
282+
</goals>
283+
</execution>
284+
</executions>
285+
</plugin>
286+
287+
<!-- Javadoc JAR (required by Maven Central) -->
288+
<plugin>
289+
<groupId>org.apache.maven.plugins</groupId>
290+
<artifactId>maven-javadoc-plugin</artifactId>
291+
<configuration>
292+
<doclint>none</doclint>
293+
</configuration>
294+
<executions>
295+
<execution>
296+
<id>attach-javadocs</id>
297+
<goals>
298+
<goal>jar</goal>
299+
</goals>
300+
</execution>
301+
</executions>
302+
</plugin>
303+
304+
<!-- GPG signing (required by Maven Central, no passphrase) -->
305+
<plugin>
306+
<groupId>org.apache.maven.plugins</groupId>
307+
<artifactId>maven-gpg-plugin</artifactId>
308+
<version>3.2.7</version>
309+
<executions>
310+
<execution>
311+
<id>sign-artifacts</id>
312+
<phase>verify</phase>
313+
<goals>
314+
<goal>sign</goal>
315+
</goals>
316+
<configuration>
317+
<gpgArguments>
318+
<arg>--pinentry-mode</arg>
319+
<arg>loopback</arg>
320+
</gpgArguments>
321+
</configuration>
322+
</execution>
323+
</executions>
324+
</plugin>
272325
</plugins>
273326
</build>
274327

0 commit comments

Comments
 (0)