ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Brown" <da...@davidwbrown.name>
Subject Re: Easier Way To Check and Install jars
Date Tue, 08 Jan 2008 11:26:58 GMT
I have a suspicion you can do this without the Antcall. If I get a chance I will look at some
builds I have. My current gig does not allow internet access at work. I'll take a look back
in 12 hours.

Francisco Tolmasky wrote ..
> I wrote up a "short" install target in my ant file to make sure I have  
> everything necessary to run script tasks, but it seems overly verbose  
> for such a simple task:
> 
>      <target name = "Copy-Jar" unless = "${JarName}.jar-exists" >
>          <echo message = "Installing ${JarName}.jar" />
>          <copy tofile = "/usr/share/ant/lib/${JarName}.jar" file =  
> "Tools/Ant/${JarName}.jar" />
>      </target>
> 
>      <target name = "Install-Jar" >
>          <available property = "${JarName}.jar-exists" file = "/usr/ 
> share/ant/lib/${JarName}.jar" type = "file" />
>          <antcall target = "Copy-Jar" />
>      </target>
> 
>      <target name = "install">
>          <antcall target = "Install-Jar" >
>              <param name = "JarName" value = "bsf" />
>          </antcall>
>          <antcall target = "Install-Jar" >
>              <param name = "JarName" value = "commons-logging-1.1" />
>          </antcall>
>          <antcall target = "Install-Jar" >
>              <param name = "JarName" value = "js" />
>          </antcall>
>          <antcall target = "Install-Jar" >
>              <param name = "JarName" value = "ant-apache-bsf-1.7.0" />
>          </antcall>
>      </target>
> 
> I'm still somewhat new to ant, so I feel like I may be doing things  
> the hard way, is there any easier way to do this, namely one that  
> involves combining Install-Jar and Copy-Jar tasks?
> 
> Thanks!
> 
> Francisco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

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


Mime
View raw message