Skip to content

Add versions.skip parameter to skip plugin execution - #1328

Merged
andrzejj0 merged 1 commit into
mojohaus:masterfrom
jorgheymans:master
Dec 19, 2025
Merged

andrzejj0 merged 1 commit into
mojohaus:masterfrom
jorgheymans:master

Conversation

@jorgheymans

@jorgheymans jorgheymans commented Dec 18, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #1326

Introduces a new parameter 'versions.skip' that allows users to skip the execution of the versions plugin. When set to true, the plugin logs "Skipping execution" and exits immediately.

The skip check is implemented in AbstractVersionsUpdaterMojo and all mojos that override execute(), ensuring it works correctly across all plugin goals.

Usage: mvn versions:set -DnewVersion=1.0.0 -Dversions.skip=true

๐Ÿค– Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Add comprehensive tests for versions.skip parameter

Tests verify that the skip parameter works correctly across different types of mojos:

  • SetMojo (extends AbstractVersionsUpdaterMojo)
  • DisplayDependencyUpdatesMojo (overrides execute)
  • DisplayParentUpdatesMojo (overrides execute)
  • UseDepVersionMojo (overrides execute)
  • CommitMojo (standalone mojo)
  • ForceReleasesMojo (uses base class execute)

Each test verifies:

  1. The log contains "Skipping execution"
  2. The mojo doesn't perform its normal operations when skip=true

๐Ÿค– Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Add IT's

remove

Introduces a new parameter 'versions.skip' that allows users to skip
the execution of the versions plugin. When set to true, the plugin
logs "Skipping execution" and exits immediately.

The skip check is implemented in AbstractVersionsUpdaterMojo and all
mojos that override execute(), ensuring it works correctly across all
plugin goals.

Usage: mvn versions:set -DnewVersion=1.0.0 -Dversions.skip=true

๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Add comprehensive tests for versions.skip parameter

Tests verify that the skip parameter works correctly across different
types of mojos:
- SetMojo (extends AbstractVersionsUpdaterMojo)
- DisplayDependencyUpdatesMojo (overrides execute)
- DisplayParentUpdatesMojo (overrides execute)
- UseDepVersionMojo (overrides execute)
- CommitMojo (standalone mojo)
- ForceReleasesMojo (uses base class execute)

Each test verifies:
1. The log contains "Skipping execution"
2. The mojo doesn't perform its normal operations when skip=true

๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Add IT's

remove
@andrzejj0

Copy link
Copy Markdown
Contributor

I'll check.

@andrzejj0
andrzejj0 self-requested a review December 19, 2025 19:49
@andrzejj0
andrzejj0 merged commit cb84d01 into mojohaus:master Dec 19, 2025
17 checks passed
@github-actions

Copy link
Copy Markdown

@andrzejj0 Please assign appropriate label to PR according to the type of change.

@github-actions github-actions Bot added this to the 2.20.2 milestone Dec 19, 2025
@slawekjaranowski slawekjaranowski added the enhancement New feature or request label Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support skip parameter?

3 participants