ant

Ant exec refactoring

I've this code in my build.xml: <exec executable="cmd" osfamily="winnt"> <arg value="/c"/> <arg value="xsltproc\bin\xsltproc.exe"/> <arg value="--xinclude"/> <arg value="-o"/> <arg value="dist/html/main.html"/> <arg value="xsl/html/docbook.xsl"/> <arg value="xml/main.xml"/> ...

Is there a simple preprocessor/code-generator like GNU M4 that can be called from Ant?

I need to maintain some old XSL code and I've discovered that there's a lot of duplication in the XSL files. It looks like there isn't an easy include/import function for XSL which would allow me to move the code to a different file and just include it when needed. This sounds like it could be done with Model Driven Development tools b...

Can I use the maven ant tasks with a custom maven repository?

I need to specify a certain directory which the maven ant tasks should use as repository. maven.repo.local doesn't seem to work with that. Any other ideas? ...

Java equivalent of fork in Java task of Ant?

Ant Java task provides fork parameter, which, by definition "if enabled triggers the class execution in another VM". As we are dealing with a large amount of data, setting this parameter saved us from running out of Java heap space. We want to be able to do the same through a Java class. What would be the best way to achieve the function...

Generate manifest class-path from <classpath> in ant

In the build file below, the jar target refers to the jar.class.path property for the manifest class-path. The compile target refers to project.class.path There is redundancy here, because jar.class.path and project.class.path are very similar. They must be both updated when libraries are added, which can be a pain if the list of libra...

Oracle compile view sql

As part of our ANT based deploys we run some sql against an Oracle database. The deploys are set to fail if any sql errors occur. (We do this using WHENEVER SQLERROR EXIT FAILURE ROLLBACK in our SQL files and using the ant exec command with failonerror=true to run the sql). We would like to add to our deploy sql files some sql that ...

What's the difference between @ and $ in accessing ant properties?

What's the difference between @{property} and ${property} in accessing ant properties? Didn't see any documentation about it in Ant manual. ...

JUnit's MaxCore from ant

Is there a way to use JUnit 4.6's new MaxCore runner from the ant task? ...

Using ANT to generate a .jar in a very large project

Hi, I have a large project I'm working on (using Eclipse) that uses the 1.5 update 18 JDK, various external JARs, and the like. It's all been setup properly in Eclipse. Is it possible to create an Ant file that generates a JAR from a particular source file in my project? (A number of the source files are compilable into Java Applications...

Help with automating large project compiling.

Hi, I'm working on an automation project for my employer. We have a pool for each revision of our source code. When you download a revision, you need to create a directory structure with a bunch of third party includes to eventually build the project. I've automated this entire process up to the point of having my script (.bat) compile e...

Ant loadproperties failed (bcel error?)

I'm working on a simple build script that should get some constants from a java class file and use them as the version numbers in my file names. I use Eclipse and its own Ant, but put bcel-5.2.jar in my libs folder and into the classpath for the Ant call. <target name="generate_version" depends="compile"> <loadproperties srcfile="${dir...

Dependency problems with my ANT script

I'm having problems building my project, using an Ant script, from the command prompt using Ant itself. It can't find a certain import for a particular Java file in my project (which has nearly 5,000 source files as it is). The import is included in a .jar package whose location I have set in the Ant file itself. Oddly enough, I can buil...

Problem with dependencies using Ant from the shell.

I'm having problems building my project, using an Ant script, from the command prompt using Ant itself. It can't find a certain import for a particular Java file in my project (which has nearly 5,000 source files as it is). The import is included in a .jar package whose location I have set in the Ant file itself. (As a pathelement, along...

Strange/simple batch question regarding Java/Ant

For my company, I'm making a batch script to go through and compile the latest revisions of code for our current project. I'm using Ant to build the class files, but encountered a strange error. One of the source files imports .* from a directory, where there are no files (only folders), and in fact, the folders needed are imported right...

Are there any good Maven ant tasks documentation/tutorials?

I would like to try using maven from ant (for exaple to build my Java SE apps that needs all dependencies stored in ./lib/*, or just because doing anything short of dependency management in maven is too damn hard ;)). But the documentation is nonexistent, and google also didn't give me a clue on how to use them. So any good docs/tutori...

Are There Any Best Practices for Writing Custom NAnt, Ant, or MSBuild tasks?

I'm in the process of writing a custom task for NAnt. I've been basing how I write the code based on some examples I've found on the Internet and by looking at the source of some other tasks for both NAnt and Ant. With that being said, are there any guidelines or best practices for writing good tasks for build managers like NAnt, Ant, ...

Setting Midlet Icon using J2ME-Polish

I'm using J2ME Polish version 2.0.7 together with ant to build my Midlet application. In order to specifcy the main-class, name and icon of the application, the J2ME Polish documentation suggests that I use the midlet element inside the build element. <build usePolishGui="false" > <midlet name="My Killer App." icon="/logo.png" clas...

use svnant without a username or password

I have checked out code using command-line SVN. I have an Ant build script that I want to run that will do a commit when its done. I'd like to use svnant, such as <svn svnkit="false" javahl="false" failonerror="true"> <commit dir="${dir}" message="${message}"/> </svn> but its not working and giving this error [svn] <Commit> st...

is it possible to use ant to detect browser type and application version from a webpage?

I'm trying to use it for my cruisecontrol report so it will show the browser type and the version of my webapp, which can be found on the initial page ...

Emma doesn't embed source code to html report

Hello, I have a problem with Ant and Emma a code coverage plugin, it makes report, but without source code. I got following code in my build.xml init emma <taskdef resource="emma_ant.properties" /> <path id="run.classpath"> <pathelement location="${instr}" /> <path refid="build.classpath"/> <pat...