ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <rhi...@sympatico.ca>
Subject Re: Setting variable classpath based on user input
Date Wed, 19 Jan 2005 13:26:12 GMT
I'm putting this back on this list so that others can help you - and learn
from your question and the responses you get.

I'm afraid I can't help any further with your problem.

Rhino

----- Original Message ----- 
From: "Swathi Rao" <swathi.rao@gmail.com>
To: "Rhino" <rhino1@sympatico.ca>
Sent: Wednesday, January 19, 2005 6:44 AM
Subject: Re: Setting variable classpath based on user input


> Hello Rhino,
> Sorry for the delay in response. I was down with fever :-(
> I wanted to thank you for the help. It certainly gave me an idea to
> solve the problem.
>
> However I wanted to know if there was a way where we could copy
> classpaths from one name to another, similar to the "PropertyCopy"
> task in Ant-Contrib. The reason why I am asking is that it could help
> me solve similar issues while defining a macrodef which uses a
> classpath refid based on the user input. For ex in my build.xml I had
> a macrodef defined as follows -
>
> <macrodef name="runModule">
> <attribute name="className"/>
> <attribute name="moduleName"/>
> <attribute name="testWorkingDir"/>
> <attribute name="output" default="@{moduleName}.out"/>
> <element name="arguments"/>
> <sequential>
> <java className="@{className}"
> dir="@{testWorkingDir}"
> maxmemory="1536M"
> output="@{testWorkingDir}/@{output}"
> error="@{testWorkingDir}/@{moduleName}.err"
> fork="true"
> resultproperty="@{moduleName}.done">
> <arguments/>
> <classpath refid="classpath.${userinput}"/>
>                 </java>
>               </sequential>
> </macrodef>
>
> Basically the line where the classpath refid is given, I want to
> change it to accept different refid's based on a userinput. I tried
> using PathtoFileset, If then Else etc from the Ant-Contrib tasks to
> acheive it. Finally I changed the classpath refid names to be
> classpath.${userinput}(for ex: classpath.userinput1 or
> classpath.userinput2). It worked in this case..however not sure if
> this would be a feasible solution when things get more complicated.
> Regards,
> Swathi.
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005


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


Mime
View raw message