ant

Is there a customizable class loading order using ant junit task?

Hello, in our web-app project, we include some jar files. For patching some issues of one of the classes in a jar file, we changed the implemention of this class in a patches source folder. Since there is a defined class loading order in tomcat (WEB-INF/classes before WEB-INF/lib), the patched version of the class is loaded by tomcat, ...

How do I dump a MySQL database using ant?

I couldn't find any information about how to dump a MySQL database with an ant task. Do I have to create my own task to do this? ANT script ===generate==> myDataBase.sql ...

Finding source paths using FindBugs ant task

I'm trying to get the FindBugs ant task to include source info in the generated report. <findbugs home="${findbugs.home}" output="xml" outputFile="${basedir}/findbugs/findbugs-${package.basename}.xml" excludeFilter="${basedir}/findbugsExclude.xml" jvmargs="-Xmx1048m"> <sourcePath path="${package.srcdir}" /> <class location="${packa...

Is there a way I can use Maven repositories to add dependencies to Ant?

I was wondering if anybody has seen a technique for adding Maven dependencies to Ant. I thought that Ivy was meant to do this but then I realized that it is only an Ant-style tool for dependency management. It seems to me that if somebody extended Ant to be able to reference Maven dependencies (perhaps only for open source libraries) A...

Does it matter that there are 0-byte resources in my compiled SWC?

I have a Flex 3 SWC file compiled using the compc Ant task. It looks very similar to the one generated by the Eclipse export release build command, but there are some 0-byte files in the mx packages that unnerve me: Archive: flex/package/bin/package.swc Length Date Time Name -------- ---- ---- ---- 0 10-16...

incompatible types found: required: default enums in annotations

[javac] C:\ws\galileo\test\Cacheable.java:13: incompatible types [javac] found : com.io.CacheType [javac] required: com.io.CacheType [javac] public CacheType id() default CacheType.COMMON; I really don't get this one. I have a project where I'm custom building a caching interceptor for Spring. It simply is a look by cache name to p...

Where to find simple skeleton for ejb 2.x project with ant build file?

Where to find it? ...

How can I get the value of the current target ant?

How can I get the value of the current target ant? Does it exist a spacial variable something called TARGET? ...

In Ant, can I use a property inside a target's "depends"?

I m trying to do this with Ant: <property name="test" value="123"/> <target name="helloworld" depends="${test}"/> But I'm getting error "Target ${test} does not exist in this project." So I m guessing I can do this? ...

Build numbers: major.minor.revision

How would you write a build.xml file, using neither custom code nor external dependencies (such as a shell script), that: Generates a build number of the form major.minor.revision (e.g., 01.02.34). Auto-increments the revision on each compile of the source code. Auto-increments the minor version on each execution of a dist(ribution) ta...

Ant, (over)write into a file

How to write (or overwrite) the following contents: <dependencies> <dependency> <groupId>ged.eprom</groupId> <artifactId>epromx</artifactId> <version>${version.to.set}</version> <classifier>stubjava</classifier> </dependency> </dependencies> into file called pom.xml in the current directory. I have tried...

How to include file in Jar through Ant at specific location

Hi, I've got an ant jar task: <target name="jar"> <jar destfile="${generated.jars.dir}/hello-${environment}.jar"> <fileset dir="${generated.classes.dir}"/> <fileset dir="${environment.dir}/${environment}" includes="config.xml"/> </jar> </target> How can I force the config.xml file to be pushed to a specific director...

How can I replicate the functionality of the Flash Builder's release tool in ant?

I want to build an ant script that does exactly the same compilation actions on a Flash Builder 4 (Gumbo) project as the Project->Export Release Build... menu item does. My ant-fu is reasonably strong, that's not the issue, but rather I'm not sure exactly what that entry is doing. Some details: I'll be using the 3.x SDK (say, 3.2 for...

How to commit a file in SVN through Ant

Using the SVN task from tigris I can't seem to find a way to just commit one file. Is there any way to do this without first having to checkout the folder in SVN? ...

Android ant script workaround?

It appears that, in the transition between the Android 1.1 sdk and 1.5, Google radically changed how ant scripts using AAPT can build Android projects. Previously they support args allowing developers to specify source, res, asset, and a manifest for a particular build. Now, they seem to allow developers to specify only a single folder ...

Does JUnit4 testclasses require a public no arg constructor?

I have a test class, written in JUnit4 syntax, that can be run in eclipse with the "run as junit test" option without failing. When I run the same test via an ant target I get this error: java.lang.Exception: Test class should have public zero-argument constructor at org.junit.internal.runners.MethodValidator.validateNoArgConstructor(Me...

Passing ant command line options to an exec'd ant process?

I'm using ant to build a mixture of Java and C++ (JNI) code that makes up a client project here. I've recently switched the C++ part of the build to using ant with cpptasks to build the C++ code instead of having ant invoke the various versions of Visual Studio that are necessary to build the code. In order to get this to work, it is ne...

Ant commands to print fileset into a file, one match per line

I have a populated fileset and I need to print the matching filenames into a text file. I tried this: <fileset id="myfileset" dir="../sounds"> <include name="*.wav" /> <include name="*.ogg" /> </fileset> <property name="sounds" refid="myfileset" /> <echo file="sounds.txt">${sounds}</echo> which prints all the files on a sing...

How to wrap an Ant build with Maven?

We use maven for our large-ish product. All of our artifacts are deployed to a shared archiva repository using the maven deploy goal. I am now integrating a third party product that has an ant build. I know how to call ant targets from maven using the antrun plugin, but I'm not sure how to setup the pom in this instance. I don't want...

Why does ant.bat not return an error status when run programmatically?

When I run ant from the command-line, if I get a failure, I get a non-zero exit status ($? on UNIX, %ERRORLEVEL% on Windows). But we have a Java program which is running ant (through ProcessBuilder), and when ant fails, on Windows we cannot get the exit status. I just verified this with this simple ant test file: <project name="x" def...