I'm going to post a question that I've seen variants of elsewhere, but where I've not quite seen the answer I came up with. I'll subsequently post my answer.
In order to modularize my build script using macros, I would like to put both the updatetask and the task I want to execute if it is not up to date, in the same macro.
How do I do...
I have close to about 20 projects in my Eclipse workspace.
They are interdependent.
Now I want to build all of them in a single war file.
The thing is eclipse does it nicely... if I create a Dynamic Web Project and link sources of all the 20 projects.
But I want to automate the entire process and want to be able to run a script (ant mayb...
Here is my ivy.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
...
<dependencies>
<dependency org="spring" name="richclient" rev="1.1.0"/>
</dependencies>
</ivy-module>
And ivy-settings.xml:
<property name="ivy.local.default.root" value="/home/---/dev/Java/_libraries/_ivy" override="false"/>
<...
Is there a way to detect freeBSD with ant. I used os.name it shows it as linux. I want to differentiate between freeBSD and linux.
...
can any one help me
how to copy file from unix Windoes system to windows UNIX using ant?
Thanks in advance
EDIT
Let me explain in detail what I am looking for I want to copy file from windows to unix machine (correcting my previous question not from unix to windows) using ANT. I thought of using ftp task.
Before that as a check I ...
I'm starting a project that involves writing mailets for Apache James. As far as I can tell, the only way to test a change in my code (on Windows) is through the following steps:
Compile the mailet code
Build a jar file containing the mailet
Copy the jar file into the apps/james/SAR-INF/lib directory
Start JAMES from run.bat
Run test
S...
I'm interested in any way that I can create an Ant task to checkout files from SubVersion. I "just" want to do the checkout from the command line. I've been using Eclipse with Ant and SubVersion for a while now, but my Ant and SubVersion knowledge is somewhat lacking as I relied on Eclipse to wire it all together.
I've been looking at S...
I'm trying to start a server as part of an Ant artifact.
Here are the relevant lines:
<exec dir="." executable="cmd.exe" spawn="true">
<arg line="/c c:\Java\james-2.3.2\bin\debug.bat" />
</exec>
If I start it with ant from the command line, a process is spawned and I get a command prompt and everything seems fine. Ho...
Hi folks
I need to delete a directory in unix and create a new one - all should be part of ant task in windows machine
Thanks
Vishu
...
Hey folks,
There's a lot of discussion about Ant and Eclipse, but no previously answered seems to help me.
Here's the deal: I am trying to build a Java program that compiles successfully with Ant from the command-line. (To confuse matters further, the program I am attempting to compile is Ant itself.)
What I really want to do is to br...
I'm fairly new to both Apache Ant and GCJ, and I'm having a hard time trying to build with GCJ via Ant.
My app is in Scala, so I need to use GCJ to take .class files as source. No problem compiling .scala to .class with Ant.
First I figured out how to manually compile a .class file to .o (object), this way:
gcj --classpath=(...) -c (...
How do I add a new directory into my CVS repository using Ant? From all that I've read, it appears that I have to cd to the parent directory and call the cvs command. How do I do that in Ant? I've seen approaches where an to cd is called in Ant; is that the best approach?
Eg of what I am trying to do:
Let's say I have a module Test_Mod...
Hi,
I have a java class and I need to debug it (put breakpoints and continue using F6). I am using ANT script to init, build, deploy and run the code. I am using:
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,vars,source">
..........
</javac>
But when I place the breakpoint in a line in my foo.j...
Is there any way to strip elements out of a web.xml file using ANT?
For example I have certain servlets I use for Unit Testing defined in the web.xml that are unnecessary in the production environment is there a way to strip these out or do I need to have a separate production web.xml file?
Thank You.
...
Imagine this as the code from build.xml:
<project name="test project">
<target name="first">
<echo>first</echo>
</target>
<target name="second" depends="first">
<echo>second</echo>
</target>
<target name="third" depends="first,second">
<echo>third</echo>
</target>
</project>
What do I ne...
Let's say I have this in one of my targets:
<path id="files">
<fileset dir="${env.DIRECTORY}" casesensitive="false">
<include name="**/*.html"/>
<exclude name="**/*ant*"/>
</fileset>
</path>
I'd like to group all the html files, except the ones containing the string ant. The way I wrote it above, it does not work. I a...
Is there a way except the sshexec task to do this? I know that you can copy files with the scp task. However, I need to do additional things like check if some folders are there then delete them. I would like to use something like the condition task and delete task for this. For now I have set it up with the sshexec task. But this will m...
I'm using an Ant build script for my project developed in Eclipse 3.4.2. It's actually a Flex 4 project (using Flash Builder Eclipse Plug-in).
Everything worked ok. But someday something happened and now the executions of Ant build script is silently terminated each time I run it.
When trying to debug Ant script the IDE stops for a mom...
Let's say I copy some files with ant, from a network drive:
<copy todir="." verbose="true">
<fileset dir="some_directory" includes="**/*"/>
</copy>
Let's say I test if the folder exists first.
<available file="${dir.local}" property="dir.exists"/>
If I have the folder on my computer, I would like to only copy the files that are ...
Example input:
SERVER_NAME=server1
PROFILE_NAME=profile1
...
Example output:
SERVER_NAME=server3
PROFILE_NAME=profile3
...
This file will use in applicationContext.xml. I've tried
<copy file="${web.dir}/jexamples.css_tpl"
tofile="${web.dir}/jexamples.css" >
<filterchain>
<replacetokens>
<token key="...