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
bnd-baseline-maven-plugin doesn't baseline against version ranges #2315
Comments
doesn't |
bnd/maven/bnd-baseline-maven-plugin/src/main/java/aQute/bnd/maven/baseline/plugin/BaselineMojo.java Line 184 in f553787
There is a workaround when the default range is "any version" like: Artifact toCheck = toFind.setVersion("[0,)");
btw: do you know why this single change makes integration-tests fail?
|
See http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html. But using |
But I do see that the plugin does not correctly handle using versions in the configuration. I am looking at a fix now. |
In bndtools, the default behavior is to baseline against the latest version in the repository, so we can't release a version between two existing versions. Can you confirm that this difference is intentional? |
I don't know what Bndtools does here. Sorry. |
With the fix in #2316, you can specify a range in the configuration and the baseline will use the highest version in the range. |
Just to confirm what others are saying:
This is a really bad way to set up your build. Maven builds are supposed to be repeatable in the future so you should never attempt to baseline against a version that is higher than the version being built. Imagine, for example, that you release version 1.0.0, then later you release version 1.1.0. At this point you can no longer rebuild the tagged version 1.0.0 (or any 1.0.x fixes) because it will fail baselining against 1.1.0. |
As an eclipse bndtools user, I expect the bnd-baseline-maven-plugin to work similarly and baseline against the highest version (latest).
My test is based on valid-no-previous integration-test. I did the following steps:
The step 3 should fail but it baselines against 1.0.0 because the default base search range is:
I want to baseline against the highest version, so when I override the range in the plugin configuration:
I clean the .m2 repository, redo steps 1 and 2, then mvn verify and I get
Failed to execute goal biz.aQute.bnd:bnd-baseline-maven-plugin:4.0.0-SNAPSHOT:baseline (baseline) on project test: Unable to locate a previous version of the artifact: Could not find artifact org.example:test:jar:(2.0.0,) in central (file:///Users/anselmov/.m2/repository)
I'm not sure if my expectations are too high, but version ranges seem not handled properly. Any help is appreciated.
mvn version: 3.3.3
java version: 1.8.0_152-ea
OSX 10.9.5
The text was updated successfully, but these errors were encountered: