Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2646 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant

Subject: perfsonar development work

List archive

perfsonar: r2646 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2646 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant
  • Date: Tue, 14 Aug 2007 07:03:06 -0400

Author: roman
Date: 2007-08-14 07:03:05 -0400 (Tue, 14 Aug 2007)
New Revision: 2646

Modified:

branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
Log:

New input2 macro which wraps input task. This is to discover Ant version and
change the behaviour of input action.




Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
===================================================================
---
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
2007-08-14 08:30:18 UTC (rev 2645)
+++
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
2007-08-14 11:03:05 UTC (rev 2646)
@@ -684,4 +684,68 @@
</macrodef>


+ <!--
===================================================================================
-->
+ <!-- input task redefined -->
+
+
+ <macrodef name="input2"
+ xmlns:antcontrib="antlib:net.sf.antcontrib">
+ <attribute name="message"/>
+ <attribute name="addproperty"/>
+ <attribute name="defaultvalue" default=""/>
+ <attribute name="validargs" default="!NOTSET!"/>
+ <sequential>
+
+ <echo>${ant.version}</echo>
+ <antcontrib:if>
+ <contains string="${ant.version}" substring="1.7"/>
+ <antcontrib:then>
+
+ <!-- ======================================================== -->
+
+ <antcontrib:if>
+ <equals arg1="@{validargs}" arg2="!NOTSET!" />
+ <antcontrib:then>
+ <input message="@{message}:"
+ addproperty="@{addproperty}"
+ defaultvalue="@{defaultvalue}"/>
+ </antcontrib:then>
+ <antcontrib:else>
+ <input message="@{message}:"
+ addproperty="@{addproperty}"
+ defaultvalue="@{defaultvalue}"
+ validargs="@{validargs}"/>
+ </antcontrib:else>
+ </antcontrib:if>
+
+ <!-- ======================================================== -->
+
+ </antcontrib:then>
+ <antcontrib:else>
+
+ <!-- ======================================================== -->
+
+ <antcontrib:if>
+ <equals arg1="@{validargs}" arg2="!NOTSET!" />
+ <antcontrib:then>
+ <input message="@{message}
[@{defaultvalue}]:"
+ addproperty="@{addproperty}"
+ defaultvalue="@{defaultvalue}"/>
+ </antcontrib:then>
+ <antcontrib:else>
+ <input message="@{message}
[@{defaultvalue}]:"
+ addproperty="@{addproperty}"
+ defaultvalue="@{defaultvalue}"
+ validargs="@{validargs}"/>
+ </antcontrib:else>
+ </antcontrib:if>
+
+ <!-- ======================================================== -->
+
+ </antcontrib:else>
+ </antcontrib:if>
+ </sequential>
+ </macrodef>
+
+
</antlib>



  • perfsonar: r2646 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant, svnlog, 08/14/2007

Archive powered by MHonArc 2.6.16.

Top of Page