Skip to content

Conversation

@nishaatr
Copy link
Contributor

@nishaatr nishaatr commented Sep 29, 2025

Background

After #502, Enterprise release deployment fails. The Central Publisher plugin always comes into play and tries to deploy to Maven Central and fails even though maven-deploy-plugin has been defined

I tried couple of things but didn't work so raised ticket with Central support and they confirmed about using Maven profile:

Having two publishing plugins in the same section of your POM always causes issues: there will be a race condition, and that fails the publishing pipeline intermittently, depending which plugin encounters an error first. The solution is, like you've mentioned, splitting these in different profiles.

Changes

  1. moved central-publishing-maven-plugin under new Maven profile release-central-staging and also added SNAPSHOT handling
  2. removed <distributionManagement> as not required
  3. removed -DskipStaging
  4. updated workflows to activate the new profile for OSS

Testing

  1. created temp Artifactory repo to test EE fully
  2. made test changes in separate branch (diff)

Snapshot

Version: 5.6.0-SNAPSHOT

  1. Build completed successfully
  2. OS deployed ok, example maven-metadata.xml
  3. JFrog EE deployed ok
  4. image

Release

Version: 1.1.1

  1. Build completed successfully
  2. OS validated ok
  3. image
  4. JFrog EE deployed ok
  5. image

Post tasks

  • cleanup staged deployments
  • delete temp branch
  • delete repo JFrog repo

Copy link
Contributor

@JackPGreen JackPGreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what deploy scenario wouldn't we want this profile?

@nishaatr
Copy link
Contributor Author

In what deploy scenario wouldn't we want this profile?

when deploying EE which will use maven-deploy-plugin instead.

This wasn't a problem with the old plugin. Central support said its a race condition but I always got the issue (for snapshot and release) so could be regression

@JackPGreen
Copy link
Contributor

In what deploy scenario wouldn't we want this profile?

when deploying EE which will use maven-deploy-plugin instead.

This wasn't a problem with the old plugin. Central support said its a race condition but I always got the issue (for snapshot and release) so could be regression

Ok - and there was no way we could solve this by moving the configuration to the respective OS/EE POMs?

@nishaatr
Copy link
Contributor Author

nishaatr commented Sep 30, 2025

In what deploy scenario wouldn't we want this profile?

when deploying EE which will use maven-deploy-plugin instead.
This wasn't a problem with the old plugin. Central support said its a race condition but I always got the issue (for snapshot and release) so could be regression

Ok - and there was no way we could solve this by moving the configuration to the respective OS/EE POMs?

We could move the plugin into the two OS modules but that means duplication. Another possible way could be:

  1. introduce another intermediate POM
  2. which inherits from root pom.xml
  3. define the Central plugin there to serve release and snapshot
  4. change parent of OS modules to point to this new pom but not EE
  5. move <distributionManagement> + maven-deploy-plugin to EE module

As this is only affects deploy, doing it via new profile is the simplest approach.

@nishaatr nishaatr merged commit 4055051 into main Oct 1, 2025
3 checks passed
@nishaatr nishaatr deleted the fix-ee-deployment branch October 1, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants