MENFORCER-142: documentation - add example for checking rules via cli 36/head
authorsparsick <sparsick@web.de>
Tue, 19 Jun 2018 14:14:33 +0000 (16:14 +0200)
committersparsick <sparsick@web.de>
Tue, 19 Jun 2018 14:14:33 +0000 (16:14 +0200)
maven-enforcer-plugin/src/site/apt/examples/check-specific-rule-via-cli.apt.vm [new file with mode: 0644]
maven-enforcer-plugin/src/site/site.xml

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 (file)
index 0000000..4c7389c
--- /dev/null
@@ -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
index 372dd43..9caae07 100644 (file)
@@ -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>