Issue
I have a maven project which depends of com.thoughtworks.xstream:xstream:1.4.11.1
.
Renovate opened a pull request for com.thoughtworks.xstream:xstream:1.4.12-java7
but I would prefer to see an pull request with com.thoughtworks.xstream:xstream:1.4.12
since I am using Java 8.
How can I configure my renovate.json file to specify that, for the groupId com.thoughtworks.xstream
and the artifactId xstream
, I do not want to receive PR when the version ends with -java7
?
Solution
As documented upstream on https://docs.renovatebot.com/configuration-options/#packagerules, you could use a package rule with a negated regex to ignore certain versions, e.g.:
{
"packageRules": [
{
"matchPackageNames": ["com.thoughtworks.xstream:xstream"],
"allowedVersions": "!/\\-java7$/"
}
]
}
EDIT: actually taking a deeper look at the docs, they actually have samples with exactly this package, which makes me think that you actually asked this to the devs somewhere else and then they added the documented approach 🤔
Answered By - dlouzan
Answer Checked By - Timothy Miller (JavaFixing Admin)