Subject: [ccnet-user] Re: Adding Projects based on data
read from file



I am assuming by the lack of a response that you can’t do this now...

 

So can anyone point me in the direction of trying to implement this?

 

Cheers

Graeme

 

From: ccnet-user@xxxxxxxxxxxxxxxx [mailto:ccnet-user@xxxxxxxxxxxxxxxx] On Behalf Of Graeme Scott
Sent: Wednesday, 16 September 2009 4:57 PM
To: ccnet-user@xxxxxxxxxxxxxxxx
Subject: [ccnet-user] Adding Projects based on data read from file

 

Hi,
 
In NAnt I can use i can do something like the following:
 
<foreach item="Line" in="file.csv" delim="," property="csv.A, csv.B, csv.C" trim="Both" >
 
   Do something based on the data read from the file.
 
</foreach>
 
What I would like to be able to do is something similar, but where I create projects based on what comes from the files. This can be really usefull for adding a number projects that are based on similar settings. We have a number of projects that only slightly change and currently I have to keep on adding them multiple times.
 
I am already using the preprocessor and that cuts down what needs to be changed, but I would like to be able to add multiple projects based on a file to make it even easier to add..
 
<cb:scope>
   <cb:include href="ccnet.TaskA.include"/>
   <cb:TaskA description="BlahBlahBlah" paramA="AAAA" />
   <
cb:TaskA description="BlahBlahBlah" paramA="BBBB" />
   <
cb:TaskA description="BlahBlahBlah" paramA="BBBB" />
</
cb:scope>

<cb:scope>
   <cb:include href="ccnet.TaskB.include"/>
   <cb:TaskB description="BlahBlahBlah" paramA="AAAA" />
   <
cb:TaskB description="BlahBlahBlah" paramA="BBBB" />
   <
cb:TaskB description="BlahBlahBlah" paramA="BBBB" />
</
cb:scope>

 
Now what I would like to be able to do is:
 

 <cb:scope>
   <cb:include href="ccnet.TaskA.include"/>
   <cb:foreach in="file.csv" delim="," property="csv.A, csv.B, csv.C" trim="Both">
      <cb:TaskA description="$(csv.A)" paramA="$(csv.B)" />
   </
cb:foreach>
</cb:scope>
 
<cb:scope>
   <cb:include href="ccnet.TaskB.include"/>
   <cb:foreach in="file.csv" delim="," property="csv.A, csv.B, csv.C" trim="Both">
      <cb:TaskB description="$(csv.A)" paramA="$(csv.B)" />
   </
cb:foreach>
</cb:scope>
 

Is there anyway to do something like this?
 
I would even consider modifying the code base myself to do it. I am currently on 1.4.4.83
 
Cheers,
Graeme






Privacy