Questions tagged [ant-contrib]

The Ant-Contrib project is collection of tasks (and at one point maybe types and other tools) for Apache Ant.

256 questions
22
votes
6 answers

Getting an error "Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found."

I am getting an error Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found. when I am trying to ant build on eclipse. So I downloaded ant-contrib-0.6.jar and kept it in my /lib location of apache…
gauravhalbe
  • 392
  • 2
  • 8
  • 19
17
votes
4 answers

Using antcontrib task via maven-antrun-plugin

My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from…
Qwerky
  • 18,217
  • 6
  • 44
  • 80
17
votes
1 answer

Using Ant, is it possible to use AND, OR condition in tag IF?

contrib It's possible to check more condition in tag IF? I need to do something like this :
Krzysztof Miksa
  • 1,519
  • 1
  • 16
  • 23
17
votes
2 answers

How can I iterate over properties from a file?

All my projects and their versions are defined in a properties file like this: ProjectNameA=0.0.1 ProjectNameB=1.4.2 I'd like to iterate over all the projects, and use their names and versions in an Ant script. At present I read the entire file…
Herr K
  • 1,751
  • 3
  • 16
  • 24
12
votes
5 answers

ant-contrib - if/then/else task

I am using ant, and I have a problem with if/then/else task, (ant-contrib-1.0b3.jar). I am running something that can be simplified with build.xml below. I am expecting to obtain from 'ant -Dgiv=Luke' the message input name: Luke should be…
Francesco
  • 315
  • 1
  • 3
  • 13
12
votes
2 answers

execute Ant task if TWO conditions are met

The above ant script implements if dir_is_empty then git-clone else git-fetch using Ant-1.7.1 core statements:
oHo
  • 51,447
  • 27
  • 165
  • 200
9
votes
1 answer

How can I use something like an array or list in Ant?

I have a list of strings (e.g. "piyush,kumar") in an Ant script for which I want to assign piyush to var1 like and kumar to var2 like . So far, I'm using a buildfile like the…
Piyush
  • 5,145
  • 16
  • 49
  • 71
9
votes
1 answer

antcontrib foreach executed in parallel does not raise errors

I have the following ant script that I can't seem to find a way to make fail when parallel is set to true for antcontrib's foreach task. Any ideas?
Clintm
  • 4,505
  • 3
  • 41
  • 54
9
votes
3 answers

Stop ant script without failing build

In my ant script I want to exit (stop executing build) without failing when a condition is met. I have tried to use:
Gosia
  • 155
  • 1
  • 1
  • 7
6
votes
5 answers

ANT: How to read property setted in a foreach loop

Dear, I currently face some problem to retrieve the value of a property setted in a foreach loop. Maybe one of you could help me... The purpose is to check if one file of a folder has been modified since the corresponding jar has been generated.…
Lolablue
  • 99
  • 1
  • 1
  • 7
6
votes
1 answer

How to copy files from a Unix share to a Windows machine using ant?

I have some files on a Unix machine which I can access from my Windows PC with Windows Explorer using \host\directory However, when using an ant copy task, ant keeps on saying the directory doesn't exist... So, the ant part is:
Lieven Cardoen
  • 25,140
  • 52
  • 153
  • 244
5
votes
2 answers

ant-how can i return value from macrodef?

I need to compare two string args, from which I used to get one arg as runtime input (e.g. platform=windows,ios,mac) and another one has list of values, defined under build.properties (e.g. project.supportedplatforms=windows,mac). If the condition…
jass
  • 343
  • 2
  • 6
  • 16
5
votes
1 answer

ant - Need to get only file name without extension and entire path

I have couple of .xml files in a folder.I want to loop on each .xml file.It is getting fine. I want to take only .xml file name without entire path. How can i achieve that.? I am using the below piece of code to get the file name.
ktraos
  • 127
  • 3
  • 8
5
votes
2 answers

Use ant-contrib,how to use "endsWith"?

the ant-contrib lastest version is ant-contrib-1.0b3.jar? http://ant-contrib.sourceforge.net/tasks/tasks/more_conditions.html this document show endsWith condition But I use ant 1.8.2 And ant-contrib-1.0b3.jar, I cann't find the endsWith condition…
feilong
  • 721
  • 1
  • 12
  • 25
5
votes
1 answer

Check multiple properties are set and not blank (ant)

I'm in a situation that involves running an ant build with optional parameters that are always specified but but not always defined, like so ant -DBUILD_ENVIRONMENT=test -Dusername_ext= -Dconf.dir_ext= -Dcgi-dir_ext= If the parameters are not given…
Craig
  • 8,093
  • 8
  • 42
  • 74
1
2 3
17 18