ant

Problems with FileSet in Ant script?

Hi, I am using Ant script to generate javadoc and I just only wnt Ant to look for some classes based on a certain pattern, so I wrote: <javadoc access="public" source="1.6" sourcepath="src" destdir="dest" > <fileset dir="src" casesensitive="yes" defaultexcludes="yes"> <filename name="**/ABC*.java"/> </fileset> </javadoc> ...

Nant equivalent of the Ant Replace task

Looking for the equivalent of Ant Replace task in Nant ...

Check if a package exist in ANT script?

I am writing Ant script to generate javadoc for my program. the ant script as: <javadoc access="public" source="1.6" sourcepath="${basedir}/../${current.project}/src" destdir="${basedir}/dist/doc/${current.project}" packagenames="${current.project}" /> But I got trouble if the ${current.project} (packagenames="${cu...

Exclude a particular method of a class from java compilation

Hi, I want to exclude a particular method of a class from java compilation. For eg: class Test { public void printdouble(){} public void printint(){} } Depending upon some properties, I want to exclude printdouble method during compilation. NOTE: I'm using ant script for java compilation Thanks in Advance Soman ...

With Maven2, how would I zip a directory in my resources?

I'm trying to upgrade my project from using Maven 1 to Maven 2, but I'm having a problem with one of the goals. I have the following Maven 1 goal in my maven.xml file: <goal name="jar:init"> <ant:delete file="${basedir}/src/installpack.zip"/> <ant:zip destfile="${basedir}/src/installpack.zip" basedir="${basedir}/src...

Ant fails without message at javac

I've written an Ant build.xml file which obtains a number of source files via WSDL and compiles them. These have been working on an old, now destroyed (and therefore unavailable for comparison), system but the build process isn't completing on this newer, faster system. The relevant section of the build file looks like this (updated): ...

With Maven, how would I prevent Maven from filtering certain properties but allowing others?

The problem is that I'm trying to build a project that has in its resources a build.xml file. Basically, I package my project as a jar with Maven2, and then use ant installer to install my project. There is a property in the build.xml file that I need to filter called build.date, but there are other properties that I don't want to filte...

ant ftp doesn't download files in subdirectories

Hello, I'm trying to download files in subdirectories from an ftp server with ant. The exact set of files is known. Some of them are in subdirectories. Ant only seems to download the ones in the root directory. It does work if I download all files without listing them. The first ftp action should do the exact same thing as the second. ...

Previous version of ant manual

Ugh, I can't believe I have to ask this, but where can I find previous versions of the ant manual (http://ant.apache.org/manual/index.html)? That page says, "Please use the documentation appropriate to your current version" but I can't find anything other than the current version (1.8.0) on the Web site - I had to resort to using archiv...

Docbook+Ant: Could not find variable with the name of fop.extensions

After a lot of spent time trying to get my article to compile in Ant with Docbook, I can't seem to make FO compilation work. I'm using Xalan 2.7.0, and everything else (both single-page and chunked HTML) compiles perfectly. It's only when I try to compile to FO that I get this error: Fatal Error! org.apache.xml.utils.WrappedRuntimeExce...

Junit Ant Task, output stack trace

I have a number of tests failing in the following JUnit Task. <target name="test-main" depends="build.modules" description="Main Integration/Unit tests"> <junit fork="yes" description="Main Integration/Unit Tests" showoutput="true" printsummary="true" outputtoformatte...

Create a new output file in ant replace task

Ant replace task does a in-place replacement without creating a new file. The below snippet replaces tokens in any of the *.xml files with the corresponding values from my.properties file. <replace dir="${projects.prj.dir}/config" replacefilterfile="${projects.prj.dir}/my.properties" includes="*.xml" summary="true"/'> I want those ...

How to jar java source files from different (sub-)directories?

Consider the following directory structure: ./source/com/mypackage/../A.java ./extensions/extension1/source/com/mypackage/../T.java ./extensions/extension2/source/com/mypackage/../U.java ... ./extensions/extensionN/source/com/mypackage/../Z.java I want to produce a source jar with the following contents: com/mypackage/../A.java com/m...

unable to parse the schema.

I am using Jboss and ant to compile my XSD's. But while running the and build script am getting the error msg like unable to parse the schema. Error message is provided. In line <property environment="env" /> <property name="build.server" value="cluster"/> <property name="xsd.build" value="${basedir}/build"/> <property name="gens...

How to perform ant path mapping in war task?

I have several JAR file pattern sets, like <patternset id="common.jars"> <include name="external/castor-1.1.jar" /> <include name="external/commons-logging-1.2.6.jar" /> <include name="external/itext-2.0.4.jar" /> ... </patternset> I also have a war task containing a lib element: <lib dir="${src.dir}/jars"> <patt...

How to log the output from cmd tree command using Apache Ant exec task?

Hi, I am trying to log the output from cmd tree command using ant with the following: <exec dir="${basedir}" executable="cmd" output="output.txt"> <arg value="tree" /> </exec> However, I am seeing the following in the "output.txt": Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp...

Yet another Ant + JUnit classpath problem

Hi, I'm developing an Eclipse SWT application using Eclipse. There are also some JUnit 4 tests, which test some DAO's. But when I try to run the tests via an ant build, all of the tests fail, because the test classes aren't found. Google brought up about a million of people who all have the same problem, but none of their solutions see...

How can I setup ANT with Subversion and ColdFusion Builder (eclipse) to check out a local build to work on?

I am not sure if there's an answer for this already -- couldn't find one for this (hopefully common) setup: I recently converted one of my ColdFusion projects to deploy via ANT. I have a local ant script that instructs a remote server to check out the code, and run the application's specific build file, remotely on the server. I hav...

Can I run perl unit tests under ant jUnit task? How can I handle perl unit tests errors within ant build script?

I'd like to deploy my set of perl scripts by ant. I'm going to run perl test scripts in the ant build.xml and I want to handle perl errors. That's why I wonder, how does ant task work? Does junit parse output of tests? In this case I can transform TAP output within TAP::Formatter::JUnit CPAN module. http://search.cpan.org/dist/TA...

How to do parrallel processing in Unix Shell script?

I have a shell script that transfers a build.xml file to a remote unix machine (devrsp02) and executes the ANT task wldeploy on that machine (devrsp02). Now, this wldeploy task takes around 15 minutes to complete and while this is running, the last line at the unix console is - "task {some digit} initialized". Once this task is co...