dhruv9b opened a new pull request, #1021:
URL: https://github.com/apache/maven-enforcer/pull/1021

   ## Description
   
   `enforcer.skip` does not currently work when the Maven Enforcer extension is 
used from a directory without a `pom.xml`.
   
   In this case, the extension adds an `maven-enforcer-plugin:enforce` 
execution, but Maven rejects the execution because the goal requires a project 
before `EnforceMojo` gets a chance to process the `enforcer.skip` parameter.
   
   This change checks `enforcer.skip` in `EnforceExtension.afterProjectsRead()` 
before adding the Enforcer execution.
   
   ## Tests
   
   - Added an integration test covering a POM-less directory with 
`-Denforcer.skip`.
   - Verified that the same POM-less invocation fails without `-Denforcer.skip`.
   - `mvn clean verify`
   - `mvn clean verify -Prun-its -pl maven-enforcer-extension`
   
   Fixes #939
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [ ] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass.
   - [x] You have run the integration tests successfully (`mvn -Prun-its 
verify`).
   - [x] I hereby declare this contribution to be licenced under the Apache 
License Version 2.0, January 2004.
   - [ ] In any other case, please file an Apache Individual Contributor 
License Agreement.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to