Skip to content

[MENFORCER-516] Use rule configuration in POM when executed from CLI - #344

Merged
slawekjaranowski merged 3 commits into
apache:masterfrom
bpfoster:MENFORCER-516-cli-pom-config
Jan 15, 2025
Merged

slawekjaranowski merged 3 commits into
apache:masterfrom
bpfoster:MENFORCER-516-cli-pom-config

Conversation

@bpfoster

Copy link
Copy Markdown
Contributor

This will allow the enforcer to utilize rule configuration defined in the project POM when the rule is run explicitly from the command line, e.g. mvn enforcer:enforce -Denforcer.rules=requireReleaseDeps.

Following this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MENFORCER-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MENFORCER-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@elharo elharo changed the title [MENFORCER-516] - Use rule configuration in POM when executed from CLI [MENFORCER-516] Use rule configuration in POM when executed from CLI Jan 10, 2025
Update integration test to more accurately test the feature
@slawekjaranowski

Copy link
Copy Markdown
Member

@bpfoster - Last question we have a documentation page: https://maven.apache.org/enforcer/maven-enforcer-plugin/examples/check-specific-rule-via-cli.html

Should we add something about such feature?
in code we have file: maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm

@bpfoster

Copy link
Copy Markdown
Contributor Author

@bpfoster - Last question we have a documentation page: https://maven.apache.org/enforcer/maven-enforcer-plugin/examples/check-specific-rule-via-cli.html

Should we add something about such feature? in code we have file: maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm

Yes, good idea. I will work on adding some verbiage to that page and push up soon.

@slawekjaranowski
slawekjaranowski merged commit 375fb15 into apache:master Jan 15, 2025
@jira-importer

Copy link
Copy Markdown

Resolve #652

1 similar comment
@jira-importer

Copy link
Copy Markdown

Resolve #652

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.

[MENFORCER-516] Honor rule configuration when invoked from the command line

4 participants