ant

How much of the Web build process do you/should you automate?

And what is your system of choice? Off the top of my head I would say that for a real one step web 'build' the following steps would have take place: Take a source snapshot Change any config files for release Compress CSS and JS Run Tests Take a database snapshot [without test data] Move the source to the server Import a clean, curren...

Can someone give me a working example of a build.xml for an EAR that deploys in WebSphere 6

I'm trying to convince my providers to use ANT instead of Rational Application Development so anyone can recompile, recheck, redeploy the solution anyplace, anytime, anyhow. :P I started a build.xml for a project that generates a JAR file but stopped there and I need real examples to compare notes. My good friends! I don't have anyone c...

Ant build scripts, antcall, dependencies, etc

I have a build script and as part of that script it copies a jar file to a directory, for ease lets call it the utils jar. the utils jar is built by another build script sitting in another directory. What im trying to do have my build script run the utils build script so that I can ensure the utils jar is up to date. So I know I need ...

JNI and Java: ant calling make or make calling ant?

I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed. Being new to JNI I've managed to find much documentation on the interface side of...

Ant's <javac> tasks throws StackOverflowException

I'm trying to compile over 100 java classes from different packages from a clean directory (no incremental compiles) using the following ant tasks: <target name="-main-src-depend"> <depend srcdir="${src.dir}" destdir="${bin.dir}" cache="${cache.dir}" closure="true"/> </target> <target name="compile" depends="-main-src-depe...

Where do I get the Antlr Ant task?

I'm trying to call an Antlr task in my Ant build.xml as follows: <path id="classpath.build"> <fileset dir="${dir.lib.build}" includes="**/*.jar" /> </path> ... <target name="generate-lexer" depends="init"> <antlr target="${file.antlr.lexer}"> <classpath refid="classpath.build"/> </antlr> </target> But Ant can't find the ta...

Best Apache Ant Template

Every time I create a new project I copy the last project's ant file to the new one and make the appropriate changes (trying at the same time to make it more flexible for the next project). But since I didn't really thought about it at the beginning, the file started to look really ugly. Do you have an Ant template that can be easily po...

Recommend a build tool for a large legacy Java project.

I am the build manager on a large legacy Java project. It currently uses a combination of ant and nested shell scripts to do building, testing, and packaging. It is fragile and complex and old. We'd like to replace it with a fresh set of scripts and are considering alternatives to ant. Maven 2 sounds interesting. We like the dependency...

Why am I getting a ClassCastException when generating javadocs?

I'm using ant to generate javadocs, but get this exception over and over - why? I'm using JDK version 1.6.0_06. [javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc [javadoc] at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java...

Is there a way to generalize an Apache ANT target?

We have an Apache ANT script to build our application, then check in the resulting JAR file into version control (VSS in this case). However, now we have a change that requires us to build 2 JAR files for this project, then check both into VSS. The current target that checks the original JAR file into VSS discovers the name of the JAR ...

How do I get javadoc to link to the Java API using an Ant task?

Right now my ant task looks like. <javadoc sourcepath="${source}" destdir="${doc}"> <link href="http://java.sun.com/j2se/1.5.0/docs/api/" /> </javadoc> And I'm getting this warning: javadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api/package-list How do I get the javadoc to properly link to the API? ...

How do I generate Emma code coverage reports using Ant?

How do I setup an Ant task to generate Emma code coverage reports? ...

ant build.xml windows white space in path

I'm using Windows and I'm trying to get ANT to work. When I do an ant build from the command line, I get: C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found. I look into the build.xml file and I find: appserver.home=${user.home}/apache-tomcat-6.0.14 (which I just copied and pasted straight from a tutorial) I changed it to: appserve...

Is there a simpler way to deploy to WebSphere?

I have seen this question about deploying to WebSphere using the WAS ant tasks. Is there a simpler way to do this? In the past I have deployed to Tomcat by dropping a war file into a directory. I was hoping there would be a similar mechanism for WebSphere that doesn't involve calling the IBM libraries or rely on RAD to be installed on...

How do I use Nant/Ant naming patterns?

I have to admit that I always forgot the syntactical intracacies of the naming patterns for Nant (eg. those used in filesets). The double asterisk/single asterisk stuff seems to be very forgettable in my mind. Can someone provide a definitive guide to the naming patterns? ...

Worth migrating to Rake?

Is it really advantageous to move to Rake from ant? Anyone migrated from ant and find something monumental? FYI: Current environment is Ant for J2ME builds ...

How to compile a java application which uses Google webdriver from comand line without ant

Hi, I want to compile an example code which using google`s webdriver. I saved webdriver into /home/iyo/webdriver. My code is: package com.googlecode.webdriver.example; import com.googlecode.webdriver.By; import com.googlecode.webdriver.WebDriver; import com.googlecode.webdriver.WebElement; import com.googlecode.webdriver.htmlun...

Ant is not able to delete some files on windows

I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually it works just fine. The files are apparently not open by an...

Compiling mxml files with ant and flex sdk

I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script. ...

Maven or Ant?

Back up your claim with some actual benefits. ...