ant

How to run an ant target from Maven2?

How do i run a specific target with the antrun-plugin from the command line? mvn antrun:run doesn't make it run. <project> ... <build> <plugins> ... <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> ...

Deploy "exploded" folder to Tomcat in Eclipse

I just installed Eclipse for Java EE developers, Created a New Project by checking out files through SVN from a repository. I was able to successfully generate an "exploded" web app folder through an ANT build. How do I deploy this exploded folder (not .war file) to Tomcat? Any configuration that needs to be done? Thanks. ...

How to invoke ant task in python script ??

I know we can call like this: os.system("ant compile") But how to know whether the ant task is successful or not? And is there another way to invoke ant task? ...

Ant -verbose fails with "package does not exist" despite jar being on classpath

I have the following code package myPackage; import org.neo4j.graphdb; import org.neo4j.kernel.EmbeddedGraphDatabase; public class dbServlet extends HttpServlet { public void init() throws ServletException { // Start up the database here GraphDatabaseService graphDb = new...

How do I share data between custom Ant tasks?

I wrote two different custom Ant tasks. They are trying to share data through a static member in a base class. This is not working for me. I assume I am using static members correctly within Java. I think this is a dynamic loading issue with the Java VM. However, I am a relative newbie with Java. Since Ant custom tasks are mapped a...

How to call some Ant target only if some environment variable was not set?

I would like do not call some target in build.xml only in case if there is some variable on enrironment. Following code does not work: <property environment="env"/> <property name="app.mode" value="${env.APP_MODE}"/> <target name="someTarget" unless="${app.mode}"> ... </target> <target name="all" description="Creates app"> ...

Can I use ivy dependency info in my ant build file

In my ivy.xml file I have dependency statements like: <dependency conf="*->*" org="gnu" name="gcc" rev="4.2.1" changing="false"> <artifact name="gcc" ext="tbz2" e:classifier="src"/> </dependency> 'rev=' can be a fixed value or 'latest' or whatever. In my build file I would like to get hold of the value of 'rev' to be uses in furt...

executing a java class file from ant script

hi, I need to run a java class actually a test case from ant script, is it possible to do so?? ...

taking output on console when running junit through ant script

i am using ant script and running a junit, the problem i am facing is that i am unable to get the output on console, rather i get the output in a log file. how can i achieve that.. i am using the following script. <target name="validate_mapping" description="Testing the Hibernate "> <path id="validator.classpath"> ...

how to add one folder in classpath for ant script

hi, i need to add a folder in current classpath for ant script that i have written for running java files. please help me. ...

Blackberry Build Tool

Could anyone suggest the best Build Tools for use in the build process when building a blackberry application. Is it just the creation of an ANT project, does that cope with signing etc? Is there a better tool out there? I'd prefer a lightweight Windows solution. I normally use Automated Build Studio -- it can build ANT and it can al...

Ant: how to write optional nested elements

Say that I need to do something like: <copy todir="${DEPLOYMENT_DIR}" overwrite="true"> <fileset dir="dir1" /> <fileset dir="dir2" /> <fileset dir="dir3" /> ... <if> <equals arg1="${SPECIAL_BUILD}" arg2="true"/> <then> <fileset dir="dir7" /> <fileset dir="dir8" /> ....

ANT war task- How to war only new /modified files

How do i modify ant war task so when everytime it is called, instead of building whole application, it builds only new files or modified files. I tried to use update, duplicate attributes and they do not seem helpful. ...

Grails ant tasks don't work - Unable to start Grails: java.lang.reflect.InvocationTargetException

Hi, I'm having issues getting something which seems very basic running with Grails. I want to call grails commands from an Ant script - Grails provides a Grails task to achieve this. I have defined the Grails taskdef and classpaths as per the docs however, no matter what command I call I get the same error... grails-compile: [grails...

Make command line stay open when running a bat file

I want my batch file to stay open after processing is complete. Here is my code: set CLASSPATH=C:\XSLTANT\examples\word_transform\apache-ant-1.8.1\bin set PATH=%CLASSPATH% ant >> transform.log echo "See transform.log for results" pause It closes instantly after it runs the ant build. Any ideas? Thanks. ...

Upgrading Ant to 1.8.1 via macports

I'm trying to upgrade ant to 1.8.1 via macports. When I run live-check I get this: apache-ant seems to have been updated (port version: 1.7.1, new version: 1.8.1) but when i run port install it installs 1.7.1 and when I run upgrade it does nothing ...

problem in getting ouput on console when using ant to run test case

hi, i have written one ant script, that internally runs one java code. Below is the java code and ant script :- <junit printsummary="yes"> <formatter usefile="false" type="plain"/> <test name="com.junit.test.TestSuite"/> <classpath> <path refid="validator.classpath" /> <path refid="lib.release.classpath" /> <path refid="lib.e...

dealing with paths that end the same and have a fixed set of path prefixes

My application has internationalization and the language code is in the first part of every path like "/en/dosomething" and "/de/dosomething" How do i make a single access rule for the "dosomething" resource instead of 2 and still check for "en" and "de"? ...

ant task to deploy/undeploy war on jboss

How do i deploy/undeploy a war file on running Jboss server using ANT build ? ...

Apache ANT: How can I unzip a specific folder?

Hi All, How can I unzip a specific folder with ANT? Specifically I have downloaded apache-tomcat-6.0.29.zip which contains the folder "apache-tomcat-6.0.29". I want ANT to unzip everything under "apache-tomcat-6.0.29" but not include "apache-tomcat-6.0.29" in the top of hierarchy. I've tried a bunch of things and I can't seem to ge...