perfsonar-dev - perfsonar: r2668 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant
Subject: perfsonar development work
List archive
perfsonar: r2668 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2668 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant
- Date: Thu, 16 Aug 2007 09:31:12 -0400
Author: roman
Date: 2007-08-16 09:31:12 -0400 (Thu, 16 Aug 2007)
New Revision: 2668
Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
Log:
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-16 13:24:56 UTC (rev 2667)
+++
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant/antlib.xml
2007-08-16 13:31:12 UTC (rev 2668)
@@ -16,7 +16,78 @@
<antlib>
+ <taskdef resource="net/sf/antcontrib/antlib.xml"
+ uri="antlib:net.sf.antcontrib">
+ <classpath>
+ <pathelement location="lib/misc/ant-contrib-1.0b3.jar"/>
+ </classpath>
+ </taskdef>
+
+
<!--
===================================================================================
-->
+ <!-- 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>
+
+ <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>
+
+
+ <!--
===================================================================================
-->
<!-- compilation -->
@@ -144,13 +215,14 @@
<!-- getting the service name -->
- <macrodef name="get-service-name">
+ <macrodef name="get-service-name"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="default-service-name"/>
<attribute name="dest-config-file"/>
<sequential>
- <input message="Enter the name of the service
[@{default-service-name}]:"
- addproperty="_service.name"
- defaultvalue="@{default-service-name}" />
+ <psbase:input2 message="Enter the name of the service"
+ addproperty="_service.name"
+ defaultvalue="@{default-service-name}" />
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="service.name" value="${_service.name}"/>
<entry key="deploy.root" value="${_service.name}"/>
@@ -163,13 +235,14 @@
<!-- getting the service path -->
- <macrodef name="get-service-home">
+ <macrodef name="get-service-home"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<sequential>
<dirname property="__service.home" file="${basedir}"/>
- <input message="Enter the path where you want to install the service
[${__service.home}/webapps]:"
- addproperty="_service.home"
- defaultvalue="${__service.home}/webapps" />
+ <psbase:input2 message="Enter the path where you want to install the
service"
+ addproperty="_service.home"
+ defaultvalue="${__service.home}/webapps" />
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="service.home" value="${_service.home}"/>
</propertyfile>
@@ -181,32 +254,25 @@
<!-- getting the Tomcat -->
- <taskdef resource="net/sf/antcontrib/antlib.xml"
- uri="antlib:net.sf.antcontrib">
- <classpath>
- <pathelement location="lib/misc/ant-contrib-1.0b3.jar"/>
- </classpath>
- </taskdef>
-
-
<macrodef name="get-tomcat"
- xmlns:antcontrib="antlib:net.sf.antcontrib">
+ xmlns:antcontrib="antlib:net.sf.antcontrib"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<attribute name="tomcat-download-url"/>
<attribute name="tomcat-name"/>
<sequential>
- <input message="Do you want me to download and install the application
server Tomcat (@{tomcat-name}) for you? "
- addproperty="tomcat.install.decision"
- validargs="y,n"
- defaultvalue="n" />
+ <psbase:input2 message="Do you want me to download and install the
application server Tomcat (@{tomcat-name}) for you?"
+ addproperty="tomcat.install.decision"
+ validargs="y,n"
+ defaultvalue="n" />
<antcontrib:if>
<equals arg1="${tomcat.install.decision}" arg2="y" />
<antcontrib:then>
<property file="${basedir}/@{dest-config-file}" />
<dirname property="_tomcat.install.location"
file="${service.home}"/>
- <input message="Enter the path for the Tomcat installation:
[${_tomcat.install.location}/@{tomcat-name}]:"
- addproperty="tomcat.install.location"
- defaultvalue="${_tomcat.install.location}/@{tomcat-name}" />
+ <psbase:input2 message="Enter the path for the Tomcat installation"
+ addproperty="tomcat.install.location"
+
defaultvalue="${_tomcat.install.location}/@{tomcat-name}" />
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="tomcat.home" value="${tomcat.install.location}"/>
</propertyfile>
@@ -227,9 +293,9 @@
</antcontrib:then>
<antcontrib:else>
<property name="tomcat.default.install.location"
value="/usr/local/tomcat"/>
- <input message="Enter the path for the Tomcat installation:
[${tomcat.default.install.location}]:"
- addproperty="tomcat.install.location"
- defaultvalue="${tomcat.default.install.location}" />
+ <psbase:input2 message="Enter the path for the Tomcat installation"
+ addproperty="tomcat.install.location"
+ defaultvalue="${tomcat.default.install.location}" />
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="tomcat.home" value="${tomcat.install.location}"/>
</propertyfile>
@@ -243,13 +309,14 @@
<!-- getting http server port -->
- <macrodef name="get-server-port">
+ <macrodef name="get-server-port"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<sequential>
<property name="target.default.port" value="8080"/>
- <input message="Enter the port which will be used by your application
server Tomcat [${target.default.port}]:"
- addproperty="_target.port"
- defaultvalue="${target.default.port}"
+ <psbase:input2 message="Enter the port which will be used by your
application server Tomcat"
+ addproperty="_target.port"
+ defaultvalue="${target.default.port}"
/>
<echo>Make sure that your application server Tomcat has the same
port</echo>
<echo>for the http communication. If not then configure the Tomcat in
order</echo>
@@ -267,13 +334,14 @@
<!-- getting java path -->
- <macrodef name="get-java-path">
+ <macrodef name="get-java-path"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<sequential>
<property name="java.default.path" value="/usr/local/jdk1.5.0"/>
- <input message="Enter the home directory where the Java is installed
(I need the home directory and not the directory where the executable binary
is present) [${java.default.path}]:"
- addproperty="_java.path"
- defaultvalue="${java.default.path}"
+ <psbase:input2 message="Enter the home directory where the Java is
installed (I need the home directory and not the directory where the
executable binary is present)"
+ addproperty="_java.path"
+ defaultvalue="${java.default.path}"
/>
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="java.path" value="${_java.path}"/>
@@ -338,18 +406,19 @@
<!-- setting basic properties -->
- <macrodef name="set-service-descr-email-organization">
+ <macrodef name="set-service-descr-email-organization"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<sequential>
- <input message="Enter the service description [perfSONAR service]:"
- addproperty="service.description"
- defaultvalue="perfSONAR service"/>
- <input message="Enter the contact email address of service owner:"
- addproperty="service.contact.email"
- defaultvalue=""/>
- <input message="Enter the organization name where the service is being
installed:"
- addproperty="service.organization.name"
- defaultvalue=""/>
+ <psbase:input2 message="Enter the service description"
+ addproperty="service.description"
+ defaultvalue="perfSONAR service"/>
+ <psbase:input2 message="Enter the contact email address of service
owner"
+ addproperty="service.contact.email"
+ defaultvalue=""/>
+ <psbase:input2 message="Enter the organization name where the service
is being installed"
+ addproperty="service.organization.name"
+ defaultvalue=""/>
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="service.r.service_description"
value="${service.description}"/>
@@ -365,26 +434,30 @@
<macrodef name="register-fuctionality"
- xmlns:antcontrib="antlib:net.sf.antcontrib">
+ xmlns:antcontrib="antlib:net.sf.antcontrib"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="dest-config-file"/>
<sequential>
- <input message="Turn on service registration to Lookup Service? "
- addproperty="functionality.register"
- validargs="y,n"
- defaultvalue="n"/>
+ <psbase:input2 message="Turn on service registration to Lookup
Service?"
+ addproperty="functionality.register"
+ validargs="y,n"
+ defaultvalue="n"/>
<antcontrib:if>
<equals arg1="${functionality.register}" arg2="y" />
<antcontrib:then>
- <input message="Enter the URL of LS []:"
- addproperty="functionality.register.ls_address"/>
- <input message="Enter the registration interval [30000]:"
- addproperty="functionality.register.interval"
- defaultvalue="30000"/>
- <input message="Enter IP or DNS address of the host you are
using now to deploy the service []:"
- addproperty="functionality.register.access_point"/>
- <input message="Enter the name that will represent the service
in LS database :"
- addproperty="functionality.register.service_name"/>
+ <psbase:input2 message="Enter the URL of LS"
+ addproperty="functionality.register.ls_address"
+ defaultvalue=""/>
+ <psbase:input2 message="Enter the registration interval"
+ addproperty="functionality.register.interval"
+ defaultvalue="30000"/>
+ <psbase:input2 message="Enter IP or DNS address of the host you
are using now to deploy the service"
+ addproperty="functionality.register.access_point"
+ defaultvalue=""/>
+ <psbase:input2 message="Enter the name that will represent the
service in LS database"
+ addproperty="functionality.register.service_name"
+ defaultvalue=""/>
<propertyfile file="${basedir}/@{dest-config-file}">
<entry key="service.r.ls_url"
value="${functionality.register.ls_address}"/>
<entry key="component.registrator.interval"
value="${functionality.register.interval}"/>
@@ -441,15 +514,16 @@
<macrodef name="exist-resource-remove"
- xmlns:xdb="http://exist-db.org/ant">
+ xmlns:xdb="http://exist-db.org/ant"
+ xmlns:psbase="psbase:/base.perfsonar.org">
<attribute name="resource"/>
<attribute name="uri"/>
<attribute name="user"/>
<attribute name="password"/>
<sequential>
- <input message="Enter the name of resource to remove []:"
- addproperty="resource"
- defaultvalue=""/>
+ <psbase:input2 message="Enter the name of resource to remove"
+ addproperty="resource"
+ defaultvalue=""/>
<xdb:remove uri="@{uri}"
resource="@{resource}"
user="@{user}"
@@ -684,68 +758,4 @@
</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: r2668 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/base/ant, svnlog, 08/16/2007
Archive powered by MHonArc 2.6.16.