I have property file at some loaction which consist of number of jar files names.Call from ANT and fectch all jar files at repository -


I have a property file that matches the number of jar files in the format below hellotest.jar = 1.2 .3 helootest1.jar = 2.3.4 Hello.jar = 3.4.5

First I need to change = sign in To do this, call this property file in the property file and then the ant and copy that jar file with some partial location (/ TMP)

Please tell me how I for ants (loop) ) Of I am shying and targeting

I think that you have your own dependency management client Trying to make use of my advice which already understands how can be downloaded from the Maven repository.

example

build.xml

Ivy retrieval function can be used to download project dependencies in named locations:

  & lt; Project name = "demo" default = "build" xmlns: ivy = "antlib: org.apache.ivy.ant" & gt; & Lt; Target name = "init" description = "solve dependency, lib phobia" & gt; & Lt; IV: Pattern = "lib / [artifact] - [Amendment] (- [classifier]). [Ext]" /> & Lt; / Target & gt;   

ivy.xml

This file list is your project dependency. (Simpler than collection of asset files):

  & lt; Ivy-module version = "2.0" & gt; & Lt; Info organization = "com.myspotontheweb" module = "demo" /> & Lt; Dependency & gt; & Lt; Dependency org = "udp.heloo" name = "hellotest" rev = "1.2.3" conf = "default" /> & Lt; Dependency org = "udp.heloo" name = "helootest1" rev = "2.3.4" conf = "default" /> & Lt; Dependency org = "udp.heloo" name = "hello" rev = "3.4.5" conf = "default" /> & Lt; / Dependencies & gt; & Lt; / Module from Vertical & gt;   

Additionally dependencies are dependencies, so the IV will also manage them for you.

ivysettings.xml

This file controls where Iv downloads from. In this example, two Maven repositories have been configured, Maven Central and Meven Repo which you list as an example above.

  & lt; Ivysettings & gt; & Lt; Settings default Resolver = "All-Repo" / & gt; & Lt; Resolver & gt; & Lt; Chain name = "all-repo" & gt; & Lt; Ibiblio name = "central" m2compatible = "true" /> & Lt; Ibiblio name = "extra-repo" m2compatible = "true" root = "http://maven.tvl.com/nexus" /> & Lt; / Series & gt; & Lt; / Series & gt; & Lt; / Resolver & gt; & Lt; / Ivysettings & gt;    

Comments