Problem
Artifacts are only published to packagecloud.io, not Maven Central.
Impact
- Severity: MEDIUM
- Category: Distribution/Adoption
- Not discoverable in Maven Central search
- Users must add custom repository to pom.xml
- Limits adoption (many orgs only allow Maven Central)
- Reduced visibility in ecosystem
Current Distribution
<distributionManagement>
<repository>
<id>packagecloud-flossware</id>
<url>https://packagecloud.io/flossware/java/maven2/</url>
</repository>
</distributionManagement>
Maven Central Requirements
- Group ID:
org.flossware.jplatform ✅ (already correct)
- Artifact signing: GPG signature required
- Javadoc JAR: Must be published
- Sources JAR: Must be published
- POM completeness: developers, scm, licenses ✅
- OSSRH account: Create at https://issues.sonatype.org/
Implementation Steps
1. Sign Artifacts
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
</execution>
</executions>
</plugin>
2. Generate Javadoc and Sources JARs
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution><id>attach-javadocs</id></execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution><id>attach-sources</id></execution>
</executions>
</plugin>
3. Add Nexus Staging Plugin
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
</plugin>
4. Configure in ~/.m2/settings.xml
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>
GitHub Actions Integration
- name: Deploy to Maven Central
run: mvn deploy -P release
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Priority
P2 - Medium - Should be done for v1.2 or v1.3 release.
Resources
Problem
Artifacts are only published to packagecloud.io, not Maven Central.
Impact
Current Distribution
Maven Central Requirements
org.flossware.jplatform✅ (already correct)Implementation Steps
1. Sign Artifacts
2. Generate Javadoc and Sources JARs
3. Add Nexus Staging Plugin
4. Configure in
~/.m2/settings.xmlGitHub Actions Integration
Priority
P2 - Medium - Should be done for v1.2 or v1.3 release.
Resources