ant

How to load an optional task into ant without -lib or global installation?

I want to use the FTP task in ant, and I have found the appropriate jar files and got everything working fine. I have put the jar files in a "libs" directory alongside the other files used in the build. The only problem is that the user must run "ant -lib commons-net-ftp-2.0.jar" to make a build; I would really prefer that it were poss...

ANT & MSBUILD

When running msbuild.exe with ANT's exec task, errors in the .net code do not result in the build process failing. Does anyone have a clue? ...

Slim down and/or understand the Eclipse files in a Dynamic Web Project

The files residing in .settings in a Dynamic Web Project are: .settings/ |-- org.eclipse.jdt.core.prefs |-- org.eclipse.jst.common.project.facet.core.prefs |-- org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs |-- org.eclipse.wst.common.component |-- org.eclipse.wst.common.project.facet.core.xml |-- org.eclipse.wst.jsdt.ui.superType.co...

How can I provide a custom log4j.xml for different ant tasks?

I have a build file that as part of the build process relies on several taskdefs. These taskdef items (for example, webdoclet and jasper2) use log4j as a logger. Ideally, I'd like to be able to provide a different log4j configuration file for each, but minimally, I'd like to be able to specify which log4j configuration file is used. W...

Ant cannot find a class needed by an externally defined taskdef

I am trying to use the axis-java2wsdl ant task to create a wsdl from one of my java classes, but I cannot get the classpath correct. I am using Ubuntu's libaxis-java package which installs axis-ant.jar in $ANT_HOME/lib and axis.jar in /usr/share/java. The interesting parts of my build.xml look like this: <property name="library.dir" v...

Ivy: how do I remove transitive dependencies ?

I'm using Ivy to manage the dependencies on my project. So far, I've specified a dependency on Hibernate and servlet-api. However, the hibernate jar itself has a lot of dependencies that aren't really needed, such as jaas and jacc. This becomes a show-stopper because jaas and jaac are Sun libraries and therefore their licenses forbid t...

Javadoc only one class in a package using Ant

I am using apache ant to generate javadoc for my project. I have a number of classes in one of my packages and I only want to show one. How do I do this? Here is my current code. <javadoc sourcepath="jig-engine/src" destdir="${target.path}/docs/javadoc/" packagenames="jig.engine.util.Vector2D" > </javadoc> (simplified for ...

subant failonerror subtleties

I have ant code that kicks off a release build in all subdirectories: <target name="all-release" > <subant target="sub-release" failonerror="true"> <fileset dir="." includes="*/build.xml" /> </subant> </target> As written, if any individual build fails, all-release will fail fast (none of the later builds will su...

How to execute ANT tasks on only files that have been modified.

I have a build script that does a number of things (minimize javascript, upload to amazon s3 etc). The minimize ANT task only operates on the javascript that I have modified and ignores the rest (I didn't write this script). I would like to do something similar for the amazon s3 task where only the updated content is upload in the task. ...

Build JavaFX project without NetBeans

I'm trying to learn JavaFX and maybe create a few "learner" games. I always do my development in Eclipse, rather than NetBeans which the JavaFX team is clearly trying to push. Can anybody point me in the direction of a how-to for building a JavaFX project in Eclipse, or at least building a JavaFX project without NetBeans? Everything I'v...

dynamically concatenating xml files with ant and xslt

Question We have a large number of xml configuration files that we want merged into one master version at build time. Smaller config files are easier to maintain and one large file loads faster so I imagined this to be a popular build transformation process that I would find lots of good examples of on the net. I was able to find some...

How to execute an Ant task only when source files have been modified?

There must be an easy way to do this. I build a Flex app using ant that depends on a SWC library, which works fine except that it rebuilds the library whether it needs to or not. How do I tell ant to only run the task if any of the sources files of the library (*.as, *.mxml) are newer than the SWC? I've looked at <dependset> but it ...

ANT job to invoke JDeveloper to create EAR file with specified deploy file

I was asked about the possibility of creating an ANT script that could be use to copy property files (associated to target environment), create an EAR file (perhaps using JDeveloper deploy file), and deploy that EAR file to target OC4J container. I am asking if anyone ever successfully invoking JDeveloper automatically to create the EAR...

Netbeans, Ant and RMIC (Java RMIC Compiler) (Help with)

Hi guys, I'm rather miffed / baffled at the moment. I've got a Netbeans project, that compiles fine. I've edited the build.xml file to create a "-post-compile" target, which does an rmic ant task. So now, when I "clean and build" it compiles my main code, then generates the rmic stubs for me. However, when I chose to 'Run' my netbeans...

Clean way to combine multiple jars? Preferably using ant

I have runtime dependencies on some external jars that I would like to "rejar" into a single jar. These external dependencies are stored in a external_jars directory, and I'd like to be able to not have to list each one out (e.g., to not need to change my build scripts if my dependencies change). Any thoughts? Google gave me a good answ...

How do I copy files into an existing JAR file with Ant?

I have a project that needs to access resources within its own JAR file. When I create the JAR file for the project, I would like to copy a directory into that JAR file (I guess the ZIP equivalent would be "adding" the directory to the existing ZIP file). I only want the copy to happen after the JAR has been created (and I obviously do...

Ant task to check if a file exists?

Is there an ANT Task that would execute a block only if a given file exists? I have the problem that I have a generic ant script that should do some special processing but only if a specific configuration file is present. ...

Ant copy with different basedir

Given the directory structure: root build.xml folderA file1 file2 folderB file3 I'm trying to copy the files in folderA into folderB, when I try, it ends up putting folderA in folderB so I end up with: folderB folderA file1 file2 file3 I just want the files copied across w...

What do you use for a complex build process?

I am trying to revamp our build process, which is currently a gigantic Ant build.xml that calls into other ant build files and executes several Java classes to perform more complex logic that would be impossible/scary to attemp in Ant. Background: experience in Java and Ant, some Groovy Windows platforms Goals: run as a combinatio...

Emma doesn't provide code coverage across projects

Hi guys, I was wondering if any of you EMMA users have encountered this issue. Basically I have multiple projects each with different build.xml ANT scripts that are all called from one main ANT script individually. The code is covered appropriately but when a JUnit method calls another method in a different project, that external metho...