ant

Ant classpath issue with / without ivy

I have an ant build.xml. I want it to be generic, in the sense that it should not be dependent on ivy with respect to setting the classpath. This is one of my targets in my build.xml <path id="classpath"> <fileset dir="${lib-dir}"> <include name="**/*.jar" /> </fileset> </path> <target name="compile-test-classes" depends="compile...

ant conditional import

Is it possible to import a file in ant's build.xml if a property is set, if not then don't import it. Is there a way OTHER THAN using ant-contrib if task. Thanks ...

ANT 1.8.0 + Delete task does not delete broken Symbolic link

Any ideas why this does not remove the broken symlink itself? <delete removeNotFollowedSymlinks="true"> <fileset followsymlinks="false" file="/some/path/to/broken/symlink" /> </delete> Alternatively I could use the below, but I'd prefer to avoid exec...? <exec executable="rm"> <arg value="-f"/> <arg value="/some/path/to/b...

ivy - create local repository to pull multiple jar files from same location

I have a local repository, in which i can put one jar and retrieve it using ivy. Now for svnant, I want to put 4 jar files in one folder and try to use ivy to retrieve it. my patten in org/module/version/module-version.jar. how do i perform this. ...

tomcat could not run ant reload command

when i enter command ant reload the server generate eception. I write the ant reload script in my buil.xml file. But server could not reload it. Exeption is BUILD FAILED E:\Work\projects\schoolguide_0_2\build.xml:182: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) ...

Compiles in Eclipse but not with Javac from command line: StackOverFlow

Hey All, I have a Java project that contains many very large source files and it compiles fine in Eclipse, however it will not compile with javac from the command line or within Ant. When I try to compile it from the command with javac (or using Ant) I get a StackOverflow Exception: [javac] java.lang.StackOverflowError [javac] ...

ant junit task error

i am trying to do the spring tutorials from the spring website. one of the tutorials include bulding an ant build file which when i build I keep getting this error BUILD FAILED build.xml:146: You must not specify nested elements when using refid When i click on the error it seems to be pointing at this location <target name="tests" d...

aapt always compresses resource files

I have an Ant build script for my Android project. I’m using aapt to package various resource files. I want the resources files to be uncompressed. I ‘ve tried the ‘-0′ flag but the files still get compressed! But when I build through Eclipse, the resource files are uncompressed. Why doesn’t this flag work? Here is my aapt target in Ant...

Using Ant to deploy EAR to remote websphere application server

I want to automatically deploy a EAR file build in our continuous integration server to a websphere application server. I looked up the Ant task wsdeploy, but the documentation really isn't helpful at all. I added this to my ant script: WSDeploy Ant task <classpath> <fileset dir="${dir.was.plugins}"> <include name="**/*.jar...

In Ant, does the order of tasks inside a target matter?

I want to make a target to restart tomcat6. Right now, I have something like this: <taskdef name="stop" classname="org.apache.catalina.ant.StopTask" /> <taskdef name="start" classname="org.apache.catalina.ant.StartTask" /> ... <target name="restart" depends="deploy" description="Restart Tomcat" > <stop url="${manager}" username="$...

Can Ant detect if a project is closed in Eclipse?

We're using Eclipse on a flat multi-project set-up. Ant builders are set up on each project to create jars as needed; the ant files are used to manually kick off junit tests, create junit reports, etc. One project is set up as a "master build" project, from which one has a convenient single ant target "test-all", which invokes the t...

Resolving XSD's using Ivy

Forgive the double post but I am keen on an answer to this. I would like some advice as to the approach I am taking. I am using Ivy for dependency management and am able to download and use all my jar files no issues. I would like to also run the <schemavalidate> task in Ant and would like to use Ivy to download the xsd's and dtd's as s...

Ant 1.8.1 and StarTeam

I'm using Ant 1.8.1 and StarTeam 2008 R2. I noticed in previous versions of Ant there were optional tasks which could be used to access a StarTeam repository. These tasks seem to be absent in Ant 1.8.1? What happened to them? Do any tasks exist to do this, or do you have to create your own tasks using the StarTeam SDK 10.4 (which l...

How to use Ant with NetBeans C++ Qt applications

Hi all, I'm using NetBeans C++ to build a simple Qt application. Here is what I did: From 'File' I chose 'New project' In the 'New project' window I selected C/C++ category and C/C++ Qt application Then I clicked Next and on the second frame I renamed my project to 'Test' Clicked 'Finish' and the sample project was created successfull...

Cannot find Java Import in Eclipse?

I've dealt with errors like this in Eclipse before, but I have no idea why I'm getting it this time. I have the Apache Commons IO library in my Build Path as well as in my "lib" folder. I've given the error below. It's pretty straightforward. [javac] Compiling 3 source files to C:\Users\Justian\workspaces\ConnectionComp...

Intercept Commons Logging From Ant

I'm trying to figure out how to make org.apache.commons.digester.Digester be quieter. I am compiling JRXML files into jasper files (JasperReports reports) at build time using Ant. I have a logback.xml and slf4j and jcl-over-slf4j available on the classpath. I just can't figure out the wiring. The problem is I have 200+ reports and when ...

Checkout from subversion through svnANT is not working

build.xml file is like: I have installed JDK 1.6.0, apache-ant -1.8.1 on my system. Using Subversion I checkout the SVNAnt project located at: http://subclipse.tigris.org/svn/subclipse/trunk/svnant and put at ANT_HOME. Also download svnant.jar, svnClientAdapter.jar, svnjavah...

How to run some Ant tasks in PHP project in Netbeans 6.8

I wanted to run some Ant scripts from a build.xml in my PHP project. This post and link talk about a Ant plugin but i cannot find it in NB 6.8. Update & Closed The only way i found to get the Run Target contextual menu is to copy a build.xml from a Java project. ...

How do I convert a relative path in Ant to an absolute path?

I would like to convert a relative path to an absolute path. How is that done? ...

SVN: PROPFIND request failed

build.xml is like: <?xml version="1.0"?> <project name="AUTO_BUILD"> <property environment="env"/> <path id="svnant.classpath"> <fileset dir="C:\Program Files\Java\apache-ant-1.8.1/lib"> <include name="**/*.jar"/> </fileset> </path> <taskdef resource="svntask.properties" classpathref="svnant.classpath"/> <target name="chec...