Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skip flags #385

Merged
merged 4 commits into from
Nov 29, 2023
Merged

Conversation

korthout
Copy link
Contributor

@korthout korthout commented Nov 21, 2023

This introduces 3 flags:

  • flatten.skip: skips the entire plugin regardless of goal
  • flatten.clean.skip: skips the clean goal
  • flatten.flatten.skip: skips the flatten goal

This means the user has control over what parts are skipped, and the flags are descriptive. The flatten. prefix is in line with other parameters like flatten.mode and flatten.dependency.mode.

Test cases have been added for all three flags. Of course, I also tested it locally. The resulting logs are as follows:

[INFO] --- flatten:1.5.1-SNAPSHOT:clean (flatten.clean) @ my-test-module ---
[INFO] Clean skipped.
[INFO] --- flatten:1.5.1-SNAPSHOT:flatten (flatten) @ my-test-module ---
[INFO] Flatten skipped.

Usage is either through passing parameters along with the command:

mvn <goal> -Dflatten.skip
mvn <goal> -Dflatten.clean.skip
mvn <goal> -Dflatten.flatten.skip

Or through the configuration:

<configuration>
  <skip>false</skip>
  <skipClean>false</skipClean>
  <skipFlatten>true</skipFlatten>
</<configuration>

closes #290

@korthout korthout mentioned this pull request Nov 21, 2023
This introduces 3 flags:
- `flatten.skip`: skips the entire plugin regardless of goal
- `flatten.clean.skip`: skips the clean goal
- `flatten.flatten.skip`: skips the flatten goal

This means the user has control over what parts are skipped, and the
flags are descriptive. The `flatten.` prefix is in line with other
parameters like `flatten.mode` and `flatten.dependency.mode`.
@korthout korthout force-pushed the korthout-290-skip-flags branch from f46a9d6 to 551d9a2 Compare November 21, 2023 16:59
This adds 3 ITs for the skip flags:
- to verify `skip` -> should not create/remove flattened pom
- to verify `skipFlatten` -> should not create flattened pom
- to verify `skipClean` -> should not remove flattened pom
@korthout
Copy link
Contributor Author

@slawekjaranowski PR includes tests and is ready for review. Let me know if there's anything unclear or missing.

This is the release in which they'll be first available.
@slawekjaranowski slawekjaranowski self-assigned this Nov 29, 2023
@slawekjaranowski slawekjaranowski merged commit 8bb80b3 into mojohaus:master Nov 29, 2023
19 checks passed
@slawekjaranowski
Copy link
Member

@korthout thanks

@korthout
Copy link
Contributor Author

korthout commented Jan 4, 2024

@slawekjaranowski I'm curious about your release policy. Would you be willing to publish a release for this?

SergeDemoulinGebit pushed a commit to GEBIT/flatten-maven-plugin that referenced this pull request Mar 11, 2024
* Add skip flags

This introduces 3 flags:
- `flatten.skip`: skips the entire plugin regardless of goal
- `flatten.clean.skip`: skips the clean goal
- `flatten.flatten.skip`: skips the flatten goal

This means the user has control over what parts are skipped, and the
flags are descriptive. The `flatten.` prefix is in line with other
parameters like `flatten.mode` and `flatten.dependency.mode`.

* Test skip flags

This adds 3 ITs for the skip flags:
- to verify `skip` -> should not create/remove flattened pom
- to verify `skipFlatten` -> should not create flattened pom
- to verify `skipClean` -> should not remove flattened pom

* Prepare for 1.6.0 release

* Annotate skip flags as since 1.6.0

This is the release in which they'll be first available.
SergeDemoulinGebit pushed a commit to GEBIT/flatten-maven-plugin that referenced this pull request Mar 11, 2024
* Add skip flags

This introduces 3 flags:
- `flatten.skip`: skips the entire plugin regardless of goal
- `flatten.clean.skip`: skips the clean goal
- `flatten.flatten.skip`: skips the flatten goal

This means the user has control over what parts are skipped, and the
flags are descriptive. The `flatten.` prefix is in line with other
parameters like `flatten.mode` and `flatten.dependency.mode`.

* Test skip flags

This adds 3 ITs for the skip flags:
- to verify `skip` -> should not create/remove flattened pom
- to verify `skipFlatten` -> should not create flattened pom
- to verify `skipClean` -> should not remove flattened pom

* Prepare for 1.6.0 release

* Annotate skip flags as since 1.6.0

This is the release in which they'll be first available.
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.

Provide a skip flag
2 participants