I have just finished an ANT script (does the job perfectly).
But there is a new requirement and script has to change.
The goal is to have ANT deployment file called deploy-all.txt
. The file will look like
client1=name1=server1+server2=repositoryX
client2=name2=server1+server3=repositoryY
client3=name3=server2+server4=repositoryZ
There will be only 1 client, only one name, from 1 to few servers, only one repository, and one type.
What the goal is: for each line i need to get variables so i can parse them and perform tasks. The output should be
client=client1
name=name1
server=server1
server=server2 (could be more)
repository=repository1
Those parameters have to be parsed for each line. I do have generic APP that is called GENERIC.WAR - that is done and works well. Now applicaiton require separate plugins that needs to be build/deploy.
What that script will do:
a) copy generic GENERIC.WAR file to server1 and server2 with name scecified as client1 (SCP using scp task)
b) get svn repository based on repositoryX (svn update ant task)
c) get name and loop through existing code (using xmltask from checked out repository) to find right code to compile and zip it (have done it already)
So I have all tasks i can perform but can not parse each element as a separate parameter for each line. I tried for list
and sequential
but no success so far. I could separate all but as only 1 parameter. I can not get it as multiple parameters that i can loop through each line and parse to additional tasks.
Because it is just a start - i can change design - to have a XML for example instead of TXT. Is it doable and if yes could you please help me with idea how to.