I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it.
I just want to know the proper way to add versioning to my Java app so that I can access the version information when I'm testing, e.g. debugging in Eclipse and runn...
I have an Ant script that performs a copy operation using the copy task. It was written for Windows and has a hardcoded C:\ path as the todir argument. I see the exec task has an OS argument, is there a similar way to branch a copy based on OS?
...
I have updated my ant build.xml file to include a new file and a new folder. After creating the .jar I check if they exist in the jar by 'unzip\extract', and they are there.
But when executing the .jar neither the folder or the file gets extracted.
Am I missing a step?
...
Using eclipse 3.3.2 with MyEclipse installed. For some reason if a file isn't called build.xml then it isnt' recognised as an ant file. The file association for *.xml includes ant and says "locked by 'Ant Buildfile' content type.
The run-as menu is broken. Even if the editor association works run-as doesn't.
The ant buildfiles in quest...
I'm trying to incorporate some JavaScript unit testing into my automated build process. Currently JSUnit works well with JUnit, but it seems to be abandonware and lacks good support for AJAX, debugging, and timeouts.
Has anyone had any luck automating (with ANT) a unit testing library such as YUI test, JQuery's QUnit, or jQUnit (http...
I am running my junit tests via ant and they are running substantially slower than via the IDE. My ant call is:
<junit fork="yes" forkmode="once" printsummary="off">
<classpath refid="test.classpath"/>
<formatter type="brief" usefile="false"/>
<batchtest todir="${test.results.dir}/xml">
<formatter...
I'm trying to define a task that emits (using echo) a message when a target completes execution, regardless of whether that target was successful or not. Specifically, the target executes a task to run some unit tests, and I want to emit a message indicating where the results are available:
<target name="mytarget">
<testng outputDir...
I need to increment a number in a source file from an ant build script. I can use the ReplaceRegExp task to find the number I want to increment, but how do I then increment that number within the replace attribute?
Heres what I've got so far:
<replaceregexp file="${basedir}/src/path/to/MyFile.java"
match="MY_PROPERTY = ([0-9]{1,});...
When I use the task, the property is only set to TRUE if the resource (say file) is available. If not, the property is undefined.
When I print the value of the property, it gives true if the resource was available, but otherwise just prints the property name.
Is there a way to set the property to some value if the resource is not avai...
Hi I am trying to deploy an application using webstart. I have a requirement to update a jar which is signed before i actually deploy( basically to update the IP/Port info). I am trying to use ANT to update the jar. Is there are way to achive this?
Thanks in advance for any help/suggestions
...
Is there a NAnt task that will echo out all property names and values that are currently set during a build? Something equivalent to ant's echoproperties task maybe.
...
We have a large codebase that takes approx 12 minutes on the developer machines to auto-generate some Java 5 classes using JavaCC and then compiles all the classes as well as running the units test.
The project consists of multiple projects which can be built in groups, but we are aiming for a full a build in under 10 minutes
What tips...
I have the problem that an specific step in Ant can only be executed when we have Java 1.5 installed in the build computer. The task definition uses uses a jar file that was compiled using 1.5, so running with a 1.4 virtual machine will throw an IncompatibleClassVersion exception.
I have to find a solution meanwhile to have this task ...
I'm using Eclipse's AntRunner to build a set of plugins, but I'm having trouble in configuring the logging behavior. Specifically, I'd like AntRunner not to display empty tasks. Anybody knows how to do this?
...
What i mean exactly is that build.xml that actually included those plugins like findbugs etc. Or nicely done build.xml
...
I want to delete all directories and subdirectories under a root directory that are contain "tmp" in their names. This should include any .svn files too. My first guess is to use
<delete>
<dirset dir="${root}">
<include name="**/*tmp*" />
</dirset>
</delete>
This does not seem to work as you can't nest a dirset in a...
Ant has a nice way to select groups of files, most handily using ** to indicate a directory tree. E.g.
**/CVS/* # All files immediately under a CVS directory.
mydir/mysubdir/** # All files recursively under mysubdir
More examples can be seen here:
http://ant.apache.org/manual/dirtasks.html
How would you implement this i...
We have the usual web.xml for our web application which includes some jsp and jsp tag files. I want to switch to using pre-compiled jsp's. I have the pre-compilation happening in the build ok, and it generates the web.xml fragment and now I want to merge the fragment into the main web.xml.
Is there an include type directive for web.xm...
I'm using Enunciate to build a prototype REST api and need to include a jar containing custom code as a library.
My Ant Script looks like this:
<!--include all jars-->
<path id="en.classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<!--define the task-->
<taskdef name="enunciate" classn...
I guess I need to know what I need in the classpath (what jar) in order to execute WebSphere 6.1 ant tasks. If someone can provide an example that would be perfect.
...