~ubuntu-branches/ubuntu/utopic/maven-enforcer/utopic

« back to all changes in this revision

Viewing changes to enforcer-rules/src/site/apt/requireMavenVersion.apt.vm

  • 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 Maven Version
 
20
  ------
 
21
  Brian Fox
 
22
  ------
 
23
  June 2007
 
24
  ------
 
25
 
 
26
Require Maven Version
 
27
 
 
28
   This rule enforces certain Maven versions. The rule uses the {{{./versionRanges.html}Enforcer version range syntax}} to define allowed versions.
 
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
   * {{{../apidocs/org/apache/maven/plugin/enforcer/AbstractVersionEnforcer.html#version}version}} - {{{./versionRanges.html}range}} of allowed Maven versions.
 
35
   
 
36
   []
 
37
 
 
38
   Sample Plugin Configuration:
 
39
   
 
40
+---+
 
41
<project>
 
42
  [...]
 
43
  <build>
 
44
    <plugins>
 
45
      <plugin>
 
46
        <groupId>org.apache.maven.plugins</groupId>
 
47
        <artifactId>maven-enforcer-plugin</artifactId>
 
48
        <version>${project.version}</version>
 
49
        <executions>
 
50
          <execution>
 
51
            <id>enforce-maven</id>
 
52
            <goals>
 
53
              <goal>enforce</goal>
 
54
            </goals>
 
55
            <configuration>
 
56
              <rules>
 
57
                <requireMavenVersion>
 
58
                  <version>2.0.6</version>
 
59
                </requireMavenVersion>
 
60
              </rules>    
 
61
            </configuration>
 
62
          </execution>
 
63
        </executions>
 
64
      </plugin>
 
65
    </plugins>
 
66
  </build>
 
67
  [...]
 
68
</project>
 
69
+---+  
 
 
b'\\ No newline at end of file'