-
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
use-releases does not update parent #978
Comments
There is IT for So we can create similar for PR with fix are welcome. |
Turns out that test works fine because Artifact.getVersion() can return -SNAPSHOT if the version is a snapshot and not a timestamped version. I guess what we miss is a test testing against a timestamped version as well. Verified that the goal does work on actual -SNAPSHOT parents. Still, it doesn't work when the actual artifact in the repo is timestamped. Using the mock-repository based integration tests doesn't let me reproduce the issue as I haven't found a way to provide metadata (baseVersion which resolves to an actual timestamped version) to the repos. So I'll create another unit test. NB. The reason why that comparison is there is because the method gets applied to all dependencies fed to it - and in the case of the user updating both the parent and actual dependencies, this comparison acts as a way to select the dependency to update. I guess this might have been done differently. |
- added an it testing against a plain (not timestamped) -SNAPSHOT - added a unit test testing against a timestamped snapshot - added another comparison for the base version if it exists
The use-release goal does not update the parent version. The useReleases method does detect required changes, but the
updateDependencyVersion method fails to write the updated version because this comparison is not valid for
-SNAPSHOT
versions.Artifact.getVersion()
returns the timestamped version. In this case the version should be compared againstArtifact.getBaseVersion()
.I don't know why this comparison is needed anyway. Either remove the comparison or compare against
Artifact.getVersion()
andArtifact.getBaseVersion()
and succeed if one of those succeeds.The text was updated successfully, but these errors were encountered: