Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude a specific version pattern in renovate

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?

like image 373
Manuel Leduc Avatar asked Dec 31 '25 17:12

Manuel Leduc


1 Answers

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 🤔

like image 101
dlouzan Avatar answered Jan 05 '26 21:01

dlouzan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!