~ubuntu-branches/debian/stretch/maven-enforcer/stretch

« back to all changes in this revision

Viewing changes to enforcer-rules/src/site/apt/requirePluginVersions.apt

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-12 22:30:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: package-import@ubuntu.com-20110912223016-e2pk04avoq8bur7t
Tags: 1.0-1
* Team upload
* New upstream release.
* Add more Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
~~ Licensed to the Apache Software Foundation (ASF) under one
2
 
~~ or more contributor license agreements.  See the NOTICE file
3
 
~~ distributed with this work for additional information
4
 
~~ regarding copyright ownership.  The ASF licenses this file
5
 
~~ to you under the Apache License, Version 2.0 (the
6
 
~~ "License"); you may not use this file except in compliance
7
 
~~ with the License.  You may obtain a copy of the License at
8
 
~~
9
 
~~ http://www.apache.org/licenses/LICENSE-2.0
10
 
~~
11
 
~~ Unless required by applicable law or agreed to in writing,
12
 
~~ software distributed under the License is distributed on an
13
 
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
 
~~ KIND, either express or implied.  See the License for the
15
 
~~ specific language governing permissions and limitations
16
 
~~ under the License.
17
 
 
18
 
  ------
19
 
  Require Plugin Versions
20
 
  ------
21
 
  Brian Fox
22
 
  ------
23
 
  Novemer 2007
24
 
  ------
25
 
 
26
 
Require Plugin Versions
27
 
 
28
 
   This rule enforces that all plugins have a version defined, either in the plugin or pluginManagement section of the pom or a parent pom.
29
 
 
30
 
   The following parameters are supported by this rule:
31
 
 
32
 
   * message - an optional message to the user if the rule fails.
33
 
 
34
 
   * banLatest - disallow any use of "LATEST" as a version for any plugin. Default = true.
35
 
 
36
 
   * banRelease - disallow any use of "RELEASE" as a version for any plugin. Default = true.
37
 
 
38
 
   * banSnapshots - disallow any use of SNAPSHOT plugins. Default = true.
39
 
 
40
 
   * banTimestamps - disallow any use of snapshot plugins with timestamp version (only enabled when banSnapshots is true). Default = true.
41
 
 
42
 
   * phases - The comma separated list of phases that should be used to find 
43
 
     lifecycle plugin bindings. The default value is "clean,deploy,site".
44
 
 
45
 
   * additionalPlugins - A list of additional plugins to enforce have versions. These
46
 
     are plugins that may not be in the poms but are used anyway, like help, eclipse etc.
47
 
     The plugins should be specified in the form: group:artifactId.
48
 
 
49
 
   * unCheckedPluginsList - A comma separated list of plugins to skip version checking. Ie allow no version, or snapshots, etc. The plugins should be specified in the form: group:artifactId.
50
 
 
51
 
 
52
 
   []
53
 
 
54
 
   Sample Plugin Configuration (showing some defaults, defaults can be skipped):
55
 
 
56
 
+---+
57
 
<project>
58
 
  [...]
59
 
  <build>
60
 
    <plugins>
61
 
      <plugin>
62
 
        <groupId>org.apache.maven.plugins</groupId>
63
 
        <artifactId>maven-enforcer-plugin</artifactId>
64
 
        <version>1.0</version>
65
 
        <executions>
66
 
          <execution>
67
 
            <id>enforce-plugin-versions</id>
68
 
            <goals>
69
 
              <goal>enforce</goal>
70
 
            </goals>
71
 
            <configuration>
72
 
              <rules>
73
 
                <requirePluginVersions>
74
 
                   <message>Best Practice is to always define plugin versions!</message>
75
 
                   <banLatest>true</banLatest>
76
 
                   <banRelease>true</banRelease>
77
 
                   <banSnapshots>true</banSnapshots>
78
 
                   <phases>clean,deploy,site</phases>
79
 
                   <additionalPlugins>
80
 
                     <additionalPlugin>org.apache.maven.plugins:maven-eclipse-plugin</additionalPlugin>
81
 
                     <additionalPlugin>org.apache.maven.plugins:maven-reactor-plugin</additionalPlugin>
82
 
                   </additionalPlugins>
83
 
                </requirePluginVersions>
84
 
                <unCheckedPluginsList>org.apache.maven.plugins:maven-enforcer-plugin,org.apache.maven.plugins:maven-idea-plugin</unCheckedPluginsList>
85
 
              </rules>
86
 
            </configuration>
87
 
          </execution>
88
 
        </executions>
89
 
      </plugin>
90
 
    </plugins>
91
 
  </build>
92
 
  [...]
93
 
</project>
94
 
+---+
 
 
b'\\ No newline at end of file'