Skip to content

Add versions.skip parameter to skip plugin execution#1328

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

Add versions.skip parameter to skip plugin execution#1328
andrzejj0 merged 1 commit intomojohaus:masterfrom
jorgheymans:master

Conversation

@jorgheymans
Copy link
Copy Markdown
Contributor

@jorgheymans jorgheymans commented Dec 18, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support skip parameter?

3 participants