ant

Execute a jar file using Ant

I am trying to create a runnable jar file from java classes using ant. The java classes use external jars. When I execute the build.xml its showing class not found exception while running the java program. Its compiling fine. Part of My source code: <path id="project-libpath"> <fileset dir="${lib.dir}"> <include name="*.jar"/> </fi...

Launch an Eclipse Run Configuration from ANT

I am using Orion server for my Java-based web application. I have a run configuration that launches Orion with the correct classpaths and all necessary configuration. I also have several ANT scripts for copying files to the build path. I want to create an ANT script that shuts down Orion, copies necessary files, and restarts Orion. I ...

build.xml in ant

Can anybody help me know what these tags do in build.xml file? 1)<property file="" location="."/> 2)<property environment=""/> 3)<property name="" value=""/> 4)<path> id="classpath.base" 5)<pathelement> location="$some.jar"/> 6)<path> id="classpath.build"> 7)<path> id="classpath.test"> 8)<target></target> Thank You ...

How do I test to see that a directory is empty in ANT?

How can one test to see that a directory is empty in ant? ...

Why do I get so many errors building my Android project with Ant?

Now that I sort of know my way around the SDK/API, I've switched from Eclipse back to my favorite text editor, which means I have to use ant to build my project, however: It seems every other time I compile the project, a lot of drawables get corrupted, resources lose their ids (resulting in NPEs in the code), or classes throw "Verify E...

Apache Ant output using only log4j

What I'm trying to achieve is to have log4j as the only output from my Ant build file. Getting log4j works pretty much perfectly except that it extends Ants output. So I'm getting Ant's DefaultLogger interspersed with log4j output. Take a VERY simple Ant build file: <project name="Maintenance_to_Delivery" default="main" basedir="."> ...

Calling consecutive java tasks in a shell script

Hi all, This may be a rudimentary question but the answer was not readily available. I'd like to create a shell script that calls 3 tasks consecutively, but wait till the previous task is complete. Like so: a. call first Java program via ant b. call third party Java application c. call third Java program via ant I'm wondering if t...

ant: iterator over properties file

Hi, all my projects and their versions are defined in a properties file like this: ProjectNameA=0.0.1 ProjectNameB=1.4.2 I'd like to iterate over all projects and use there names and versions in an ant script. Right now, I read the entire properties file in help of the property task. Then I iterate over a given list in a for loop li...

How to start and stop jboss server using Ant task ?

I need to stop, deploy my ear file and start Jboss server using the Ant tasks. I am able to compile, build and deploy my J2EE application as an ear file into the JBoss server successfully using Ant tasks. We can see the redeployment of my application in the jboss console. I want to stop the server before deployment and start the server....

give input to a runnable jar file through a file

I have created a jar file using ant. I want the jar file to take input from a external file. How can we achieve this? ...

Automation of EAR packing

I need to automate packing of Java EE projects into EAR archive in Eclipse. The most easy way, I think, is using Ant script. But writing of Ant from start is routine and long task. Is there a way to generate Ant script based on my actions in eclipse (like macros in MS Office)? Or, maybe, exists easier way to do this? Thanks! ...

Automating Portlet Deployment to WebSphere Portal Server 6.1

I've recently started on a project to develop some portlets which will run on IBM WebSphere Portal Server 6.1. Does anyone know of any scripts, Ant tasks, Maven plugins, etc. for publishing a portlet to Portal Server? In the WebSphere Portlet Factory plugin for eclipse it is possible to "publish" a portlet project to Portal Server inst...

Flex 4 swc size smaller compiled by FlashBuilder than using ANT

I'm trying to figure out why when I compile my Flex 4 Library swc using a simple ANT tasks, it compiles to about three times the size of the swc that's compiled by FlashBuilder. Here is my ANT script to compile my swc <target name="compileSWC" description="compiles the Library"> <echo>Compiling Library SWC To Deploy SWC Folder</echo> ...

Can you use Ant to Build/Modify XML files?

I am quite new to ant and have been looking at the tasks. I am trying to generate an xml file. Do I need to call an external process or does ant have some way to do this? It could be as simple as sending a string to a txt file and saving it as a .xml. Is it possible? ...

Exporting Maven properties from Ant code

I've embedded the following code within my POM: <plugin name="test"> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>validate</phase> <configuration> <tasks> <pathconvert targetos="unix" proper...

Problem with building with csc task in Ant

I have an ant build target using csc: <target name="compile"> <echo>Starting compiling ServiceLauncher</echo> <csc optimize="true" debug="true" warnLevel="1" unsafe="false" targetType="exe" failonerror="true" incremental="false" mainClass = "ServiceLauncher.Launcher" srcdir="ServiceLauncher...

eclipse loadproperties like in ant task

hello, is there something like the anttask loadproperties in eclipse so that i can load a properties file when i want to debug in eclipse. thanks! ...

JSP problem deploying a java web application in tomcat

I'm learning ANT and I'm trying to deploy a web application in tomcat 6.0.20 server. I build the test application and I deploy it with the manager ant tasks and everything goes right. I load a HTML page and it works... When I try to view a JSP tomcat give me a JasperException, coused by a NullPointerException in the auto-generated Servle...

How to generate testNG-xslt report using Ant?

Hi, I'm having problem in generating the testNG-xslt report using Ant. I have did whatever have mention in Varun's blog, I did include the saxon.jar and the testng-results.xsl in my project folder, but still couldn't get my expected result. 1) I would like to know how the testng-results.xml file is generated. Because I couldn't get the...

Is this possible using ant?

Hi, I have a requirement where in i have to create a file, which will contain the source directory name, target directory name where it would be deployed, and list of file (.jars) that i need to deploy. I was thinking of having a properties file where i would specify multiple lines of following type [Src dirctory name] [destination di...