-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: mavenPropertyVersions regexManager #24425
feat: mavenPropertyVersions regexManager #24425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this something the maven manager should support out of the box? 🤔
Co-authored-by: Michael Kriese <[email protected]>
Good question. These properties are actually consumed by other plug-ins, which are not visible to the maven dependency manager. Not sure if they could be. Two examples I am aware of:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this something the maven manager should support out of the box? 🤔
It does:
renovate/lib/modules/manager/maven/extract.ts
Lines 275 to 287 in 7779ebd
const propsNode = project.childNamed('properties'); | |
const props: Record<string, MavenProp> = {}; | |
if (propsNode?.children) { | |
for (const propNode of propsNode.children as XmlElement[]) { | |
const key = propNode.name; | |
const val = propNode?.val?.trim(); | |
if (key && val) { | |
const fileReplacePosition = propNode.position; | |
props[key] = { val, fileReplacePosition, packageFile }; | |
} | |
} | |
} | |
result.mavenProps = props; |
I guess it's really about those special cases @rombert mentioned, where properties are defined but not consumed by dependencies.
Co-authored-by: Johannes Feichtner <[email protected]>
🎉 This PR is included in version 36.100.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
Adds a new regexManager that can be used for properties defined in pom.xml Maven files.
Context
#21495
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: