You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the smallest, simplest way to reproduce the problem?
type: specs.openrewrite.org/v1beta/recipename: my.company.rewrite.recipe.MyRecipedisplayName: My Recipedescription: This is an OpenRewrite reciperecipeList:
- org.openrewrite.maven.ChangeDependencyClassifier:
groupId: com.querydslartifactId: "*"newClassifier: jakarta
Thanks for logging the issue! Am I correct in deducing that when you add a classifier, you want to version to be added when the dependency-with-classifier version is not managed?
timtebeek
changed the title
org.openrewrite.maven.ChangeDependencyClassifier: Adding classifier on dependency without version makes pom.xml invalid
ChangeDependencyClassifier should add explicit version when dependency-with-classifier is not managed
Nov 5, 2024
Sorry, @timtebeek . I didn't explain. It's confusing but Maven requires a <version> tag when you add a <classifier>. I've already filed an issue to them about it.
I think we ought to be able to recognize when there's no matching managed dependency with the same classifier, and if so make the version explicit. Would welcome a draft PR that explores this with a unit test, and from there what would be necessary for a fix.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a multi module project.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
No change or:
What did you see instead?
What is the full stack trace of any errors you encountered?
None
Are you interested in contributing a fix to OpenRewrite?
Yes
The text was updated successfully, but these errors were encountered: