Author: brianf
Date: Sun Mar 18 16:57:23 2007
New Revision: 519745

URL: http://svn.apache.org/viewvc?view=rev&rev=519745
Log:
site

Added:
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/examples/
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/index.apt
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/usage.apt
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/faq.fml
    maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/site.xml

Added: maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/index.apt?view=auto&rev=519745
==============================================================================
--- maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/index.apt 
(added)
+++ maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/index.apt 
Sun Mar 18 16:57:23 2007
@@ -0,0 +1,43 @@
+~~ 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.    
+ 
+  ------
+  Introduction
+  ------
+  Brian Fox
+  ------
+  Mar 2007
+  ------
+
+Maven Enforcer Plugin - The Loving Iron Fist of Maven\x99
+
+       The Enforcer plugin provides goals to control certain environmental 
constraints such as Maven Version, JDK version, and OS family.
+
+* Goals Overview
+
+  The Enforcer plugin has several goals:
+
+  *{{{enforce-mojo.html}enforcer:enforce}} can check against the Maven and JDK 
versions
+  
+  *{{{os-mojo.html}enforcer:os}} can check the OS.
+
+* Usage
+
+  Instructions on how to use the enforcer plugin can be found 
{{{usage.html}here}}.
+
+
+

Added: maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/usage.apt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/usage.apt?view=auto&rev=519745
==============================================================================
--- maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/usage.apt 
(added)
+++ maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/apt/usage.apt 
Sun Mar 18 16:57:23 2007
@@ -0,0 +1,121 @@
+~~ 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.    
+ 
+  ------
+  Usage
+  ------
+  Brian Fox
+  ------
+  Mar 2007
+  ------
+
+Usage
+ 
+  Brief examples on how to use the enforcer goals.
+ 
+* Generic Plugin configuration information
+
+  See the following links for information about including and configuring 
plugins in your project:
+  
+  
*{{{http://maven.apache.org/guides/mini/guide-configuring-plugins.html}Configuring
 Plugins}}
+  
+  
*{{{http://maven.apache.org/guides/plugin/guide-java-plugin-development.html}Plugin
 Development}}
+
+  
*{{{http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html}Plugin
 Prefix}}
+  
+  []
+
+* The <<<enforcer:enforce>>> mojo
+
+   This goal is meant to be bound to a lifecycle phase and configured in your
+   <<<pom.xml>>>. This goal can enforce a specific range of allowed versions 
for Maven and the JDK.
+   
+   The standard Maven version range syntax is supported with one minor change 
for ease of use (denoted with *):
+   
+
+*----------*--------------+
+| Range    | Meaning      |
+*----------*--------------+
+| 1.0      | x \>\= 1.0 \* The default maven meaning for 1.0 is everything (,) 
but with 1.0 recommended. Obviously this doesn't work for enforcing versions 
here, so it has been redefined as a minimum version.
+  |
+*----------*--------------+
+| (,1.0]   | x \<\= 1.0     |
+*----------*--------------+
+| (,1.0)   | x \< 1.0      |
+*----------*--------------+
+| [1.0]    | x \=\= 1.0     |
+*----------*--------------+
+| [1.0,)   | x \>\= 1.0     |
+*----------*--------------+
+| (1.0,)   | x \> 1.0      |
+*----------*--------------+
+| (1.0,2.0)| 1.0 \>\= x \<\= 2.0     |
+*----------*--------------+
+| [1.0,2.0]| 1.0 \> x \< 2.0     |
+*----------*--------------+
+| (,1.0],[1.2,)   |x \<\= 1.0 or x \>\= 1.2. Multiple sets are comma-separated 
|
+*----------*--------------+
+| (,1.1),(1.1,) |x !\= 1.1 |
+*----------*--------------+
+
+
+   The JDK version is retrieved and the following processing occurs before 
being checked:
+   
+  [[1]] Drop all non-numeric characters preceeding the first number. (build 
1.5.0_11-b03 becomes 1.5.0_11-b03)
+  
+  [[2]] Replace all '_' and '-' with '.' (1.5.0_11-b03 becomes 1.5.0.11.b03)
+  
+  [[3]] Split the string on '.' and take the first 3 sections. (1.5.0.11.b03 
becomes 1.5.0)
+  
+  []
+   
+   This preprocessing normalizes various JDK version strings into a standard 
x.y.z version number. Your required range should therefore use the x.y.z format 
for comparison.
+  
+   To enforce only the Maven version, do not specify a JDK version and vice 
versa. At least one must be set.
+   
+   By default, the mojo will fail the build if a check does not succeed. If 
you would like a warning instead, set <<fail>> to false.
+   
+   Configure the plugin something like this if you intend to bind it to 
execute along with your build:
+
++---+
+<project>
+  [...]
+  <build>
+   <plugins>
+     <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>enforce-versions</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+            <mavenVersion>2.0.6</mavenVersion>
+            <jdkVersion>1.5.0</jdkVersion>
+            <fail>true</fail>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+  
\ No newline at end of file

Added: maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/faq.fml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/faq.fml?view=auto&rev=519745
==============================================================================
--- maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/faq.fml 
(added)
+++ maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/fml/faq.fml Sun 
Mar 18 16:57:23 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+ * 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. 
+ *
+-->
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+   <faq id="question">
+     <question>Why can't I just use the prerequisites tag in the 
pom?</question>
+     <answer>
+        <p>
+            The prerequisites tag was designed to be used by tools like 
plugins. It will work for regular projects, but it isn't
+            inherited to their children. If it is set in a parent reactor, 
then Maven will do the check. However if one of the
+            children are built, the check is not performed. The enforcer 
plugin is designed to allow centralized control over the build environment from 
+            a single "super-pom", and to allow greater flexibility in version 
specification by supporting ranges.
+        </p>
+     </answer>
+      </faq>
+ </part>
+</faqs>

Added: maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/site.xml?view=auto&rev=519745
==============================================================================
--- maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/site.xml (added)
+++ maven/sandbox/trunk/plugins/maven-enforcer-plugin/src/site/site.xml Sun Mar 
18 16:57:23 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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. 
+ *
+-->
+
+<project>
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="Goals" href="plugin-info.html"/>
+      <item name="Usage" href="usage.html"/>
+      <item name="FAQ" href="faq.html"/>
+    </menu>
+    <menu name="Resources">
+      <item name="Maven 2.0.x Version Range Syntax" 
href="http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges";
 />
+    </menu>
+  </body>
+</project>


Reply via email to