ant

Working with ant namespace / directory structure

I'm working with ant on linux using the command line. I've got a simple build step with javac. This compiles correctly but it creates a directory structure under build like my namespace. ie: ./build/com/crosse/samplespace/SampleProgram.class How can I get this output into one directory (where it's easier to call java on it). I tri...

Trouble making obfuscation

I'm using Antenna to build, pack and obfuscate a j2me app. Building and packing works fine. The project uses a 3rd party jar that is already obfuscated except by some interfaces. When trying to obfuscate I got several errors like: [wtkobfuscate] Warning: i: can't find referenced class fooPackage.fooClass Class i and fooPackage.fo...

Replacing build.xml with Build.java - using Java and the Ant libraries as a build system

I've grown disillusioned with Groovy based alternatives to Ant. AntBuilder doesn't work from within Eclipse, the Groovy plugin for Eclipse is disappointing, and Gradle just isn't ready yet. The Ant documentation has a section titled "Using Ant Tasks Outside of Ant" which gives a teaser for how to use the Ant libraries from Java code. ...

Compiling Java code written for 1.5 to work with 1.4 JRE?

I have a project that uses generics and a few Java 1.5/6 bits and pieces. Is it possible to compile this code to work on a system running a 1.4 JRE? I use an ANT build script and javac task to compile the library. This builds fine while the target attribute is 1.5. If I change the target to be 1.4 I get the following error: generics a...

Eclipse Java Compiler Warnings as ant task

I want the eclipse Java Compiler Warnings available as an ant task (ie without eclipse) - ideally as ant plugins - but I want the cruise control ant task to fail if an eclipse warning shows up. For the following warnings Non-static access to static member Method with a constructor name Serializable class without serialVersionUID Assign...

What could cause the error message 'Target "1" does not exist in the project "xxx".' running Ant on Windows?

I'm using ant.bat (in Ant 1.7.1) to build the all target in a build.xml file, on Windows 2003 Server. (I've substituted "xxx" in the error message for the project name in that file.) It builds successfully, but then ends with: 2009-06-10 17:26:03 | all: 2009-06-10 17:26:03 | 2009-06-10 17:26:03 | BUILD FAILED 2009-06-10 17:26:03 | Ta...

Dbunit ant task export: Exclude tables

Is it possible to say dbunit export all tables except the list (I'm using ant for the purpose)? ...

Ant copy file to leaf directory

I'm trying to use Apache Commons Configuration and using ant for my build tool. I have one namespaced class, and when ant builds it of course sub-directories. I need to put my .xml configuration file in the leaf directory (ie: ${build}/com/cross/xxx/). Is there an automated way to do this, or do I just manually configure the path of t...

How do I create a new Java project, without existing source files, with the ability to manually edit the Ant script using NetBeans

It seems like it's a fairly common thing to do. I want to create a new Java application that does not have any existing source files, but be able to edit the Ant scripts. ...

make a refresh on a eclipse project with ant

Hello, we have some ant script for building the different jar we use, in several eclipse projects. ( there is some interdependancie ) At the and of the build, we have to refesh some of the eclipse project in order to make the build path ok. ( without this, he dont see one of the just-builded jar and eclipse throws a build path error ) ...

Ant build file skeleton to turn an eclipse project into a war?

Does anyone have a skeleton build file that I can modify to war up an eclipse dynamic web project. I need to war it up and make sure that all the libraries/servlets are in the right place. ...

Apache/Tomcat and Ant verification using GnuPG

how in the heck is it possible to verify the signature of a distribution for apache Tomcat or ant? i've been using GnuPG and it doesn't seem to do the trick, despite warnings all over the apache site to verify files first. using windows...if that helps. STEPS: 1) download binary version .exe / .zip / .asc / KEYS file 2) gpg --import K...

Managing os-specific libraries with Ivy

Assuming there's a os-specific library ( .so/.dll ) attached to a Java project, what's the way of handling this using Ivy? ...

How do I make Netbeans 6.5 use my file nb-build.xml instead of build.xml ?

When I create a new project in Netbeans, it generates a build.xml file which it will use to compile and run the project, along with other stuff in folder nbproject. Now, I want to have my very own build.xml file that I will use to compile to project on the server side. Some guys have tried to use the generated build file both in Netbean...

Ant target to move directories out of another directory

What is the simplest way to move everything out of a target directory? I have this basedir/parentdir/<subdir>. I have many different <subdir>. I need to move them out into the same level as parentdir so that it becomes basedir/<subdir>. Now, each <subdir> contains a deep tree of many other subdirectories and files, including empty subdi...

How to start/stop Tomcat service remotely using ANT

Hi, I'm following this link (http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks) to try and figure out how to start/stop tomcat service remotely and currently I'm getting an error saying none of the taskdef class can be found. I already have ant installed, what else am I missing? And is the link a good way to start/stop tomcat se...

How do you speed up java unit tests?

Currently our project has over 3000 unit tests, and "ant testAll" takes well over 20 minutes. besides getting better hardware, are there ways to speed things up? ...

Why use Buildr instead of Ant or Maven?

http://buildr.apache.org/ http://ant.apache.org/ http://maven.apache.org/ What does another build tool targeted at Java really get me? Is it so hard to write a plugin using Java versus writing it in Ruby? If you use Buildr over another tool, why? Side question: How many build systems does the Apache foundation need targeted at Ja...

Access Java class public member variable from Ant and use it in a build task

My Java app displays its version number in a few places, so I store that as a public final variable in the app's main class. Is there any way to access that in my Ant build tasks? In the spirit of automating the build process, I'd like Ant to automatically name the zipped distributable with the current version number, but I'm not sure ho...

How can I remove/filter/ignore some package from Emma (code coverage)

Hi all... I`m trying to remove some package from my report and having trouble. Could some one give me some help? I'm using EMMA in my ant process. <!-- Generate the emma report both in xml and html --> <emma>   <report     sourcepath="${build.report.src}"     metrics="class:${coverage.classes.min},method:${coverage.methods.min}">  ...