ant

Deploy java (command line) app using Netbeans / ant

I've finally managed to create a Netbeans project out of an old standalone (not Web-) Java application which consisted only out of single .java sources. Now I have basically two questions regarding Netbeans Subversion interaction and application deployment: Do you check in all the Netbeans project files into the repository, normally? I...

Pass a command line argument to Ant in Hudson

I'm trying to pass a -lib argument to ant as part of an automated build using Hudson but can't see a way to do this. I could add the relevant libraries to the ant/lib folder but that would then mean the same version of the library necessarily being shared by all builds on that machine. Any help much appreciated. ...

How to distribute each element of a list to argument of a task Ant ?

How to take the values of argument for a defined task into a list (of values) without to have to rewrite the task for each value of argument ? Example: I want to avoid to have to rewrite three time the same task for echoing three different values (value 1, value 2, value 3): <exec executable="cmd"> <arg value="/c"/> <arg value="value...

Some examples of Jersey use in Ant scripts?

I am very new to the Jersey framework, and most of what I am seeing on their documentation uses Maven tasks (which I don't have the time to get a degree in). Where can I find--outside of the Jersey documentation, if possible--some real-world examples using Jersey with Ant scripts? I've used NetBeans for making some examples, but I real...

How to replace tree calls to a macrodef by only one ?

How to replace tree calls to "myMacro": <myMacro value="value 1"/> <myMacro value="value 2"/> <myMacro value="value 3"/> By only one call who would use a list of three elements: value 1, value 2, value 3 ...

unix2dos (or dos2unix) in ant

How do I do unix2dos (or dos2unix) with ant. I.e. I want to change the newlines from linux newlines (if any) to dos newlines ...

Cruise Control losing track of paths in subtasks

We have some projects in cruise control, set up roughly like this: Cruise Control <ant antfile="build.xml" dir="A" target="compile" inheritAll="false" /> in A the compile target calls, as a part of its compile, a jar target in B (in "compile") <ant antfile="${B.dir}/build.xml" inheritAll="false" target="jar" /> <javac ... >...

Setting JAVA_HOME when running Ant from Java

The reason is long and boring, but I need to run an Ant script to compile Java 1.5 code from a Java 1.4 app. I keep getting this error, though: BUILD FAILED build.xml:16: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\j2sdk1.4.2...

Can someone explain the ivy.xml dependency's conf attribute?

I can't find any thorough explanation of the ivy dependency tag's conf attribute: <dependency org="hibernate" name="hibernate" rev="3.1.3" conf="runtime, standalone -> runtime(*)"/> See that conf attribute? I can't find any explanation (that I can understand) about the right hand side of the -> symbol. PLEASE keep in mind I don't k...

How to install ant contrib under Windows ?

Prelude: Ant-Contrib provides a very well explained wiki page for installation and launch ([http://ant-contrib.sourceforge.net/#install][1]). Indeed, only two steps is necessary: - build ant-contrib-0.3.jar (by ant dist...), - move the built .jat into the lib directory of your Ant installation, Use it by writing in your own project: ...

How to find a JNDI resource inside the hibernatetool Ant task

I want to generate my database schema with Ant. I am using hbm2ddl task. I am using Hibernate with JNDI. My hibernate.cfg.xml looks like: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; <hibernate-config...

Resources for setting up Flex projects with Hudson

I'm looking into setting up a CI environment for our flex projects. I have very little experience in setting up an environment like this, but have read a lot about it and think we could benefit a lot from this in our projects. I do have experience with ANT and we're currently using it for our building. I've been looking at Hudson for a w...

Ant Flex problem

My Cairngorm program does some preliminary authentication against a RemoteObject before allowing Cairngorm's ServiceLocator to start using the same RemoteObject to get business data. Everything works fine with Flex Builder, but I need an Ant build. The Ant mxmlc task compiles everything ok, but at runtime the resulting code fails at th...

use eclipse classpath in ant tasks

Hi there, I want to use Ant to deliver a JAR file, how can I use the Eclipse classpath in my Ant task? Greets, Tobias ...

ant iterate over files

I want to iterate over a list of jars (undefined number) and add them all to the jar file. To add them I plan to use something like this: <jar id="files" jarfile="all.jar"> <zipfileset src="first.jar" includes="**/*.java **/*.class"/> <zipfileset src="second.jar" includes="**/*.java **/*.class"/> </jar> but how do I iterate over...

Capturing ant <javadoc> task output [solved]

Is it possible to capture the warnings that Javadoc prints when run via the ant task? I don't see an output attribute such as the one in the task. There seem to be warnings that Checkstyle just isn't catching and it'd be nice to snag that output in a file. Seems strange this wouldn't be capturable, hopefully I'm missing something ob...

How to inline few java lines inside an Ant script?

How to inline (here-document) few java code lines into a Ant script ? Please an example ? ...

How to reach the information contained in the following tags fileset ?

How to reach the informations contained in the following tags "fileset" ? In fact, I am looking to use the Ant instruction "copy" on the following refid "files.to.copy": <publication> <TARGET_ONE> <path id="files.to.copy"> <fileset dir="lib"> <filename name="idl.zip"/> <filename name="AEX_IDXClient.jar"/> ...

Why does ant think I have an old version of Java?

I am trying to build Groovy from source (on RH Linux) using ant, but for some reason it thinks that my Java version is 1.4, and not 1.6, and thus it won't compile. The offending lines seem to be <condition property="groovy.build.vm5"> <not> <contains string="${ant.java.version}" substring="1.4"/> </not> </condition> i...

Problems compiling Groovy from source

I am trying to compile the latest Groovy distribution from source, using ant 1.7.1. The process runs along smoothly until "-createEmbeddableJar:", under which it fails saying BUILD FAILED myHomeDir/groovy-src-1.6.0/groovy-1.6.0/build.xml:582: The <unwar> type doesn't support the nested "globmapper" element. Build xml from line ...