ant

How to `chmod -R +w` with Ant, files and folders?

I'd like to do the equivalent of a chmod -R +w foo/ in an Ant build script. So far I'm using this: <chmod perm="g+w"> <dirset dir="${basedir}/foo"> </dirset> <fileset dir="${basedir}/foo"> </fileset> </chmod> Is there a neater way to write that to include files and folders recursively? ...

Ant <taskdef> problem - classname not found

Hi guys, Asumming I have a build.xml which is already given. I was ordered to add my own task to check some condition and let the build fail if it is not set. In this build.xml there are already some tasks defined. So i thought i can simply write my own task, place it in a same package like the others and it will work. <property name"...

tiny changes of properties file doesn't take effective after an "ant all" build

Hello: I'm new to Java and currently involve in a project, this problem confuses me a lot. When I updated my properties files and run "ant all", normally it works when I check it on webpage. But it didn't work every time, for example, if there is just a tiny change: like from word "Cookiex" => "Cookies" AccountLogin.cookiesJavaScript...

Using Ant tasks with Flash Builder 4

Can someone help me get started with using ant in Flash Builder 4. I have never used ant before so I'm a complete novice. I will need to know how to get it installed in the first place, and how to do the basics. Any help is appreciated. ...

Using custom tokens in services-config.xml with ant mxmlc task

Hi all, is it possible to run the ant mxmlc task with custom tokens? Here some part of my services-config.xml. ... <channels> <channel-definition id="java-amf" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndp...

ANT: Telnet is not working

I am trying the below ANT telnet task: <telnet userid="uid" password="pass" server="${BT_Server}"> <read>/u01/appldev/devappl/po/11.5.0/reports</read> <write>ls</write> <read string="/u01/appldev/devappl/po/11.5.0/reports"/> </telnet> It will execute for infinite time after login to the remote server. Getting below messa...

Ant <input/> no longer working in Eclipse Helios (3.6)

I have a build file in my Eclipse projects. One of the things this file does is ask a question via a prompt, using the <input/> tag. Since upgrading to Eclipse Helios, this no longer works, as I'm getting the following error: [input] ***WARNING: Display must be created on main thread due to Cocoa restrictions. Invalid thread access Ho...

How do I get Ivy to copy the dependencies to the lib directory when using it from the command line?

I have the following command: java -jar ...\ivy-2.2.0-rc1.jar -ivy ...\ivy.xml Which I am expecting to resolve the dependencies and copy them to the lib folder of my project. Ivy seems to resolve the dependencies but does not do the copy. If I run the ant task the copy happens correctly. Does anyone know why the copy to lib does no...

How do I retrieve a value from a variable in a for loop?

I have a for loop like the following: <property name="audi" value="germany" /> <property name="toyota" value="japan" /> <for list="audi,toyota" param="car"> <sequential> <echo>@{@{car}}</echo> </sequential> </for> As you can see, I'm trying to echo the value "germany" then "japan", but it doesn't - it displays @{@{car}...

Ant exlude jar from path

I have a path that looks like this <path id="classpath-ant"> <fileset dir="${lib-ant-dir}"> <include name="**/*.jar" /> </fileset> <pathelement location="${template-dir}/hibernate" /> <path refid="test-classpath" /> <path refid="ivy-ant-classpath" /> </path> My test-classpath inc...

Ant: Create tar without path information?

Update: I am using Ant 1.8.1 on Windows XP. I am trying to write an Ant master build file for multiple projects. I can successfully create a jar for each project, and I want to package all of these jars into a single tar.gz file. Each jar file is located within the bin subdirectory of its respective project, but this path could be ch...

Ant script to modify a jar

Is there a way I can modify a file in a jar using ant script. Like, I have a x.properties in a y.jar. I want to edit this x.properties and put it back into the y.jar using ant script. Is this possible? ...

How do I properly integrate Eclipse's and Ant builder?

I'm new to java/eclipse(coming from .NET), so I'm still unfamiliar how eclipse builds/runs my projects. After examining the .project and .classpath files i'm guessing that they have all the info needed for the eclipse to build the project. I like the kind of control nAnt gives for .NET projects, so I decided to switch Eclipse's Javabuil...

How do I check where the symlink is pointing to in Ant

Hi, Basically what I've asked in the title. How can I use the Ant "symlink" command to find out where the symlink is pointing to? Thanks Steve ...

Ant mapper: Changing file name using a property

I have a ant property app.prod= production During the an build, I want to replace all files in a particular directory with production in its name to same nma e without 'production' in it. Example File names are abcproduction.xls cdeproduction.xls I want to remove change the file names to abc.xls cde.xls <regexpmapper from="(.*)$...

Problem resolving dependencies because of [organisation]

In my ivysettings.xml, I have a url resolver with the following artifact resolver: <artifact pattern="http://my-repo-server/my-repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/&gt; Any organisation that has a "." in its name fails to resolve (such as org.apache.struts#struts-core;1.3.5). I've come to the conclusion...

In PHPUnderControl, can I configure PHP_CodeSniffer to ignore specific directories?

I've recently been trying to set up PHPUnderControl, a Continuous Integration server based on CruisControl. Part of the checks I'd like to run is the PHP CodeSniffer (PHPCS) to detect "code smell". However, letting this run on my codebase results in an extreme amount of problems being detected. Most of these are found in libraries that I...

How to exclude a directory which is already included in an Ant FileSet?

I am using the jar task in ant and wish to exclude a certain directory. The structure of the directories is something like: food |_ fruits |_ apples |_ bananas (having been made generic and simplified a little) And I have an ant task like this: <jar destfile="Dest.jar"> ... <fileset dir="food"> <excl...

ant scripts to build apk file and load it in a emulator?

Hi. i am trying to create a build.xml script that cleans, builds and creates a apk file of a Junit android test project that i have created. the steps i want to achieve in my build file is this: clean build create apk file Sign apk file launch emulator install apk file run instrumentalTest Save the tests into an HTML Junit Repo...

The @ in a for loop while using scp

Please take a look at this line: ${server_username}:${server_password}@@{server}:/tmp The double @@ causes problems. Instead of user:pass@server it displays as user:passserver and therefore is unable to connect to the remote ssh server. How do you tell ant to leave the @ be? This is my code: <for list="${externalLibs}" param="libra...