You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/12/23 11:39:36 UTC
svn commit: r728921 [2/2] - in /maven/enforcer/trunk:
enforcer-api/src/main/assembly/ enforcer-rules/src/it/requirePlugins1/
enforcer-rules/src/it/requirePluginsReports/
enforcer-rules/src/it/requirePluginsUnchecked/
enforcer-rules/src/main/java/org/ap...
Modified: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesExist.apt
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesExist.apt?rev=728921&r1=728920&r2=728921&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesExist.apt (original)
+++ maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesExist.apt Tue Dec 23 02:39:34 2008
@@ -1,74 +1,74 @@
-~~ 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.
-
- ------
- Require Files Exist
- ------
- Brian Fox
- ------
- August 2008
- ------
-
-Require Files Exist
-
- This rule checks that the specified list of files exist.
-
-
- The following parameters are supported by this rule:
-
- * message - an optional message to the user if the rule fails.
- * files - A list of files to check.
-
- []
-
-
- Sample Plugin Configuration:
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>enforce-no-snapshots</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireFilesExist>
- <files>
- <file>${project.outputDirectory}/foo.txt</file>
- <file>${project.outputDirectory}/foo2.txt</file>
- </files>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
+~~ 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.
+
+ ------
+ Require Files Exist
+ ------
+ Brian Fox
+ ------
+ August 2008
+ ------
+
+Require Files Exist
+
+ This rule checks that the specified list of files exist.
+
+
+ The following parameters are supported by this rule:
+
+ * message - an optional message to the user if the rule fails.
+ * files - A list of files to check.
+
+ []
+
+
+ Sample Plugin Configuration:
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>enforce-no-snapshots</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireFilesExist>
+ <files>
+ <file>${project.outputDirectory}/foo.txt</file>
+ <file>${project.outputDirectory}/foo2.txt</file>
+ </files>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
Propchange: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesExist.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesSize.apt
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesSize.apt?rev=728921&r1=728920&r2=728921&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesSize.apt (original)
+++ maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesSize.apt Tue Dec 23 02:39:34 2008
@@ -1,78 +1,78 @@
-~~ 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.
-
- ------
- Require File Size
- ------
- Brian Fox
- ------
- August 2008
- ------
-
-Require File Size
-
- This rule checks that the specified list of files exist and are within the specified size range.
-
-
- The following parameters are supported by this rule:
-
- * message - an optional message to the user if the rule fails.
- * files - A list of files to check.
- * maxsize - maximum size in bytes for this file
- * minsize - minimum size in bytes for this file
-
- []
-
-
- Sample Plugin Configuration:
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>enforce-no-snapshots</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireFilesSize>
- <maxSize>10000</maxSize>
- <minSize>90</minsize>
- <files>
- <file>${project.outputDirectory}/foo.txt</file>
- <file>${project.outputDirectory}/foo2.txt</file>
- </files>
- </requireFilesSize>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
+~~ 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.
+
+ ------
+ Require File Size
+ ------
+ Brian Fox
+ ------
+ August 2008
+ ------
+
+Require File Size
+
+ This rule checks that the specified list of files exist and are within the specified size range.
+
+
+ The following parameters are supported by this rule:
+
+ * message - an optional message to the user if the rule fails.
+ * files - A list of files to check.
+ * maxsize - maximum size in bytes for this file
+ * minsize - minimum size in bytes for this file
+
+ []
+
+
+ Sample Plugin Configuration:
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>enforce-no-snapshots</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireFilesSize>
+ <maxSize>10000</maxSize>
+ <minSize>90</minsize>
+ <files>
+ <file>${project.outputDirectory}/foo.txt</file>
+ <file>${project.outputDirectory}/foo2.txt</file>
+ </files>
+ </requireFilesSize>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
Propchange: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireFilesSize.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireReleaseVersion.apt
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/site/apt/requireReleaseVersion.apt?rev=728921&r1=728920&r2=728921&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/site/apt/requireReleaseVersion.apt (original)
+++ maven/enforcer/trunk/enforcer-rules/src/site/apt/requireReleaseVersion.apt Tue Dec 23 02:39:34 2008
@@ -1,74 +1,74 @@
-~~ 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.
-
- ------
- Require Release Version
- ------
- Brian Fox
- ------
- August 2008
- ------
-
-Require Release Version
-
- This rule checks that the current project is not a snapshot.
-
-
- The following parameters are supported by this rule:
-
- * message - an optional message to the user if the rule fails.
-
- * onlyWhenRelease - if this rule should only be executed when the version is a non-SNAPSHOT version. Default: false
-
- * failWhenParentIsSnapshot - if the parent should be checked. Default: true
-
- []
-
-
- Sample Plugin Configuration:
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>enforce-no-snapshots</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireReleaseVersion>
- <message>No Snapshots Allowed!</message>
- </requireReleaseVersion>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
+~~ 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.
+
+ ------
+ Require Release Version
+ ------
+ Brian Fox
+ ------
+ August 2008
+ ------
+
+Require Release Version
+
+ This rule checks that the current project is not a snapshot.
+
+
+ The following parameters are supported by this rule:
+
+ * message - an optional message to the user if the rule fails.
+
+ * onlyWhenRelease - if this rule should only be executed when the version is a non-SNAPSHOT version. Default: false
+
+ * failWhenParentIsSnapshot - if the parent should be checked. Default: true
+
+ []
+
+
+ Sample Plugin Configuration:
+
++---+
+<project>
+ [...]
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>enforce-no-snapshots</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireReleaseVersion>
+ <message>No Snapshots Allowed!</message>
+ </requireReleaseVersion>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ [...]
+</project>
++---+
Propchange: maven/enforcer/trunk/enforcer-rules/src/site/apt/requireReleaseVersion.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysFail.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysFail.java?rev=728921&r1=728920&r2=728921&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysFail.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysFail.java Tue Dec 23 02:39:34 2008
@@ -1,48 +1,48 @@
-/*
- * 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.
- */
-package org.apache.maven.plugins.enforcer;
-
-import junit.framework.TestCase;
-
-import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
-
-/**
- * Test AlwaysFail rule.
- * @author Ben Lidgey
- * @see AlwaysFail
- */
-public class TestAlwaysFail extends TestCase
-{
-
- public void testExecute()
- {
- final AlwaysFail rule = new AlwaysFail();
- try
- {
- // execute rule -- should throw EnforcerRuleException
- rule.execute( EnforcerTestUtils.getHelper() );
- fail( "Should throw EnforcerRuleException" );
- }
- catch ( EnforcerRuleException e )
- {
- assertTrue( true );
- }
- }
-
-}
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.enforcer;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
+
+/**
+ * Test AlwaysFail rule.
+ * @author Ben Lidgey
+ * @see AlwaysFail
+ */
+public class TestAlwaysFail extends TestCase
+{
+
+ public void testExecute()
+ {
+ final AlwaysFail rule = new AlwaysFail();
+ try
+ {
+ // execute rule -- should throw EnforcerRuleException
+ rule.execute( EnforcerTestUtils.getHelper() );
+ fail( "Should throw EnforcerRuleException" );
+ }
+ catch ( EnforcerRuleException e )
+ {
+ assertTrue( true );
+ }
+ }
+
+}
Propchange: maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysFail.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysPass.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysPass.java?rev=728921&r1=728920&r2=728921&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysPass.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysPass.java Tue Dec 23 02:39:34 2008
@@ -1,30 +1,30 @@
-package org.apache.maven.plugins.enforcer;
-
-import junit.framework.TestCase;
-
-import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
-
-/**
- * Test AlwaysPass rule.
- * @author Ben Lidgey
- * @see AlwaysPass
- */
-public class TestAlwaysPass extends TestCase
-{
-
- public void testExecute()
- {
- final AlwaysPass rule = new AlwaysPass();
- try
- {
- // execute rule -- should NOT throw EnforcerRuleException
- rule.execute( EnforcerTestUtils.getHelper() );
- assertTrue( true );
- }
- catch ( EnforcerRuleException e )
- {
- fail( "Should NOT throw EnforcerRuleException" );
- }
- }
-
-}
+package org.apache.maven.plugins.enforcer;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
+
+/**
+ * Test AlwaysPass rule.
+ * @author Ben Lidgey
+ * @see AlwaysPass
+ */
+public class TestAlwaysPass extends TestCase
+{
+
+ public void testExecute()
+ {
+ final AlwaysPass rule = new AlwaysPass();
+ try
+ {
+ // execute rule -- should NOT throw EnforcerRuleException
+ rule.execute( EnforcerTestUtils.getHelper() );
+ assertTrue( true );
+ }
+ catch ( EnforcerRuleException e )
+ {
+ fail( "Should NOT throw EnforcerRuleException" );
+ }
+ }
+
+}
Propchange: maven/enforcer/trunk/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAlwaysPass.java
------------------------------------------------------------------------------
svn:eol-style = native