renovate
renovate copied to clipboard
maven: support `extensions.xml`
Discussed in https://github.com/renovatebot/renovate/discussions/24316
Originally posted by jonesbusy September 8, 2023
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us what version of Renovate you run.
36.82.0
If you're self-hosting Renovate, select which platform you are using.
Bitbucket Server
Was this something which used to work for you, and then stopped?
I never saw this working
Wanted end result.
Hi,
"Recent" version of maven allow the use of '.mvn/extensions.xml' with following format
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>....</groupId>
<artifactId>...</artifactId>
<version>1.0.0</version>
</extension>
</extensions>
The maven manager is supposed to renovate maven extension like any other plugin/dependency ?
Dependabot works well for extensions.xml
but it seems it doesn't work out of the box by Renovate
I didn't find anything on the doc about this.
Should be supported by 'maven' manager ? Or should a 'maven-extensions' manager be implemented ?
Thanks for the help!
What you tried so far.
I can try to use regexManager with 'git-tags' but it's not very convenient
Also tried to use
"maven": {
"fileMatch": [
"(^|/|\\.)pom\\.xml$",
"(^|/|\\.)\\.mvn/extensions\\.xml$"
]
},
But I don't see any check on my extensions even if
DEBUG: Matched 4 file(s) for manager maven: .mvn/extensions.xml, it/pom.xml, library/pom.xml, pom.xml (repository=local)
Relevant debug logs
No response
- Add
.mvn/extensions.xml
as a default pattern to the maven manager - Use the xmlns in the file to determine whether to use a pom parser (existing) or extensions parser (new). That way people can still use non-default filenames and each should work
Reproduction repo: https://github.com/renovate-reproductions/24316
- Use the xmlns in the file to determine whether to use a pom parser (existing) or extensions parser (new). That way people can still use non-default filenames and each should work
Just a small note but afaik there is no variety in filenames used for extension declarations. By design, the only repo-specific path where core extensions can be specified is .mvn/extensions.xml
(also see here and here). Filename-based parsing (analogous to what is done for settings.xml
) should be slightly simpler to implement.
This is a duplicate of https://github.com/renovatebot/renovate/issues/24328
Duplicate of #24328