Solution skill
Renovate: exclude unwanted version variants like -java7 builds
Complete solution
Shows how to fix renovate: exclude unwanted version variants like -java7 builds. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Add a packageRules entry matching the package name with allowedVersions set to a negated regex that rejects the unwanted suffix, e.g. a pattern excluding versions ending in -java7. Renovate then only proposes versions that pass the filter.
Steps
- Add a packageRules entry matching the package name with allowedVersions set to a negated regex that rejects the unwanted suffix, e.g. a pattern excluding versions ending in -java7. Renovate then only proposes versions that pass the filter. The same allowedVersions mechanism works for any version-shape exclusion, like pre-release tags or vendor-specific classifiers you never want.
When to use
You are seeing this: The same allowedVersions mechanism works for any version-shape exclusion, like pre-release tags or vendor-specific classifiers you never want. Use this skill when you run into "Renovate: exclude unwanted version variants like -java7 builds".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Stack Overflow #61211875 (accepted answer, 16 votes): Renovate proposes a -java7 variant of a Maven artifact while the project runs Java 8 and wants the plain release instead. The accepted answer shows the package-rule mechanism for filtering versions by pattern.
Verified resolution: Add a packageRules entry matching the package name with allowedVersions set to a negated regex that rejects the unwanted suffix, e.g. a pattern excluding versions ending in -java7. Renovate then only proposes versions that pass the filter. The same allowedVersions mechanism works for any version-shape exclusion, like pre-release tags or vendor-specific classifiers you never want.
Source URL: https://stackoverflow.com/questions/61211875/exclude-a-specific-version-pattern-in-renovate
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_eMxmHvHigdDx7arKxwygkw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Renovate: exclude unwanted version variants like -java7 builds <span>— Vectle</span></a>