ant

Jboss war redeployment Zipexception

All, Server: jboss-5.1.0 Java Version: jdk1.6.0_14 Deployment Method: ant v1.7 Error: 08:40:04,260 WARN [ZipEntryContext] IGNORING: Failed to reinitialize context: vfszip:/home/username/jboss-5.1.0.GA/server/default/deploy/deployment.war java.util.zip.ZipException: error in opening zip file Error occurs if the serv...

Avoiding re-building prerequisites in Ant

I have an existing Ant project and would like to speed up the build process by avoiding re-building components that are already up to date. Ant permits you to specify that one target depends on another, but by default every prerequisite is always rebuilt, even if it is already up to date. (This is a key difference between Ant and make....

Compiling the mxml file inluding other mxml and .as files using ant.

Hi All, I have an mxml application that is in flex_src directory and parallel to that i have two folders in which i have my action scripts files in certain package hirarchy like com.citi....something.I hv written a build.xml for this.For a simple stand alone mxml file it is creating swf file but in my case i m getting the following erro...

How to over-write the property in ant ?

Hi , Is there a way to re-assign the value for the ant property task? Or is there anyother task available for the same? Regards, Priya.R ...

Can someone provide a bare bones Ant build script for Hibernate?

Most Hibernate tutorials use Maven for handling the build, but I'm looking for a basic configuration using Ant instead. I've reviewed this some: https://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html However, it seems like it covers way more in an introductory tutorial than I need. I really want to get started w/ some simp...

How can I sign an OSGi bundle with Ant without overwriting the MANIFEST.MF contents?

I have an Eclipse plugin for which I create the OSGi bundle JARs with Ant. I would like to sign them with the Ant task, but that overwrites the MANIFEST.MF contents with the class signatures, making the OSGi bundles unusable. The JDK jarsigner tool has the same behavior. The Eclipse PDE seems to have that functionality, but as far as I ...

Strategies for deploying an exploded ear

I have a build process that creates an ear in a fairly complicated manner (multiple EJB jars, a couple of wars, a couple of sars (which are JBoss specific). The ant process for piecing this together is somewhat complex. What is the best strategy to not recreate the creation logic of the ejb creation in ANT but still be able to deploy ex...

Documenting J2EE comonents in Ant script

I'd like to document J2EE components that we create. Our ant scripts have targets to build them all. I was wondering if there is anything like "javadoc" for an ant script. In other words, I could annotate the ant targets: <target name="some.war'> <antdoc> This war file provides the user interface for the foo application. </a...

How do I put the entire lib directory (including all subdirectories) on the classpath using Ant?

I'm not sure this is the problem, but it looks like it might be the case. I'm getting build errors telling me that certain packages don't exist. These packages are packages that exist in .jar files within my lib directory. Any other packages within my java source files that I'm compiling and copying to the classes directory are working j...

Flex-Ant: mxmlc doesn't support the "file" attribute

Hey guys, Just moved my Flex app onto Ant with a basic ant script and I am getting this stupid error: mxmlc doesn't support the "file" attribute. I looked through docos and it seems that my code is right, so hows it going. <!-- load previously defined configuration properties file --> <property file="build.properties" /> <!-- point...

Problem with Undeploy Task in Tomcat 6

Hello there, I am using Tomcat 6, Apache Ant 1.7.1 and JDK 1.6 on OS X Snow Leopard... Created the following build script and supporting property files: (1) build.xml <?xml version="1.0"?> <project name="${project.name}" default="deploy" basedir="."> <property file="build.properties"/> <property file="admin.properties"/> ...

Maven Java Source Code Generation for Hibernate

Hi, I´m busy converting an existing project from an Ant build to one using Maven. Part of this build includes using the hibernate hbm2java tool to convert a collection of .hbm.xml files into Java. Here's a snippet of the Ant script used to do this: <target name="dbcodegen" depends="cleangen" description="Generate Java source from ...

Why does ant ignore task jars in $HOME/.ant/lib/

Configuration: I'm running stock Fedora 12 with the ant that Fedora ships: ant-1.7.1-12.fc12 java-1.6.0-openjdk-1.6.0.0-33.b16.fc12 I have svnant.jar and svnClientAdapter.jar in my $HOME/.ant/lib/ I'm using the following build.xml: <project name="antlibtest" default="doEcho"> <taskdef resource="svntask.properties"/> <targ...

JUnit tests are run twice by my Ant target

I have made an Ant target that runs my JUnit 4 tests. Unfortunately all of them are executed twice! Does anyone have an idea of what I have done wrong? Here are my ant target: <target name="junit" description="Execute unit tests" depends="compile"> <delete dir="rawtestoutput"/> <delete dir="test-reports"/> <mkdir dir="rawtestoutput"/>...

Passing argument to ant

I'm not very good w/ ant, but we're using it as a build tool. Right now, we can run "ant test" and it'll run through all the unit tests. However, I'd love to be able to do "ant test some_module" and have it accept "some_module" as a parameter, and only test that. I haven't been able to find how to pass command line args to ant - any i...

ant script to use use two .properties files?

Hi, I want to know if it is possible to get an ant script to reference 2 different .properties files at once, and if so, how to accomplish this. Assume that the properties contained within the two .properties files are mutually exclusive, i.e. the same property will not appear twice. Thanks! ...

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

Ant exec - cannot run program 'start' CreateProcess error=2

Hi I can't run the windows 'start' using ant exec. Ant version 1.7.1. Here is sample build.xml to recreate the problem <project name="test" basedir="." default="test-target"> <target name="test-target"> <exec executable="start"> <arg line="cmd /c notepad" /> </exec> </target> </project> getting t...

How to enable verbose output using the ant task and inheritall="false"

When starting a build in verbose mode (ant -v) the verbose mode is not propagated to the "subants". The ant task looks like this: <ant antfile="${buildproject}" inheritall="false" target="${target}" output="${output.file}"> <property name="repo.global" value="/repo"/> <property name="proj.property.prefix" value="${property_pref...

using jaxb with ant (xjc target): how to process multiple xsd shemas

Hi All, I'm using jaxb to generate java object class from xml schemas within an Ant script like so: <!-- JAXB compiler task definition --> <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="master-classpath"/> <!-- Generates the source code from the ff.xsd schema using jaxb --> <target name="option-generate" descr...