ant

Including hibernate jar dependencies in ant build

Hi, I'm trying to compile a runnable jar-file for a project that makes use of hibernate. I'm trying to construct an ant build.xml file to streamline my build process, but I'm having troubles with the inclusion of the hibernate3.jar inside the final jar-file. If I run the ant script I manage to include all my library jars, and they are ...

Eclipse ant build gives "Another singleton version selected", how can I stop that?

We run org.eclipse.ant.core.antRunner to build our plugins and RCP projects. In the build logs we get a ton of messages like: [eclipse.buildScript] Bundle org.eclipse.X: [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.X_1.0.4.v20081112-1019 The reason is clear; There are two different versions of a pa...

Ant task does not return properly if slept longer than 9 seconds executing from jruby.

So here is a strange error/bug/idk ... I'm running jruby 1.4 with ant 1.8 ... from within jruby I execute an ant task with system(command_to_execute_ant_script) and everything works as expected ... however if the ant should sleep for longer than 9 seconds the script does not return EVER from within jruby. If the script sleeps for ex...

How to get more details of a java compilation

Hi, We are using an ant script in order to build our application. I recently made a change in one jar required by our app. However, when running the ant script, the compilation fails and the error message shown let me think that the compiler is using a previous version of the jar. Also, compilation throug my IDE works fine. Manual comp...

How do I build a WAS 6.1 specific EAR without RSA/RAD?

Are there some IBM ant tasks that support this? ...

Inconsistent NoClassDefFoundError in subant java task

My ant build script starts with a java task that uses fork=true <java fork="true" classname="org.apache.tools.ant.launch.Launcher" jvm="${java.home}/bin/java" classpathref="class.path"> <arg value="-f" /> <arg value="${ant.file}" /> <arg value="generate" /> </java> The <arg value="generate" /> points to another task in the...

Ant get task - save file as its given name

I am using Ant's "get" task to save a file to disk. I am not very familiar with Ant and can't figure out how to strip the filename from the source url to use as the file's destination. Example: <property name="srcUrl" value="http://localhost/foo/bar.html" /> <property name="destLocation" value="" /> .... <!-- now, dynamically grab "bar...

Building Android app from ant via Hudson - chicken and egg problem

When using an Android-generated ant build file, the file references your SDK installation via an sdk.dir property inside the local.properties files which is generated by "android update project -p .". The comments in build.xml suggest that local.properties should NOT be checked into version control. BUT, when you run your build from Hu...

StripLineBreak parameters in ANT

I'm using ant 1.6.2... I want to supply parameters to StripLineBreaks (essentially, I want to remove any \r in the text, but not \n. So, I have tried (in the build.xml file) <copy file="a" todir="/tmp/work> <filterchain> <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks> <param name="linebreaks" va...

How to let idlj compile idl files in ant

Hi, I've no idea how to compile my idl files with the sun-idl compiler (idlj) with the help of ant? Does anyone have an idea? ...

Create cross platform Java SWT Application

I have written a Java GUI using SWT. I package the application using an ANT script (fragment below). <jar destfile="./build/jars/swtgui.jar" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="org.swtgui.MainGui" /> <attribute name="Class-Path" value="." /> </manifest> <fileset dir="./build/c...

Ant path/pathelement not expanding properties correctly

My property gwt.sdk expands just fine everywhere else, but not inside a path/pathelement: <target name="setup.gwtenv"> <property environment="env"/> <condition property="gwt.sdk" value="${env.GWT_SDK}"> <isset property="env.GWT_SDK" /> </condition> <property name="gwt.sdk" value="/usr/local/gwt" /> <!-- Default value. --> <...

Eclipse Ant Builder problem

I made a custom ant script to automatically create a jar file each time I do a build. This is how it looks like: <?xml version="1.0" encoding="UTF-8"?> <project name="TestProj" basedir="." default="jar"> <property name="dist" value="dist" /> <property name="build" value="bin/test/testproj" /> <target name="jar"> <jar destf...

In Ant, are a target's tasks guaranteed to be executed in order?

In ant, within a target are the tasks guaranteed to be executed in order or do I need to set up a (annoyingly long, thin) dependency chain? I couldn't find the answer in the manual or Google, but I may have just missed it. Much thanks. ...

How do I create an ant builder file (build.xml) for an existing Java project?

Hi all, I am working on an Java assignment for a software design course in my university. It's not really complicated and it includes some classes, interfaces and jUnit test cases. We we're now told we should supply a build.xml file as an input for an ant builder. I have never heard of or used ant before. I also saw Eclipse supports it...

Beanshell in Ant yielding, "Unable to create javax script engine for beanshell"

Greeting, I'm trying to put some Beanshell script in my Ant build.xml file. I've followed the Ant manual as well as I can but I keep getting "Unable to create javax script engine for beanshell" when I run Ant. Here is the test target I wrote mostly from examples in the Ant manual: <target name="test-target"> <script language="bean...

Property set to false, but target still executed

Here's a simple Ant build file: <?xml version="1.0" encoding="UTF-8"?> <project name="Project" default="build" basedir="."> <property name="compressAssets" value="false"/> <target name="build" depends="compress-assets"/> <target name="compress-assets" if="compressAssets"> <echo message="executed"/> </target> </p...

Is there a way with Apache Ant to update a jar file after it's been built?

Is there a way to update a jar file in Ant? EDIT: For example, if I wanted to add some additional files to an already existing JAR file? ...

How do I add the j2ee.jar to a Java2WSDL ant script programmatically?

I am using IBM's Rational Application Developer. I have an ant script that contains the Java2WSDL task. When I run it via IBM, it gives compiler errors unless I include the j2ee.jar file in the classpath via the run tool (it does not pick up the jar files in the classpath in the script). However, I need to be able to call this script pro...

Why doesn't ${locale} resolve in my <compc> Ant task?

I've seen a number of examples, e.g. here, where people are including locale resource bundles by referencing the locale attribute in the element. For some reason this doesn't work for me. Here's what I have for the task: <compc output="${deploy.dir}/myfrmwrk.swc" locale="en_US"> <source-path path-element="${basedir}/src/main/fle...