build.xml

ant build.xml windows white space in path

I'm using Windows and I'm trying to get ANT to work. When I do an ant build from the command line, I get: C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found. I look into the build.xml file and I find: appserver.home=${user.home}/apache-tomcat-6.0.14 (which I just copied and pasted straight from a tutorial) I changed it to: appserve...

What is the right combination in ant?

It doesnt seem that when you combine these Fileset attribute like below: eg: <fileset dir="src"> <include name="gov/nasa/arc/mas/selenium/tests/*.java" /> <excludesfile name="${test.suite}.exclude" /> </fileset> that it has the expected behavior which is to include all *.java under src but exclude all the file specified on the...

Netbeans: How do I let additional files be included into the created JAR?

Hello! Netbeans doesn't allow me to specify, which files I want to have additionally included inside the JAR. Can I work this around by editing the manifest.mf? Or by editing build.xml? What else could be done? EDIT I need the files to appear in jar's root (files such as LICENSE.txt or some exec script), because otherwise they would...

build.xml in Java project

Hi, I am new in Java and I need some information. What is file build.xml? I mean I have a university project which I should extend. It contains also a build.xml. I was wondering if it is a possibility to import this project in eclipse or netbeans using this build.xml. I tried to import the project but I get some errors since one part is ...

Import xml file (defined in build.xml) to eclipse

I have the following entry in my build.xml with all other jar files defined <import file="/qa-properties.xml" /> When I clean the project it gives the following error. BUILD FAILED /home/pv40143/tools-2.3/build/subdirs.xml:54: The following error occurred while executing this line: /home/pv40143/automation/fb_vasip1028/common/buil...

ant common targets are not recognized by eclipse

Hi All, I have added all common targets like (init,clean,getivy etc) in ./common/common.xml and added import file="${basedir}/common/common.xml" in build.xml. When i build the project, its working fine.But, When i open build.xml in eclipse IDE , i see some "Red" marks underneath "targets" which has a dependency targets that are defined...

What to do in build.xml to add parameters in java command in the execution of the program?

I can only execute an application i made, with the following command in the command line: java -jar -Djava.net.preferIPv4Stack=true P2P_network.jar I would like to know, how can i put this in the jar file, so i can execute it automatically, without needing to go to the command line. The IDE used is netbeans. ...

java.lang.ClassNotFoundException when running java -jar (still unsolved)

I'm using ant to build my build.xml file, it compiles ok, but then getting a runtime java.lang.NoClassDefFoundError when running the resulting jar via "java -jar my_jar.jar". It seems like this comes up a lot but none of the related questions' solutions worked for me. My classpath for javac contains only "/usr/local/lib/libthrift.jar" a...

New to Ant - Problem with relative paths

Please help, I'm going slightly mad!! I'm using Eclipse-generated antfiles to build a project with dependencies, one of which has its own buildfile in a directory which is a sibling to the direct ancestor of the project I'm building. E.g. if my directory is "/base/modules/clinicalcontext", the directory of one of the dependencies is sim...

bounce multiple servers using ant

Hi All, This is restart target code which is defined in build.xml target name="restart" propertycopy name="remote.host" from="deploy.${target.env}.host.${remote.id}" propertycopy name="remote.port" from="deploy.${target.env}.port.${remote.id}" sshexec trust="true" host="${remote.host}" port="${remote.port}" username="${scm.us...

In an ANT build.xml file, how can I iterate over the items in the ${env} variable?

This is in a Windows XP environment. I'm trying to install and edit some files that have default settings. I want to update these settings use items from ${env} ...

Creating ANT script to deploy to glassfish, run junit tests and then un-deploy

Hey guys, I have a j2ee app which I am building with Netbeans. My task is to modify the build.xml so that after the app builds, ANT deploys the app to a server, runs Junit tasks on the app, and then un-deploys the app. So far I have the deploy and un-deploy working but I'm running into some trouble running the junit tasks. I have a c...

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...

How can I use an Ant foreach iteration with values from a file?

In our Ant build environment, I have to do the same task for a number of items. The AntContrib foreach task is useful for that. However, the list is in a parameter, where I actually have the list in a file. How can I iterate over items in a file in an foreach-like way in Ant? Something like (pseudo-code): <foreach target="compile-module...

Filter for jar-file by analyse with findbugs

Hi, I have a jar-file, which I want analyze with findbugs through build.xml. I use "class location =....jar" - pattern. The jar-file contains several folders, but I need to analyze only one folder. How can I specify that ? Thanks in advance ! ...

How is possible to export ant Project generated programmatically into build.xml

I am using ant externally, i.e. I construct org.apache.tools.ant.Project dynamically in my program: setup its Tasks, Targets etc., then I want to create build.xml file. How is possible? How possible export this project into ordinal ant build.xml? ...

Generate Junit test results from a build.xml in a android project

Hi. i am trying to run and publish my junit tests in html using a build.xml file calling the junit target but it doesnt seem to work. here is how my build.xml looks like: <target name="Unity Agent SDK Test "> <mkdir dir="${junit.output.dir}" /> <echo message="making directory" /> <junit fork="yes" printsummary="yes"> ...

How to get Ant in Apache to copy files every build

Hi, I'm using Eclipse and Ant in my development environment. I've come across a problem Here's part of my build.xml <target name="deploy" depends="dist" description="deploy jar files"> <!-- Deploy jar files on local Tomcat --> <echo>Deploying in ${tomcat_home}/webapps</echo> <echo>Copying JSP files from ${build_dir} to ${to...

Android ==> ant and proguard ??

I am getting the following error while obfuscating my application. How can i define the output jar in my build.xml? [java] Shrinking... [java] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options? [java] at proguard.shrink.Shrinker.execute(Shrinker.java:148) [java] at proguard.ProGuard.shr...

How can I include a folder into the dist JAR as part of the build process using Netbeans?

I'm using Netbeans 6.9 , and I have looked into editing the build.xml file so that I can include directories and files in the jar file that results from building the project. So my question is How do I modify the build.xml file to put other folders in the jar? I have the following directory structure for my project ProjectDir/ /imag...