I want to put a set of files that look like this into a jar:
yay/my.jar
boo/my.jar
foo/my.jar
bar/my.jar
In the process, I want all of them renamed as follows:
yay_my.jar
boo_my.jar
foo_my.jar
bar_my.jar
I was hoping to use a mapper to accomplish this, but the fileset elements I am using and the jar task don't seem to support it an...
I have a project that is mainly Java, but also uses some C, which is built into a DLL, using ant for the whole build. I want to add versioning, so that the same version is embedded in the jar files, and also in the dll files. For the jars it was simple, but how can I do this for the dlls?
I know you can embed different resources like a ...
Generally speaking, any ant task which accepts a will also accept several tags designating particular mappers: , , etc.
But if you're writing your own task, you are supposed to supply a method for each possible tag that may exist inside your task. You don't want to add separate addConfiguredMapper(), addConfiguredIdentityMapper(), add...
Hello!
I want to execute a command from an Ant buildfile, for each file in a directory.
I am looking for a platform-independent solution.
How do I do this?
Sure, I could write a script in some scripting language,
but this would add further dependencies to the project.
...
I have the following project structure:
root/
comp/
env/
version/
build.xml
build.xml
build.xml
Where root/comp/env/version/build.xml is:
<project name="comp-env-version" basedir=".">
<import file="../build.xml" optional="true" />
<echo>Comp Env Version tasks</echo>
...
The ant script snippet below is an attempt to simply output the time before and after each sql script is run. I cannot change the structure of the ant targets (create-tables must call run-sql-script just as it does). The problem is that the properties (time and time2) are immutable (http://ant.apache.org/manual/CoreTasks/property.html)...
Does anyone know how to recursively delete "empty" directories with ANT (empty includes directories that only contain ".svn" etc).
I know ant allows you to "includeEmptyDirs=true" but I want it to ONLY delete a directory if it is empty (and actually I'd probably need to walk up the recursive chain and delete the directory it was contain...
Given an ant fileset, I need to perform some sed-like manipulations on it, condense it to a multi-line string (with effectively one line per file), and output the result to a text file.
What ant task am I looking for?
...
I'm trying to compile down a set of plug-ins (ultimately OSGi bundles) into a feature using Eclipse PDE tools. I have a custom Target Platform based on the Spring framework.
When I export the feature through Eclipse's Export Wizard the feature builds successfully, however, when I try to generate an Ant build script from the feature.xml...
I am trying to exec a shell script like so in ant:
<exec executable="bash" newenvironment="false" dir="./">
<arg value="script.sh">
</exec>
But when it executes the script, all references to environment variables such as $MY_VARIABLE come back as the empty string. How do I get around this? According to http://ant.apache.org/manual/C...
I need to modify certain XML files, and possibly generate XML, in our build and deploy process, which runs on ant. Examples of what I might need to do would be eliminating certain elements based on the value of particular attributes, changing the values of attributes, adding attributes, and adding all new elements. I'm pretty familiar ...
Hi, I am trying to make an ant script for an EJB project. I am using Jboss for this.
I am new to both EJB and Ant and am having problems in getting the beans to compile from ant. It gives me number of errors of the kind
package javax.persistence does not exist
@MappedSuperclass - Cannot find symbol
I created it as an eclipse project ...
Hi,
I've got an ANT project with libs managed by ivy (they are under lib_managed). Eclipse is using the jars to. Probelm is: if I try to update the directory ant refuses to delete it because eclipse holds on to the jars in its classpath. Even if I update (empty) eclipses classpath I can't delete the files. If anyone had the same problem...
I need to be able to call a subant task on a prespecified list of project folders which may or may not be siblings.
I know I can call subant task like this:
<subant antfile="custom-build.xml" target="custom-target"
inheritall="false" failonerror="true">
<filelist dir="${parent.dir}">
<file name="project1"/>
<file nam...
How could I set ant property the value which is the result of bash script execution? For example, I need to have target which utilizes svn and bash utilities in order to control build execution. Speaking more specifically, target that I'm trying to create will be used to define, whether there are modified files in deployed application vi...
I need to compile a jar file using ant (1.7.0) to run under a specific version of Java (1.5). I currently have Java 1.6 on my machine. I have tried setting:
<target name="compile">
<javac compiler="javac1.5" target="1.5" srcdir=.../>
</target>
I have also removed
<property name="build.compiler" value="modern"/>
and there is no p...
Hello.
I have maven project and ant task for it.
In ant task i want to get version property from pom.xml.
How to get it?
In pom.xml: <version>2.03.010</version>
...
I'm trying to use xmltask for ant to modify a file in a subdirectory:
project/path/to/file.xml
The file refers to a DTD like this:
<!DOCTYPE data SYSTEM "mydtd.dtd">
I don't have the flexibility to change these documents.
This DTD is stored in the same subdirectory, which has always worked fine:
project/path/to/mydtd.dtd
Unfort...
Completely new to Ant and I have just a simple problem. I'm running ant with a input file: ant -Dargs="input.txt" run but it says it cannot find input.txt (No such file or directory). I have the build.xml file and input.txt in the same directory, above src and bin. Here is my build.xml file, am I missing something?
<project name="Pro...
I want to make a Javadoc from an ant build file, but I don't see where it is. In build.xml I have:
<description>
A sample build file for this project
</description>
<property name="source.dir" location="src"/>
<property name="build.dir" location="bin"/>
<property name="doc.dir" location="doc"/>
<property name="main.cla...