-create a new antlib for all conditions -expand ConditionBase to explicitly ask for all ant1.7 conditions that are not optional. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@385805 13f79535-47bb-0310-9956-ffa450edef68master
@@ -220,6 +220,69 @@ public abstract class ConditionBase extends ProjectComponent { | |||
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 | |||
@@ -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> |
@@ -31,28 +31,12 @@ compositemapper=org.apache.tools.ant.util.CompositeMapper | |||
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 | |||