Skip to content

Move plugin versions into properties section#5717

Closed
Konilo wants to merge 2 commits into
portfolio-performance:masterfrom
Konilo:issue-3244-plugin-versions-in-properties
Closed

Move plugin versions into properties section#5717
Konilo wants to merge 2 commits into
portfolio-performance:masterfrom
Konilo:issue-3244-plugin-versions-in-properties

Conversation

@Konilo
Copy link
Copy Markdown
Contributor

@Konilo Konilo commented May 25, 2026

Hello!

This refactors portfolio-app/pom.xml so the remaining hardcoded plugin versions are declared in <properties> as ${<artifactId>.version} placeholders, matching the existing ${tycho-version} pattern. The goal, as discussed in the issue, is to make outdated plugins easier to spot via mvn versions:display-plugin-updates.

Changes

  • Lifted 11 plugin versions into the <properties> block: maven-enforcer-plugin, maven-resources-plugin, maven-dependency-plugin, maven-jarsigner-plugin, maven-gpg-plugin, maven-checkstyle-plugin, sonar-maven-plugin, fix-info-plist-maven-plugin, exec-maven-plugin, jacoco-maven-plugin, protoc-jar-maven-plugin.
  • Used the dotted Maven convention ${<artifactId>.version}, e.g. ${maven-resources-plugin.version}.
  • ${tycho-version} is left as-is — already a property, shared by 8 Tycho plugins, so a short name made sense there. The new properties are 1:1 with their plugins, hence the more explicit <artifactId>.version form.

Not in scope

  • The checkstyle library dependency version inside maven-checkstyle-plugin (13.4.2) is intentionally left hardcoded — it is a plugin dependency, not a plugin version, and display-plugin-updates does not check it.

Verification

mvn -f portfolio-app/pom.xml clean verify -Plocal-dev → BUILD SUCCESS, all 13 modules, 0 test failures.

Closes #3244

@Konilo
Copy link
Copy Markdown
Contributor Author

Konilo commented May 25, 2026

@Nirus2000

This PR is unrelated to #5714! :) I'll make a doc PR for #5714 later, though!

@Nirus2000 Nirus2000 added proof_of_concept dependencies Pull requests that update a dependency file labels May 25, 2026
@Nirus2000 Nirus2000 requested a review from buchen May 25, 2026 19:22
@buchen
Copy link
Copy Markdown
Member

buchen commented May 25, 2026

@Konilo I believe so far dependabot was updating the dependencies. Will that work with the extracted versions (thinking about it: I guess because it used to work for Tycho)? And: what does the display-plugin-updates require this?

All hardcoded plugin versions in portfolio-app/pom.xml are now declared
in <properties> as ${<artifactId>.version} placeholders, matching the
existing ${tycho-version} pattern. Makes outdated plugins easier to
spot via `mvn versions:display-plugin-updates`.

The checkstyle dependency version inside maven-checkstyle-plugin is
intentionally left hardcoded since it is not a plugin version.

Issue: portfolio-performance#3244
@Konilo Konilo force-pushed the issue-3244-plugin-versions-in-properties branch from 23d68a1 to dc78284 Compare May 31, 2026 11:40
@Konilo
Copy link
Copy Markdown
Contributor Author

Konilo commented May 31, 2026

@buchen

Dependabot: confirmed, and it already works in this repo. Dependabot bumps both styles:

One minor difference: the Dependabot PR titles for these plugins will read "Bump maven-resources-plugin.version from X to Y" instead of the full artifact coordinates, like the tycho PRs do now.

display-plugin-updates: my PR description overclaimed a bit! display-plugin-updates effectively reports outdated plugins regardless of whether versions are hardcoded or stored as properties. So this refactor doesn't change anything on that front. The actual benefit is that, instead of browsing through pluginManagement, you could find all <artifactId>.versions at the top of the file. It also brings these plugins under the property-only goals (versions:display-property-updates, versions:set-property), which would be interesting if you ever want to script a bump (separate from the display-plugin-updates you run today).

To be transparent, I took on this issue because it felt approachable for me as a new comer and was marked as help_wanted. I'll close my PR if this is not interesting in your eyes anymore, no problem :)

buchen pushed a commit that referenced this pull request Jun 5, 2026
All hardcoded plugin versions in portfolio-app/pom.xml are now declared
in <properties> as ${<artifactId>.version} placeholders, matching the
existing ${tycho-version} pattern. Makes outdated plugins easier to
spot via `mvn versions:display-plugin-updates`.

The checkstyle dependency version inside maven-checkstyle-plugin is
intentionally left hardcoded since it is not a plugin version.

Issue: #3244
Issue: #5717
buchen added a commit that referenced this pull request Jun 5, 2026
@buchen
Copy link
Copy Markdown
Member

buchen commented Jun 5, 2026

Ah, thanks. Now I understand where you're getting from. Yes, I've merged the change. Nowadays, I'm relying on the dependabot updates (could be that the issue is from before that time). But the change improves readability and I have merged it.

@buchen buchen closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file proof_of_concept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactoring: moving versions into properties section

3 participants