ant

Unexpected element "{}target" {antlib:org.apache.tools.ant}target

I m using Eclipse 3.4.2 whenever I run my ant build it fails with the following exception Unexpected element "{}target" {antlib:org.apache.tools.ant}target Please let me know what I m missing on. ...

Building a SWC with Ant using TwitterAspirin as an example

Hey all, can you help me build TwitterAspirin into a SWC? It wasn't bundled with a build script so I took a stab at a quick one with Ant. http://github.com/destroytoday/TwitterAspirin/issues/issue/2 The error is: [compc] Loading configuration file /Developer/SDKs/flex_sdk_4/frameworks/flex-config.xml [compc] Error: could not find sour...

How to make ant4eclispe build a project with all its dependencies?

I have several Eclipse projects that depend on each other (no cycles). Is it possible to use ant4eclipse to automatically resolve and build dependencies (preferrably to a single output folder)? ...

Ant: How to compile jar that includes source attachment

How do I create a jar with Ant that includes the source attachment? Maven does this, but I'm living maven-free since '03 (well, 2009, but it doesn't rhyme). I can't see any options in the javac task which does this. I tried including the source .java files in the fileset passed to the javac task, but this didn't work. When I try to v...

Spring-MVC bean class cannot be found

In my build.xml, I set the attribute scr.dir: <property name="src.dir" value="${backend.dir}/java-src/catw/src"/> My dispatcher-servlet.xml: <bean name="/welcome.htm" class="com.bamboo.catW3.business.impl.WelcomeController"/> My view WEB-INF/jsp: welcome.jsp My controller: com.bamboo.catW3.business.impl.WelcomeController.java ...

Ivy custom url resolver

I am trying to create custom resolver in my ivysettings.xml file: <ivysettings> <settings defaultResolver="default"/> <resolvers> <chain name="default"> <url name="scala-tools"> <ivy pattern="http://scala-tools.org/repo-releases/[organisation]/[module]/[revision]/ivy-[revision].xml" /> ...

Apache Ants sshexec task and a passphrase problem under Mac OS X

I would like to use a sshexec task in Apache Ant under Mac OS X like this: <!-- ... --> <target name="uname"> <sshexec host="${host}" keyfile="${user.home}/.ssh/id_rsa" username="${user}" command="uname -ar" /> </target> <!-- ... --> But i will only get an error "Auth cancel" for "ant uname": BUILD FAILED /build.xml:78: com.jcraf...

Custom Maven plugin for encryption

Hi, I'm translating an Ant script to Maven 2 and I have this problem: the Ant script use a pretty simple java class to encrypt files this way: <target name="encrypt"> <java classname="DESEncrypter"> <classpath> <pathelement path="...classpath for this thing..." /> </classpath> <arg line="fileToEnc...

Import an Ant classpatch from another file

I'm exploring the awesomeness of Ant 1.8.1's import ability. Here's my situation: I have a top-level Ant file (project.xml) that turns around and calls ant on another Ant file (say, neato_project.xml) which actually does the build, or clean or whatever. I have 12 different project files that this top-level (project.xml) file can call, s...

Deploying Web Apps

We use SVN. Is it a good idea to do an "svn up" on production server? If so, how do we do roll back? What is considered best practice for deploying web apps (our application is in PHP). Boss wants to use FTP. ...

How to Build NetBeans Project into split JARs? (one with the mainclass, others as libraries)

I have a project which builds into a single JAR in Netbeans. However, to implement a basic auto update feature, I would like to move at least one of the packages (the HTTPClient package) to a separate JAR, as well as build a new JAR with a second Main Class in a different package. That way both the current Mainclass and the Updater Mai...

Ant EJBJAR Task question

I'm making ejb jar via ejbjar task in ant with naming="directory" but it generates jar with name of folder plus -generic. Is it possible to skip this postfix via some property? ...

Java project: should .classpath .project file be committed into repository?

I am a newbie using Eclipse to develop Java program, and here is my question: should I check in my .project and .classpath file? My friend told me that I should only check in .java files and the build.xml to guarantee portability. He said ".classpath will cause you much less portability on different environment. .project is entirely you...

grails ant task, set different envrionment

Trying to create a grails ant task that has other environments besides prod for the war task. i've tried <target name="war" depends="-init-grails" description="--> Creates a WAR of a Grails application"> <grails script="War" args="grails.env=${env} ${war.filename}"/> </target> and <target name="war" depends="-init-grails" de...

How to replace template in one file with content of another file?

I have a file username.txt with one word in it. I have another file with template in it: <root> <user name="${username}"> </root> I need during ant build change template ${username} with content of file username.txt. How to do it? What ant task should I use for this purpose? ...

How to generate BlackBerry resource bundles from ant?

In my BlackBerry eclipse project I use resource bundles. So I have a pair of files... Application.rrc Application.rrh These files are compiled by a builder called BlackBerry Resources Builder in eclipse. This is done as a pre-compile step as it creates a new folder called .locale_interfaces which contains the following path to a g...

Is there an ant task to add a .war to an existing exploded ear

Have a build process that can't be edited and need to pack another war in the the ear that is generated. The ear is exploded so it's just a matter of copying the war file into it but the application.xml needs to be updated so I'd like to find an ant task that will do this. Anyone know of one that will work? ...

Performing Simple Calculations with Native Ant Tasks.

Using only native ANT tasks, how can I create a custom ANT task to do the following: Calculate the the number of days since January 1, 2000 local time and store it in a property. Calculate the number of seconds since midnight local time, divided by 2 and store it in a property. The above property values will then be appended to othe...

build.properties and build.xml

anyone can tell me the ant build (internal) procedure, and how build.properties info is used? by the way, I am opening a project with build.properties -- but the projects I was working on did not seem to have such a file (newbie question) can someone give me an intro? is that an eclipse generated file? ...

Ant; how to specify a file is executable so I don't have to chmod+x each time

When build my application with Ant, it produces a ZIP file. I have a sh file inside this zip, that is included as part of the build process. After each build I have to do chmod +x myFile.sh as ant fails to retain its original executable permissions. How can I instruct ant to keep executable permissions to this file? ...