The Ant-Contrib project is collection of tasks (and at one point maybe types and other tools) for Apache Ant.
Questions tagged [ant-contrib]
256 questions
3
votes
2 answers
How can "if-else" logic be emulated using "condition"?
I know that there is ant-contrib, which provides "if-else" logic for ant.
But I need to achieve the same without ant-contrib. Is that possible?
Pseudocode which I need to work:
if(property-"myProp"-is-true){
do-this;
}else{
do-that;
}
Thank…

java.is.for.desktop
- 10,748
- 12
- 69
- 103
3
votes
1 answer
How can I generate Ant targets?
I want to be able to generate a number of Ant targets something like this:

Matthew Kime
- 754
- 1
- 6
- 15
3
votes
2 answers
Thread safe math operations in Parallel on Apache Ant
I am running several subtasks in parallel with Ant.
This is the simplified content of build.xml:
…

jiahao
- 3,373
- 2
- 35
- 36
3
votes
1 answer
Ant-contrib - For loop error
I am encountering the following error when I try to use Ant-contrib's FOR loop:
Invalid type class org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase used in For task, it does not have a public iterator method
My code is as…

newbie
- 14,582
- 31
- 104
- 146
3
votes
2 answers
Iterate over for loop with fixed amount of iterations
I am using ant-contrib library in my ant scripts, but I do not get how can I make a fixed amount
of loops using foreach tag?
By fixed amount of iterations I do not mean some hardcoded value, but the ant property, supplied from command line.

Sergei Ledvanov
- 2,131
- 6
- 29
- 52
3
votes
2 answers
Ant Propertyregex part of file path
I am looping list of files inside base directory using for of Ant-Contrib library. I want to get the part of file path after base directory but without filename.
For example my base Directory is : C:\projects\Dev\Main\Sample Game\js
I have lot of js…

programmermurali
- 159
- 1
- 3
- 10
3
votes
3 answers
If isset in apache ant is failing
I am trying to check if a property exists in ant with the following:

Thanasis Pap
- 2,031
- 2
- 17
- 19
3
votes
1 answer
antcall in foreach is not executing loop
I want to build couple of projects based on no of .composites by using ant scripts.
i added all the taskref tags,lib path every thing in my build.xml file.
i wrote the following piece of code for the same and i am getting the error
foreach doesn't…

ktraos
- 127
- 3
- 8
3
votes
2 answers
ANT remove blank spaces regexp
I want to get the .doc file name and save it in the next property (pdf.name). Using regexp I want to remove all the blank spaces in the .doc file name and transform it from this:
NAME FILE.doc
To this:
NAMEFILE.pdf
This is my code:

Alberto Garcia
- 39
- 1
- 2
3
votes
1 answer
How to put two conditions in ANT Target?
My need is to check two conditions in my ANT Target. If either of them is true the ant target must execute.
...
/>
The above syntax in WRONG. How to make it correct?

Anand
- 2,239
- 4
- 32
- 48
3
votes
3 answers
Need Ant condition example
Can someone please explain me with Example of Ant condition property with "if", "and", "not" and "istrue" with the code??
I'm new to Ant and need help on this.
Basically i need to download file using FTP. I have code to download it. but there…

coolgokul
- 257
- 1
- 7
- 18
3
votes
2 answers
How to copy files into a zip file using ANT script?
I want to copy few files into an existing zip file using ANT script.
Is there any task available for that? Or do I need to unzip the zip file then copy the needed files and zip again?

Anand
- 2,239
- 4
- 32
- 48
2
votes
1 answer
EOFException when executing remoteant task from ant-contrib
I am trying to be able to launch an ant task remotely using ant-contrib. For testing purposes I have defined a server and a caller with following files.

pedromarce
- 5,651
- 2
- 27
- 27
2
votes
3 answers
cannot unset properties with ant-contrib when loading two extenal property files
So ... I have build.xml that loads property file from basedir.
Then, as the target I perform the following:

HX_unbanned
- 583
- 1
- 15
- 51
2
votes
2 answers
ant iterate over files
I want to iterate over a list of jars (undefined number) and add them all to the jar file.
To add them I plan to use something like this:
…

Yossale
- 14,165
- 22
- 82
- 109