~~ 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. ------ Built-In Rules ------ Brian Fox ------ 2015-01-27 ------ Built-In Rules The following built-in rules ship along with the enforcer plugin: * {{{./alwaysFail.html}alwaysFail}} - Always fail... used to test plugin configuration. * {{{./alwaysPass.html}alwaysPass}} - Always passes... used to test plugin configuration. * {{{./banDistributionManagement.html}banDistributionManagement}} - enforces that project doesn't have distributionManagement. * {{{./banDuplicatePomDependencyVersions.html}banDuplicatePomDependencyVersions}} - enforces that the project doesn't have duplicate declared dependencies. * {{{./bannedDependencies.html}bannedDependencies}} - enforces that excluded dependencies aren't included. * {{{./bannedPlugins.html}bannedPlugins}} - enforces that specific plugins aren't included in the build. * {{{./bannedRepositories.html}bannedRepositories}} - enforces to not include banned repositories. * {{{./banTransitiveDependencies.html}banTransitiveDependencies}} - enforces that project doesn't have transitive dependencies. * {{{./dependencyConvergence.html}dependencyConvergence}} - ensure all dependencies converge to the same version. * {{{./evaluateBeanshell.html}evaluateBeanshell}} - evaluates a beanshell script. * {{{./reactorModuleConvergence.html}reactorModuleConvergence}} - enforces that a multi module build follows best practice. * {{{./requireActiveProfile.html}requireActiveProfile}} - enforces one or more active profiles. * {{{./requireEnvironmentVariable.html}requireEnvironmentVariable}} - enforces the existence of an environment variable * {{{./requireFileChecksum.html}requireFileChecksum}} - enforces that the specified file has a certain checksum. * {{{./requireFilesDontExist.html}requireFilesDontExist}} - enforces that the list of files does not exist. * {{{./requireFilesExist.html}requireFilesExist}} - enforces that the list of files does exist. * {{{./requireFilesSize.html}requireFilesSize}} - enforces that the list of files exists and is within a certain size range. * {{{./requireJavaVersion.html}requireJavaVersion}} - enforces the JDK version. * {{{./requireMavenVersion.html}requireMavenVersion}} - enforces the Maven version. * {{{./requireNoRepositories.html}requireNoRepositories}} - enforces to not include repositories. * {{{./requireOS.html}requireOS}} - enforces the OS / CPU Architecture. * {{{./requirePluginVersions.html}requirePluginVersions}} - enforces that all plugins have a specified version. * {{{./requirePrerequisite.html}requirePrerequisite}} - enforces that prerequisites have been specified. * {{{./requireProfileIdsExist.html}requireProfileIdsExist}} - enforces the existence of profiles specified on the commandline. * {{{./requireProperty.html}requireProperty}} - enforces the existence and values of properties. * {{{./requireReleaseDeps.html}requireReleaseDeps}} - enforces that no snapshots are included as dependencies. * {{{./requireReleaseVersion.html}requireReleaseVersion}} - enforces that the artifact is not a snapshot. * {{{./requireSnapshotVersion.html}requireSnapshotVersion}} - enforces that the artifact is not a release. * {{{./requireSameVersions.html}requireSameVersions}} - enforces that specific dependencies and/or plugins have the same version. * {{{./requireUpperBoundDeps.html}requireUpperBoundDeps}} - ensures that every (transitive) dependency is resolved to its specified version or higher. [] You may also create and inject your own custom rules by following the {{{http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html}maven-enforcer-rule-api}} instructions.