Skip to content

use Maven CI friendly versions #3325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minijackson
Copy link
Contributor

This is a proposition to centralize the Phoebus version in the root pom.xml, in the revision property. This is an official Maven workflow, specified here: https://maven.apache.org/guides/mini/guide-maven-ci-friendly.html

This enables downstream users to make their own versions, by specifying -Drevision=4.7.4-42-SNAPSHOT in the Maven command-line.

This also should make the Maven release plugin unnecessary, since the version is specified in a central place, according to: https://stackoverflow.com/a/67012045

Tested with the command mvn package -DskipTests -Drevision=4.7.4-42-SNAPSHOT

This enables downstream users to make their own versions,
by specifying -Drevision=4.7.4-42-SNAPSHOT in the Maven command-line.

This also should make the Maven release plugin unnecessary,
since the version is specified in a central place.

More information here:
https://maven.apache.org/guides/mini/guide-maven-ci-friendly.html
and here:
https://stackoverflow.com/a/67012045
@katysaintin
Copy link
Contributor

@shroffk @georgweiss ,
I think it is interesting to facilitate the next realease in 5.0.0 revision. This commit will allow us only one the modification in parent pom.xml file. What do you think ?

Katy

@georgweiss
Copy link
Collaborator

@katysaintin, we use the release plugin to also push build artifacts to Maven Central. How does this PR affect that step?

@katysaintin
Copy link
Contributor

katysaintin commented Mar 17, 2025

I will ask to @minijackson , test a release in his fork before. @minijackson could you test a release with this modification in order to check if there is no unexpected effect side ?

Here are the command to perform a release :
In this step will ensure there are no uncommitted changes, ensure the versions number are correct, tag the scm, etc. A full list of checks is documented here.
1 - Prepare release
mvn release:prepare

2 - Perform the release
mvn -Darguments="-Dskip-executable-jar" -Pdocs,releases release:perform

@minijackson
Copy link
Contributor Author

I'm in training this week, so I'll probably won't have the time to check it until next week, but according to the StackOverflow answer, it should make the release plugin not needed anymore.

But I don't know how you use the release plugin, so I'll need your help to figure out if that's the case.

@georgweiss
Copy link
Collaborator

Things is that the release plugin works together with the sonatype staging plugin such that build artifacts are published to Maven Central. Consequently I am a bit concerned about removing the release plugin.

@shroffk
Copy link
Member

shroffk commented Mar 20, 2025

I think the main sticking point here is to make sure that the version described as a property are handled by the maven release plugin.

How do all the IDEs like this?

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