GitHub Actions snapshot deployment was failing with:
Failed to deploy artifacts: Could not find artifact com.adobe.aem.commons:assetshare:pom:3.13.3-20260204.160725-1 in central
- Wrong Repository URL: Snapshots require a different endpoint than releases
- Missing Namespace Configuration: Snapshot support must be explicitly enabled in the Maven Central Portal
File: pom.xml
Changed distribution management to use the correct URLs:
<snapshotRepository>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>central</id>
<url>https://central.sonatype.com</url>
</repository>File: pom.xml
Changed the default plugin behavior to be snapshot-friendly:
<!-- Default: optimized for snapshots -->
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish> <!-- Just upload, don't publish -->
<waitUntil>uploaded</waitUntil> <!-- Don't wait for publishing -->
<ignorePublishedComponents>true</ignorePublishedComponents>
</configuration>Added release profile override:
<!-- Release profile: override for releases -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<configuration>
<autoPublish>true</autoPublish> <!-- Auto-publish releases -->
<waitUntil>published</waitUntil> <!-- Wait for publication -->
</configuration>
</plugin>File: MAVEN_CENTRAL_PUBLISHING.md
- Added prerequisites section explaining snapshot enablement
- Updated configuration documentation
- Clarified snapshot vs release behavior
- Go to https://central.sonatype.com/publishing/namespaces
- Find your namespace:
com.adobe.aem.commons - Click the dropdown menu (three dots) on the right
- Select "Enable SNAPSHOTs"
- Confirm in the popup
- Verify you see a "SNAPSHOTs enabled" badge
mvn clean deploy -Pcloud,release- Uploads to:
https://central.sonatype.com/repository/maven-snapshots/ - No validation performed (
autoPublish=false) - Returns immediately after upload (
waitUntil=uploaded) - Snapshots are cleaned up after 90 days
mvn clean deploy -Pcloud,release- Uploads to:
https://central.sonatype.com/ - Full validation performed
- Auto-publishes to Maven Central
- Waits for publication to complete
After enabling snapshots in the Portal:
- Push to develop branch - This will trigger the snapshot workflow
- Monitor GitHub Actions - Watch the deployment succeed
- Verify snapshot published - Check https://central.sonatype.com/repository/maven-snapshots/com/adobe/aem/commons/
| Aspect | Old (OSSRH) | New (Central Portal) |
|---|---|---|
| Snapshot URL | https://oss.sonatype.org/content/repositories/snapshots/ |
https://central.sonatype.com/repository/maven-snapshots/ |
| Release URL | https://oss.sonatype.org/service/local/staging/deploy/maven2/ |
https://central.sonatype.com |
| Snapshot Setup | Automatic | Requires namespace enablement |
| Snapshot Validation | None | None |
| Snapshot Cleanup | None | 90 days |
| Release Validation | Manual staging | Automatic |
The configuration is now correct. Once you enable snapshots for your namespace in the Portal, both snapshot and release deployments should work seamlessly in GitHub Actions!