ant

Use Ant for running program with command line arguments

My program getting command line arguments. How can I pass it when I use Ant? ...

How to get Ant to copy properties file to classes directory.

I have a project which I can build and deploy correctly using Ant I want to build a war file to deploy the project. I can get everything working except I cannot get the properties file to appear in the classes directory. My properties file is located here: ${resources_dir}/${app}/Report.properties This is the war section of my buil...

How to append some text at the end of a file using ant?

I am writing a build script for my project. In one of the configuration files I need to append some text. So I am looking for some options in ant to do this. I have got one option to find something and replace that text with all of your new text and the old values. But it does not seems to be promising, as if in future someone changes t...

Ant: fileset "dir" attribute with a runtime expanded full path

Let's say I have a file-system that looks a little something like this: C:\stuff\build.xml C:\stuff\myfolder\library1.jar C:\stuff\myfolder\library2.jar Inside build.xml, I want to define a path that looks like this: <path id="some.id"> <fileset dir="myfolder"> <include name="**/*.jar"/> </fileset> </path> Normally...

Hudson will not start on Windows 7? JNLP slave agent listener started on TCP port ...

I'd like to setup Hudson to work with Ant. I am using it for the first time, and when I try: -java -jar hudson.war it starts doing something, but stops on the line: INFO: JNLP slave agent listener started on TCP port 59204 I am running Windows 7, also the Java Web Start for hudson does not start. ...

How to reset a property in ANT?

Hi, I'm writing a velocity macro within which I have some ant tasks. Within a #foreach loop in the velocity macro, I have a pathconvert task: #foreach(<iterate through something>) <pathconvert property='filename' refid='swf.file'> <mapper> <chainedmapper> <flattenmapper/> ...

Ant exec task: How to break one long argument into multiple lines

In my Ant skript, i'm executing a program, passing some arguments, of which one is a very long argument: <exec executable="${conf.GLASSFISH}/bin/asadmin" failonerror="true" vmlauncher="false"> <arg line="create-auth-realm" /> <arg line="--classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm" /> <arg line="--property jaa...

Ant WSGEN WSDL generation - include WSIT policy definition

Hi, I'm using the WSGEN Ant task to generate a WSDL from a service class. The task runs fine and generates the required WSDL. The problem I'm having is trying to get it to incorporate the WSIT policy definition at the top of the WSDL. When I deploy the service in Netbeans (i.e. not using Ant to handle WSGEN), Netbeans generates a WSDL ...

Building Flex Builder projects from commandline

I have several Flex Builder projects which depend on each other (both libraries and "applications", i.e. projects which generate an SWF), and want to compile them from commandline. I know there is the fb.exportReleaseBuild ant-Task, but unfortunately it doesn't work on Linux and only comes with Flex Builder. Is there any other way to bu...

Set up ignore block comments for Simian Ant Task

Is it possible to set up start and end comments for disabling simian in an Ant task? I've seen various forums talking about a command line option to disable simian for certain blocks of code using comments and I have tried this in the Ant task doing something like this: <simian ignoreBlocks="simian-start:simian-stop" .... /> And then...

Managing multiple internal projects using Maven (Switching from ant/ivy)

Let me first explain our infrastructure. My company produces two enterprise software products (which each in turn include multiple servers). Lets call them ProductA and ProductB. ProductA is made up of 40 individual projects that are branched together, but are all built separately and treated as individual units. As each of these proje...

How do I build the JavaME jars with ant? and can i do it while running in javaSE?

Hi I have source code that ant builds into a javaSE jar, and we ship that, ant also at the same time builds the source for a JavaME project. which I currently then open netbeans and let it compile the jars for JavaME, i'd like to do this last bit in ant and wondered if its possible and if so how? ...

Using ant to edit/append data to a text file

I am trying to add a property to a .jad file in my ant build process. Is there a task in ant to do this? All I need to do is add a line of text to the end of a text file but I cannot find a task to do this. ...

Android project broken in Eclipse after ant build

Hi, I had a project working in Eclipse completely, but after compiling it with ant in order to use Proguard to obfuscate the code the entire project fell apart. The project consists of a single package containing two main activities and 4 helper classes to handle databases and such. After using ant the activities work fine but Eclipse ...

ANT build basedir not evaluated on version 1.8.1

I have a prefectly working build.xml file on ant 1.8.0 When I've tried to upgrade ant to 1.8.1 ant it stopped working. I get an error where I use the ${basedir} variable because these variable is not evaluated. This is the output Project base dir set to: D:\project Then I use this variable to set other variables like build.dir=$...

Eclipse PDE Build: how to organize plugins and features with the "fetch" step skipped?

Hello, I'm building my Eclipse plugin by means of Eclipse PDE build, i e I've defined all the required targets in "custom.xml" But I do not want to fetch my plugins from a repository, so I'm skipping this step. However, all plugins have to be located under plugins directory, and all the features have to be located under features folder...

Including external jar-files in a new jar-file build with Ant

Hi, I have just 'inherited' a Java-project and not coming from a Java-background I am a little lost at times. Eclipse is used to debug and run the application during development. I have through Eclipse succeeded in creating a .jar-file that 'includes' all the required external jars like Log4J, xmlrpc-server, etc. This big .jar can then ...

passing a location of build.xml in ant

I'm trying to run a script that uses an ANT build but I don't want to have to run it from the location where my build.xml file is. Is there a way to pass the location to ant? Thanks in advanced ...

Determining if a directory already exists using SVN ANT

Hi there, I'm looking to create a directory using SVN ANT, but only so if the directory does not already exist (using the mkdir nested task with SVN ANT appears to fail if you specify a directory that already exists). Is there a isExists flag or something of that ilk that I can use here? Or something else I can use to detect existing ...

Beginning Hibernate 3.5 - Problems with ant task

I'm trying to work through "Beginning Hibernate 3.5", and I've hit an initial snag. When I run ant exportDDL, I get the following error: exportDDL: [htools] Executing Hibernate Tool with a Hibernate Annotation/EJB3 Configuration [htools] 1. task: hbm2ddl (Generates database schema) [htools] SLF4J: The requested version 1.6 by ...