ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r385805 - in /ant/core/trunk/src/main/org/apache/tools/ant: taskdefs/condition/ConditionBase.java taskdefs/condition/antlib.xml types/defaults.properties
Date Tue, 14 Mar 2006 13:54:16 GMT
Author: stevel
Date: Tue Mar 14 05:54:14 2006
New Revision: 385805

URL: http://svn.apache.org/viewcvs?rev=385805&view=rev
Log:
-Roll back condition defined in defaults.properties to ant1.6.5 branch with one extra. scriptcondition.
We cannot have that explicitly in the ConditionBase, as it is optional.

-create a new antlib for all conditions

-expand ConditionBase to explicitly ask for all ant1.7 conditions that are not optional.

Added:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/antlib.xml
Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/defaults.properties

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java?rev=385805&r1=385804&r2=385805&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java Tue
Mar 14 05:54:14 2006
@@ -220,6 +220,69 @@
     public void addTypeFound(TypeFound test) {
         conditions.addElement(test);
     }
+
+    /**
+     * Add an <isfailure> condition.
+     *
+     * @param test the condition
+     */
+    public void addIsFailure(IsFailure test) {
+        conditions.addElement(test);
+    }
+
+    /**
+     * Add an <isfileselected> condition.
+     * @param test the condition
+     */
+    public void addIsFileSelected(IsFileSelected test) {
+        conditions.addElement(test);
+    }
+
+    /**
+     * Add an <isreachable> condition.
+     *
+     * @param test the condition
+     */
+    public void addIsReachable(IsReachable test) {
+        conditions.addElement(test);
+    }
+
+    /**
+     * Add an <issigned> condition.
+     *
+     * @param test the condition
+     */
+    public void addIsSigned(IsSigned test) {
+        conditions.addElement(test);
+    }
+
+    /**
+     * Add an <parsersupports> condition.
+     *
+     * @param test the condition
+     */
+    public void addParserSupports(ParserSupports test) {
+        conditions.addElement(test);
+    }
+
+    /**
+     * Add a <ResourcesMatch> condition.
+     *
+     * @param test the condition
+     */
+    public void addResourcesMatch(ResourcesMatch test) {
+        conditions.addElement(test);
+    }
+
+
+    /**
+     * Add an <xor> condition.
+     *
+     * @param test the condition
+     */
+    public void addXor(Xor test) {
+        conditions.addElement(test);
+    }
     /**
      * Add an arbitrary condition
      * @param c a  condition

Added: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/antlib.xml
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/antlib.xml?rev=385805&view=auto
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/antlib.xml (added)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/antlib.xml Tue Mar 14
05:54:14 2006
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<antlib>
+  <!--
+  /*
+ * Copyright  2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ *
+ */
+
+  -->
+  <!-- ant1.6+ antlib declaration for the conditions
+  use with the declaration xmlns:cond="antlib:org.apache.tools.ant.conditions" to
+  trigger ant's autoload of this file into a namespace.
+
+  -->
+
+  <typedef name="and" classname="org.apache.tools.ant.taskdefs.condition.And"/>
+  <typedef name="contains" classname="org.apache.tools.ant.taskdefs.condition.Contains"/>
+  <typedef name="equals" classname="org.apache.tools.ant.taskdefs.condition.Equals"/>
+  <typedef name="filesmatch" classname="org.apache.tools.ant.taskdefs.condition.Filesmatch"/>
+  <typedef name="http" classname="org.apache.tools.ant.taskdefs.condition.Http"/>
+  <typedef name="isfailure" classname="org.apache.tools.ant.taskdefs.condition.IsFailure"/>
+  <typedef name="isfalse" classname="org.apache.tools.ant.taskdefs.condition.IsFalse"/>
+  <typedef name="isfileselected" classname="org.apache.tools.ant.taskdefs.condition.IsFileSelected"/>
+  <typedef name="isreachable" classname="org.apache.tools.ant.taskdefs.condition.IsReachable"/>
+  <typedef name="isreference" classname="org.apache.tools.ant.taskdefs.condition.IsReference"/>
+  <typedef name="isset" classname="org.apache.tools.ant.taskdefs.condition.IsSet"/>
+  <typedef name="issigned" classname="org.apache.tools.ant.taskdefs.condition.IsSigned"/>
+  <typedef name="istrue" classname="org.apache.tools.ant.taskdefs.condition.IsTrue"/>
+  <typedef name="not" classname="org.apache.tools.ant.taskdefs.condition.Not"/>
+  <typedef name="or" classname="org.apache.tools.ant.taskdefs.condition.Or"/>
+  <typedef name="os" classname="org.apache.tools.ant.taskdefs.condition.Os"/>
+  <typedef name="parsersupports" classname="org.apache.tools.ant.taskdefs.condition.ParserSupports"/>
+  <typedef name="resourcesmatch" classname="org.apache.tools.ant.taskdefs.condition.ResourcesMatch"/>
+  <typedef name="scriptcondition" classname="org.apache.tools.ant.types.optional.ScriptCondition"/>
+  <typedef name="socket" classname="org.apache.tools.ant.taskdefs.condition.Socket"/>
+  <typedef name="typefound" classname="org.apache.tools.ant.taskdefs.condition.TypeFound"/>
+  <typedef name="xor" classname="org.apache.tools.ant.taskdefs.condition.Xor"/>
+</antlib>
\ No newline at end of file

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/defaults.properties
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/defaults.properties?rev=385805&r1=385804&r2=385805&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/defaults.properties (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/defaults.properties Tue Mar 14 05:54:14
2006
@@ -31,28 +31,12 @@
 chainedmapper=org.apache.tools.ant.util.ChainedMapper
 filtermapper=org.apache.tools.ant.types.mappers.FilterMapper
 
-#all conditions, in alphabetical order
-and=org.apache.tools.ant.taskdefs.condition.And
-contains=org.apache.tools.ant.taskdefs.condition.Contains
-equals=org.apache.tools.ant.taskdefs.condition.Equals
-filesmatch=org.apache.tools.ant.taskdefs.condition.Filesmatch
-http=org.apache.tools.ant.taskdefs.condition.Http
-isfailure=org.apache.tools.ant.taskdefs.condition.IsFailure
-isfalse=org.apache.tools.ant.taskdefs.condition.IsFalse
+#this condition is in here because it is the sole
+#condition defined in Ant1.6
+#please add new conditions to oata.types.conditions/antlib.xml instead of
+#here, to avoid namespace clash with things like selectors.
 isfileselected=org.apache.tools.ant.taskdefs.condition.IsFileSelected
-isreachable=org.apache.tools.ant.taskdefs.condition.IsReachable
-isreference=org.apache.tools.ant.taskdefs.condition.IsReference
-isset=org.apache.tools.ant.taskdefs.condition.IsSet
-issigned=org.apache.tools.ant.taskdefs.condition.IsSigned
-istrue=org.apache.tools.ant.taskdefs.condition.IsTrue
-not=org.apache.tools.ant.taskdefs.condition.Not
-or=org.apache.tools.ant.taskdefs.condition.Or
-os=org.apache.tools.ant.taskdefs.condition.Os
-parsersupports=org.apache.tools.ant.taskdefs.condition.ParserSupports
-resourcesmatch=org.apache.tools.ant.taskdefs.condition.ResourcesMatch
 scriptcondition=org.apache.tools.ant.types.optional.ScriptCondition
-socket=org.apache.tools.ant.taskdefs.condition.Socket
-xor=org.apache.tools.ant.taskdefs.condition.Xor
 
 #ResourceCollections:
 dirset=org.apache.tools.ant.types.DirSet



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message