khmarbaise closed pull request #36: [MENFORCER-142] documentation - add example for checking rules via cli URL: https://github.com/apache/maven-enforcer/pull/36
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm b/maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm new file mode 100644 index 0000000..4c7389c --- /dev/null +++ b/maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm @@ -0,0 +1,34 @@ + ~~ Licensed to the Apache Software Foundation (ASF) under one + ~~ or more contributor license agreements. See the NOTICE file + ~~ distributed with this work for additional information + ~~ regarding copyright ownership. The ASF licenses this file + ~~ to you under the Apache License, Version 2.0 (the + ~~ "License"); you may not use this file except in compliance + ~~ with the License. You may obtain a copy of the License at + ~~ + ~~ http://www.apache.org/licenses/LICENSE-2.0 + ~~ + ~~ Unless required by applicable law or agreed to in writing, + ~~ software distributed under the License is distributed on an + ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~~ KIND, either express or implied. See the License for the + ~~ specific language governing permissions and limitations + ~~ under the License. + + ----- + Check specific rule via CLI + ----- + Sandra Parsick + ------ + 2018-06-19 + ------ + +Check specific rule via CLI + + The <<<enforce>>> goal can be used via cli to check specific enforcer rule that isn't defined in the POM. + ++---+ +mvn enforcer:enforce -Drules=alwaysPass,alwaysFail ++---+ + + A full list of built-in rules can be found {{{../../../enforcer/enforcer-rules/index.html}here}}. \ No newline at end of file diff --git a/maven-enforcer-plugin/src/site/site.xml b/maven-enforcer-plugin/src/site/site.xml index 372dd43..9caae07 100644 --- a/maven-enforcer-plugin/src/site/site.xml +++ b/maven-enforcer-plugin/src/site/site.xml @@ -36,6 +36,9 @@ under the License. <menu name="Custom Rules"> <item name="Writing a custom rule" href="../../enforcer/enforcer-api/writing-a-custom-rule.html"/> </menu> + <menu name="Examples"> + <item name="Check specific rule via CLI" href="examples/check-specific-rule-via-cli.html"/> + </menu> <menu name="Resources"> <item name="Version Ranges" href="https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges"/> </menu> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services