ant

How to parameterize a path in ANT?

I have the following defined in a file called build-dependencies.xml <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="artifacts/project-1/jar/some*.jar" /> <fileset file="artifacts/project-2/jar/someother*.jar" /> </path> ... </project> I include it ...

need help in writing ant target

I am new to writing ant targets. I've to pass 3 arguments from the command line to java program. All these can be optional and can have spaces. How can i do that using ant target. I tried using but if it delimits the arguments by space. So, if my first argument has space then it takes the word after space as second argument. I also t...

Invalid byte 1 of 1-byte UTF-8 sequence

I have a MyFaces Facelets application, where the page coding is a bit rugged. Anyway, it's developed with Eclipse and built with Ant, and kindof runs ok in Tomcat 2.0.26. So far so good. Now, I'd rather build with Maven, so I made a couple of pom-files, opened them in Netbeans and built, and now I have a war file that deploys ok. Howeve...

how to execute vbscript file from ant file

hi...i want to run vbscript file from ant script...how to do that?.. ...

CVS Error when using anonymous user and pserver

Hi, I have setup an anonymous cvs user to be able to check out my project from cvs without having to enter a password. However, when I try to login to cvs using the following command cvs -d :pserver:anonymous@[HOSTNAME]:/home/cvs/cvsroot login and then presss enter when prompted for a password CVS Password: I get the following erro...

Ant build.xml requires user input, but Eclipse has no tty

I'm trying to better integrate Eclipse with my build.xml. My build file calls GNU Make for the native portion of the program, and the Makefile uses sudo to movethe compiled libs into system path. Unfortunately that requires entering a password, and Eclipse's terminal doesn't accept user input. So the result from running the build in ecli...

Use javac fork attribute with IBM JDK

Hi - I have a large ant build that I'm working on, that is currently running out of memory. One ways I've read that can help mitigate this problem is to use javac fork="true" to run javac in a separate jvm. My problem is that I need to compile the project with the IBM JDK (this is not the JDK referenced by JAVA_HOME, and I would pref...

phing nested if conditions

Hello - I am having trouble understanding the Phing documentation regarding multiple conditions for a given <if> tag. It implies you cannot have multiple conditions unless you use the <and> tag, but there are no examples of how to use it. Consequently I nested two <if> tags, however I feel silly doing this when I know there is a better...

ant task to remove files from a jar

Hi, How to write an ant task that removes files from a previously compiled JAR? Let's say the files in my JAR are: aaa/bbb/ccc/Class1 aaa/bbb/ccc/Class2 aaa/bbb/def/Class3 aaa/bbb/def/Class4 ... and I want a version of this JAR file without the aaa.bbb.def package, and I need to strip it out using ant, such that I end up with a JAR ...

Eclipse buildtime and runtime classpaths for easy execution of junit test cases

Hey, I've a large eclipse project with multiple junit classes. I'm trying to strike a balance between adding runtime resources to the eclipse project classpath, and the need to configure mutliple junit launch configurations. I realise the default eclipse build classpath is inherited by all unit test configurations, but some of my tests...

Where are classpath, path and pathelement documented in Ant version 1.8.0?

I'm looking over the documentation that comes with Apache Ant version 1.8.0 and can't find where classpath, path and pathelement are documented. I've found a page that describes path like structures but it doesn't list the valid attributes or nested elements for these. Another thing I can't find in the documentation is a description of t...

parse json with ant

I have an ant build script that needs to pull files down from a web server. I can use the "get" task to pull these files down one by one. However, I'd like to be able to get a list of these files first and then iterate over the list with "get" to download the files. The webserver will report the list of files in json format, but I'm n...

where can I find class org.apache.axis2.wsdl.java2wsdl

when I invoke "<java classname='org.apache.axis2.wsdl.wsdl2java'> <arg value ...> ...", It works well !!! But when I try to invoke "<java classname='org.apache.axis2.wsdl.java2wsdl'> ...", I always get an error "Can not find org.apache.axis2.wsdl.java2wsdl" Can anybody tell me why? Thanks. ...

How to debug GWT using Ant

I know that the job would be simpler if I use Google Plugin for Eclipse. However, in my situation, I heavily adapted Maven and thus, the plugin cannot suit me. (In fact, it gave me the whole week of headache). Rather, I relied on a ant script that I learned from http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html The ...

future-proofing java version check in ant script

The script provided here gave a great way to check if Ant is using Java 6. <?xml version="1.0" encoding="UTF-8"?> <project name="project" default="default"> <target name="default" depends="javaCheck" if="isJava6"> <echo message="Hello, World!" /> </target> <target name="javaCheck"> <echo message="ant.java....

specifying classpath for built-in ant tasks

I use the classpath attribute in custom Ant tasks to tell Ant where to find the external task jar, but how do I do the same for built-in tasks? In my case I'd like to make sure ant uses my copy of jsch.jar for the scp task, and not one that my already be installed on the system. Is there any way I can <scp> while guaranteeing it's using...

Getting ANT to scp only new/changed files

I would like to optimize my scp deployment which currently copies all files to only copy files that have changed since the last build. I believe it should be possible with the current setup somehow, but I don't know how to do this. I have the following: Project/src/blah/blah/ <---- files I am editing (mostly PHP in this case, some st...

Flash CS4: I want to compile multiple fla's with one command, is make or ant a good solution?

I'm working on a large Flash CS4 project with multiple swfs and want to consolidate my build process. Are ant/make overkill or have people out there successfully used them on large Flash projects? Thanks ...

Javadoc through Ant task with {@inheritDoc} from J2SE classes

I generate documentation for a project using an Ant task. In several places, I wanted to inherit documentation from the standard classes, so I used {@inheritDoc} which allowed me to see the Javadoc in Eclipse, but it wouldn't show up in the HTML files. The problem was that I hadn't included the unzipped src.zip (J2SE source) in the sourc...

Java: Use jar library's from package manager in Linux.

I'm trying to find the best way to use Java libraries that were installed by the package manager instead of just putting a copy into ${project.root}/lib My distro, Gentoo, has a package for Java libraries like jdbc-postgresql. It's installed to /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar I assume that this path may be different ...