-
Notifications
You must be signed in to change notification settings - Fork 267
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
2.8.x: Unable to set project version when parent POM is in a project subdirectory #426
Comments
Do you have a full working example of this project? |
I will assemble one that demonstrates the issue |
https://github.com/robincsmith/versions-maven-plugin-2.8.1-breaking-change - includes a README, with replication steps |
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1880830 13f79535-47bb-0310-9956-ffa450edef68
Latest version doesn't support setting version with parent pom in a subdirectory, so use the last version that worked. Also better to specify version explicitly than to automatically get latest version. See mojohaus/versions#426
Latest version doesn't support setting version with parent pom in a subdirectory, so use the last version that worked. Also better to specify version explicitly than to automatically get latest version. See mojohaus/versions#426
@khmarbaise is this repo useful for reproducing the issue? |
as discussed in #82 i propose to add a new property to the 'set' goal that optionally brings the previous behavior back. i'm the opinion that the new behavior is more correct and there are use cases which break if this change is reverted. it would then be required to add this new property to the command like call like this (example, naming to be done):
|
From an automation point of view, I don't think that's ideal. If our CI server is running the Likewise, from a user point of view, it's potentially confusing to need to add this new flag to this handy, simple command that users will have run many times in the past. I'd suggest adding a flag to enable the new feature. But I'm perhaps biased in that respect, as I'm using the old feature. Your suggestion may be the right one. |
I agree with @robincsmith. If you add a new flag it should be to switch on the new behaviour. Existing uses of the plugin should not be broken IMHO. |
understood, if no other proposal is raised i can come up with a PR for this, adding an optional flag for the new behavior. |
Any progress update on this issue? I see the PR has been submitted - can you please tell me when will this be released? |
i have no commit rights unfortuantely - maybe ask at the "MojoHaus Development" mailing list, see https://www.mojohaus.org/mail-lists.html |
I'lve stumbled over this as well. I think the stance of @ghilainm in #82 that he can organize his project tree in any way he wishes is wrong. Maven has very specific rules what it considers part of the reactor build. When I change the version of the parent POM of a reactor build, all related children (i.e. those POMs which use the modified POM as parent) should change as well. If he puts different projects into one reactor build, then that's not really supported by Maven. It just works as long as he's careful. I would prefer a flag which says "just change a single file". This should be possible by using -pl on the Maven command line. If -pl doesn't work, then add a -D flag to enable this. Then people like @ghilainm can add that in the configuration element in the POM. |
The changes for 2.8.1 break the
versions:set
goal for any project that has a parent POM (e.g. a Bill of Materials POM) in a subdirectory.Project directory structure:
Extract from
pom.xml
:Extract from
product-bom/pom.xml
:Running
mvn versions:set -DnewVersion=2.0.0-SNAPSHOT --file product-bom/pom.xml
succeeds, but only updates the project version inproduct-bom/pom.xml
- this breaks the project structure, as the test-product POM and product-bom POM version numbers no longer match.Running
mvn versions:set -DnewVersion=2.0.0-SNAPSHOT
fails with the following message:Please could you revert this breaking change?
The text was updated successfully, but these errors were encountered: