ant

ANT task to move and rename, files and folders, recursively

I have have a folder structure like so: /PROJECT/PROJECT.html /PROJECT/PROJECT_readme.txt /PROJECT/PROJECT.css /PROJECT/PROJECT.js /PROJECT/abc_PROJECT_def.txt /PROJECT/something.js /PROJECT/other.txt /PROJECT/somefolder/PROJECT_other.txt I want to use ANT to copy the complete directory and also change the PROJECT string in the...

Ant var and property scope

I have a main build script that calls various targets. One of these targets needs to store a value and another target needs to display it. Obviously this is not working so I think it may be related to scope. I've tried var, property, and declaring the property outside of target1. Since var seems to be mutable, it looks like I need to...

Has anyone ever used fx2Ant to build an application?

I am trying to use fx2Ant to make a build file for my project. My project consists of several modules in different projects in flex builder. Is it possible to generate a build file that builds all of the modules from the subprojects into the main project? FX2Ant can make a build file for each project but can it make one for the whole app...

java.security file in ANT

How can I force Ant to use my java.security file? I'm trying to build with Ant from a command line and use this file in the JVM. Is there any way to do this via Ant command line? Is setting an environment variable ANT_OPTS the solution? ...

Ant macro attribute values from list in properties file

Hi, I'm writing an Ant script and I like to call a macro multiple times using arguments from a list in a property file. The format of the property file is not important, it will be manually edited prior to Ant invocation. I'v been thinking about AntCall, SubAnt, RegExpMapper etc. but I'm simply not experienced enough in Ant to put it al...

Conditionally include files in fileset

Is it possible to do something like the following? <target name="path-test"> <property name="d.file" value="ant/d.fileset" /> <property name="c.file" value="ant/c.fileset" /> <property name="e.file" value="ant/e.fileset" /> <available property="c.file.exists" file="${c.file}" /> <available property="d.file.exists" file="...

Deleting a file in ant

For ease of access, I have a couple of config files in the parent of a series of project folders. When building the projects, they need copying into one of the projects source folders until after the build is finished, whereupon I'd like them to be deleted. At the moment, I have this: <target name="build-java"> <copy file="config.prop...

What's the ANT version in iPhone 3Gs and how can I access it?

I want to build up an ANT network (e.g. see wikipedia article ) and develop sport accessories using the iPhone 3Gs with integrated ANT Controller (used by Apple for Nike+iPod devices) to communicate with them. I need to know which ANT version the controller is (ANT or ANT+), what it's able to do (receiver/transeiver) and how I can acces ...

Why is no one using make for Java?

Just about every Java project that I've seen either uses Maven or Ant. They are fine tools and I think just about any project can use them. But what ever happened to make? It's used for a variety of non-Java projects and can easily handle Java. Sure you have to download make.exe if you use Windows, but Ant and Maven also don't come w...

Updating files inside an existing WAR file

I am trying to update files inside an existing WAR file using the ANT WAR task. I need to replace a set of xml files in a folder in WAR with new ones from my HDD. <war destfile="myApp.war" update="true" > <zipfileset dir="<PathToStubsFolderOnHDD>" includes="**/*.xml" prefix="<PathToStubsFolderInWAR>"/> </war> This works fine if th...

How to create an Ivy dependency for local jars inside your project/lib?

I have a couple of jar files, (some of which depend on each other), and I'm trying to have ivy manage them for my project. I do not want to create a "local" (user dir based) repository, because I want other users to be able to check out my svn project and run it without local/shared repository setup. For a variety of reasons, I cannot ...

How to avoid Getting bogus error messages using ant verbose, debug modes?

Hi All, I am trying to execute a build file in verbose and debug modes. I am getting messages of the type, Property "component.key" has not been set even though in target "private-init" of the build file, I am setting the value of variable, component.key. I am attaching my build file, ic-build.xml, below I am calling the build fi...

ant sql task throws "no ResultSet available" with org.sqlite.JDBC driver

I'm trying to use org.sqlite.JDBC to create and update a sqlite database in ant. The sqlitejdbc-v056.jar comes from http://www.zentus.com/sqlitejdbc/ and is the latest version (056) This is my build.xml: <?xml version="1.0" encoding="utf-8"?> <project name="My Project" default="mytarget" basedir="."> <path id="antclasspath"> ...

SVNAnt Trilead jar missing

Hey all, I downloaded and installed SVNAnt 1.3.0, Ant 1.8, and Java 1.6. When I try to do a simple checkout via https, I get a java.lang.NoClassDefFoundError: com/trilead/ssh2/InteractiveCallback. I'm not sure why it's using an ssh class since I'm using https. Trilead SSH for Java doesn't seem to be supported or distributed anymore,...

How is Gant able to reference targets by their names, and not get a missing property exception?

In the code presented here: Gant file, there is the following code: target(dist: 'Create release artefacts') { depends(test) depends(jar) } target(run: 'Run the distributed jar') { depends(dist) Ant.java(jar: distributedJarPath, fork: 'true') } target(hello: 'Hello World') { println("Hello World"...

How to compare the files returned from SVN diff with the concatenated files in ANT

I am trying to create an ANT build script which will detect which files were changed during the development (by diff SVN command) and output the list of files which are built from these changed files. I would like to check all the Concat tasks within the build file and compare the filelists within them with the diff changed files list c...

How to exclude a directory from ant fileset, based on directories contents

How can I create an ant fileset which excludes certain directories based on the contents of the directory? I use ant to create a distribution jar which has each localization in separate directories, some of which are incomplete and should not be released. I would like to add something to the directory (for example a file named incomple...

Problem with compiling a gwt project with ant

Hi, I've been using GWT for quite some time now and have only used the eclipse plugin to compile my projects so far. Due to a new requirement I need to use an ant build (for the first time) to build a gwt project. First I'll say that I have 2 modules which have an entry point and 2 other common modules which only contain java classes (wh...

Java start JBoss from ant using Cargo: Failed to create a JBoss 4.2.2 existing configuration

Hello, I am trying to start JBoss from ant, using Cargo. In build.xml I have the following targets set: <project name="" default="" basedir="."> <property name="jboss.logging" value="${jboss.home}/server/default/log/jboss.logging.log" /> <property name="jboss.log" value="${jboss.home}/server/default/log" /> <property name="myear" ...

Ant: How can I subtract two properties (containing timestamps)?

Hi, I'm working on an ant script. In this particular part, I need to get the current month, as well as the prior month. I was thinking something similar to <tstamp> <format property="thismonth" pattern="MMyy"/> <!-- 0210 by february 2010--> </tstamp> <!--I'd like to get 0110 (january 2010) here, but can't imagine how--> <property n...