Questions tagged [ant]

Apache Ant (formerly Jakarta Ant) is a declarative, XML-based build tool for Java projects. It provides a rich set of standard tasks for performing most common build operations, such as compilation with javac, building archives and running tests. Ant's functionality can be extended through custom tasks and macros.

Ant

Apache Ant is a Java open-source library and command-line tool whose mission is to drive processes described in XML build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications.

Ant supplies a number of built-in tasks allowing to compile, assemble, test and run applications. Although primarily aimed at building Java applications, Ant can also be used effectively to build non-Java software, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets, tasks, and macros. It's a standard and effective framework which transforms a development structure of project to deployment structure.

Ant was historically meant as a replacement and Java counterpart for the UNIX Make build utility.

References

Extensions

Example

Hello World

A build.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="world" basedir=".">
  <target name="world" depends="message" description="output a friendly message">
    <echo message="World!" />
  </target>
  <target name="message">
    <echo message="Hello, " />
  </target>
</project>

This project can be run from the directory containing the build.xml file by just typing:

  • ant
  • or ant -f build.xml

The list of available self-documenting targets can be viewed with ant -p.

16 questions
2
votes
1 answer

Error : Could not find End Of Central Directory

I am trying to deploy a war on weblogic9 using an ant task on a Unix box. I am getting the following error :[wldeploy] Error opening file [file path] Could not find End Of Central Directory.The war file has the name similar to a datasource. This…
dsr
  • 141
  • 2
  • 5
2
votes
1 answer

How to find out the correct path for ANT_HOME in Linux?

I'm using Ubuntu 14.04 (on a VirtualBox VM) and installed Apache Ant via aptitude: $ aptitude install ant The binary is stored in /usr/bin/: $ which ant /usr/bin/ant Now I want to set ANT_HOME and also add it to my PATH environment variable. On…
automatix
  • 682
  • 3
  • 7
  • 19
2
votes
2 answers

ant doesnt get the library dependencies

My system: Windows 7 Ant Version: 1.8.2 JDK: 1.6.27 x64 Sorry Im starting to work with ant and currently trying to install it properly. When I type in cmd this command: ant -f fetch.xml -Ddest=system to get the library dependencies, according…
cOnf_ua
  • 41
  • 5
1
vote
0 answers

FTP automate download process not working on windows

I have my script as following: Hello World -…
abhijeet
  • 11
  • 1
1
vote
3 answers

How to increase heap size for ws_ant.sh when deploying on WebSphere 8.5 (64-bit Linux)

TL;DR -- How do I give ws_ant.sh and/or the task more heap at runtime? I am attempting to deploy a relatively large (~160-MB) EAR file to WebSphere 8.5 running on a 64-bit Linux platform. Here is the task I have in my…
PattMauler
  • 111
  • 1
  • 6
1
vote
1 answer

Apache Ant setup in Aix

I want to install Apache Ant on my AIX 6.1 Server and I'm facing some issues. When I visit the link http://ant.apache.org/manual/install.html I did not understand the installation step for the files with the extention .tar.gz The step is : .tar.gz -…
david.colais
  • 123
  • 5
1
vote
1 answer

Need to execute script file using sudo - run from teamcity

I need to execute a script in Linux platform "runme.sh" (which can be executed as sudo user) using another ant script "build.xml". Now i have execute this build.xml from teamcity. I have code for everything but got struck into while invoking…
coolgokul
  • 19
  • 1
  • 2
1
vote
2 answers

Ubuntu export JAVA_HOME ,ANT_HOME

Ubuntu 11.04 open terminal JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/ export JAVA_HOME echo $JAVA_HOME ==>/usr/lib/jvm/java-6-sun-1.6.0.24/ i close the terminal open another terminal echo $JAVA_HOME ==> Any idea why JAVA_HOME was not saved ?
Cris
  • 235
  • 1
  • 7
  • 13
1
vote
3 answers

Remotely reboot tomcat

I am trying to reboot my tomcat version 5 on a centos server from my dev box. I can login as a normal user(not root) but I need to be able to reboot the service. Is there a config file that I can modify or a group my my user needs to be in to be…
Milhous
  • 133
  • 2
  • 9
0
votes
2 answers

How do I restart a WebLogic domain remotely using Ant?

I have a setup where I'm running Oracle BPEL Process Manager in a set of WebLogic 9.2 servers. I have a release management system on another server that builds and deploys BPEL suitcases into these servers, using Ant. The recommendation from…
Paul Schifferer
  • 103
  • 2
  • 4
0
votes
1 answer

Ant task to pre-compile JSPs on weblogic server

I am trying to create an ant task to compile JSPs. Here are the excerpts from the build.xml related to the task: ....
None
0
votes
2 answers

Postfix able to receive email but not able to send it

I had postfix running on my machine(comes with centos minimal), but today I configured it to use my domain for the sake of example this is my domain name example.com . Here is my config : alias_database = hash:/etc/aliases alias_maps =…
c0mrade
  • 81
  • 1
  • 11
0
votes
1 answer

I want to deploy my php based web application with apache-ant. How can I do that?

I googled it. But unfortunately did not get the specific answer. I am a fan of command line and typing. So now, I want to deploy my php based web application with apache-ant. How can I do that? Also I want to practice these deployment in my local…
codeperl
  • 1
  • 1
0
votes
1 answer

Access violation at address in module "ANTserver.exe"

I'm getting this error whenever a user attempts to connect to an ANT server... Exception EAccessViolation raised in ReadRequest: Access violation at address 00071F40 in module 'ANTserver.exe'. Read of address 00000000
Benjamin Bryan
  • 197
  • 1
  • 9
0
votes
1 answer

Where Does Jasper Reports Store Generated Reports

I've been able to generate sample reports in Jasper Reports tied with ANT and JDK, my question is, when I do the "ant pdf" command, it builds the report successfully, but where does it store it to? Thank you.
1
2