[AntUnit] Can I write the to a file?

2008-07-11 Thread Keith Hatton
Hi all, I'm trying to use the AntUnit framework to test some custom Ant tasks. Unfortunately it's proving very much a black box, and when a test fails I can't find any Ant log for the test case. I've read the AntUnit documentation on the resource, and I obviously didn't fully understand it. I'

RE: Using Ant in Java

2008-03-27 Thread Keith Hatton
There is a createArg() method which sounds like what you want. The manual included in the Ant download has API docs for all the tasks, as well as some general guidance for programming to the API. Hope this helps Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: task, inheritAll=false and ant.version property

2008-03-03 Thread Keith Hatton
released 1.7.1. https://issues.apache.org/bugzilla/show_bug.cgi?id=42263 Peter On Mon, Mar 3, 2008 at 9:53 AM, Keith Hatton <[EMAIL PROTECTED]> wrote: > It seems that something has changed between Ant 1.6.2 and 1.7.0 in the > way the ant.version property is handled when another b

task, inheritAll=false and ant.version property

2008-03-03 Thread Keith Hatton
It seems that something has changed between Ant 1.6.2 and 1.7.0 in the way the ant.version property is handled when another build file is invoked using the task. Given the following files: main-build.xml: Ant version is ${ant.version} sub-build.xml: Ant

called from a nested Ant session started with - not terminating?

2007-10-10 Thread Keith Hatton
Hi, Versions: Ant 1.6.2 and 1.6.5, Java 1.5.0_05. I have an Ant script that needs to call an Ant target with a different environment (specifically with a different -lib setting) so I use to run this in a separate process as follows (the -lib is removed from the arg sections here because the prob

RE: Is & a somehow special character to Ant?

2007-08-24 Thread Keith Hatton
You probably need to use the XML escape sequence "&" Hope this helps Keith -Original Message- From: Krzysztof Kucybala [mailto:[EMAIL PROTECTED] Sent: 24 August 2007 09:13 To: Ant Users List Subject: Is & a somehow special character to Ant? Hi, I'm trying to use the exec task to issu

How to achieve "if" and "unless"-style behaviour with macrodefs?

2007-07-30 Thread Keith Hatton
Hi, I have cases where it would be useful to call a macrodef if a property was set, but to skip it otherwise. If these were targets I could use the standard Ant if/unless attributes to achieve this behaviour, but macrodefs are called explicitly at certain points in the build file, rather than usi

RE: [SEC=UNCLASSIFIED] Ant filterset doesnot work

2007-03-01 Thread Keith Hatton
A favourite that trips me up is that the destination files are newer than the source files, so no copy actually happens. Maybe you need to add overwrite="true" to the ? Hope this helps, Keith -Original Message- From: jake_ryan [mailto:[EMAIL PROTECTED] Sent: 01 March 2007 16:14 To: user

RE: Does this work with Ant?

2007-02-14 Thread Keith Hatton
It sounds like a combination of and might meet your basic requirements, though you may have to provide your own condition implementation depending on what "the task" is. http://ant.apache.org/manual/index.html Keith -Original Message- From: Hans Schwaebli [mailto:[EMAIL PROTECTED] Sen

RE: Using SQL query result as a property, how?

2007-02-08 Thread Keith Hatton
Hi Hans, Can you rewrite your query so that it will produce output like PropertyName=388291 0 rows affected (e.g. you might write SELECT 'PropertyName=' || (your original column) FROM ...) Then you can write that output to a file and use to read it into a property (the "0 rows affected" line

RE: ANT task to process properties-files into static class

2007-01-03 Thread Keith Hatton
Two more robust solutions spring to mind: 1. You can use Properties.getProperty(String,String) to prevent your NPE. The first string is the property name, the second is a default value to be used when the property is not present. http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#ge

RE: Build jar files that contain other jar files

2006-11-01 Thread Keith Hatton
You can include other jars in the Class-Path entry of the manifest file of your jar, then just distribute all jars in the same folder (assuming you're allowed to distribute them). HTH Keith -Original Message- From: Peter DePasquale [mailto:[EMAIL PROTECTED] Sent: 01 November 2006 01:26

RE: How to use Qoutes with arg element

2006-09-11 Thread Keith Hatton
This should work. It's just like putting special characters into an HTML document. Please keep the thread on the mailing list. HTH Keith -Original Message- From: Nagender Malik [mailto:[EMAIL PROTECTED] Sent: 11 September 2006 13:50 To: Keith Hatton Subject: Re: How to use Q

RE: How to use Qoutes with arg element

2006-09-11 Thread Keith Hatton
" HTH Keith -Original Message- From: Nagender Malik [mailto:[EMAIL PROTECTED] Sent: 11 September 2006 13:41 To: Ant Group Subject: How to use Qoutes with arg element Hi All, How to use ""(quotes) in the elements: For example: Please suggest.. regards, Nagender -

Remove files from Zip?

2006-07-18 Thread Keith Hatton
Hi, I've had a look at the manual and not found anything to suggest that I can, but just wondered if there is a way to remove files from a zip when using ? I can see this isn't a "normal" requirement: what I want to do is add commons-logging-1.1.jar to the WEB-INF/lib folder of a WAR file, and

RE: ANT script fails to run when path contains '!'

2006-07-10 Thread Keith Hatton
This could be because the ! character indicates a resource within a JAR file. (see http://java.sun.com/j2se/1.5.0/docs/api/java/net/JarURLConnection.html) Hope this helps Keith -Original Message- From: madhuvanti joshi [mailto:[EMAIL PROTECTED] Sent: 10 July 2006 06:20 To: Ant Users Li

RE: SQL task - how to set collation (working with MySQL)

2006-06-27 Thread Keith Hatton
I think you need to specify that in the URL for the JDBC connection. http://dev.mysql.com/doc/refman/5.0/en/cj-configuration-properties.html It's really a MySQL/JDBC configuration question. Hope this helps Keith -Original Message- From: Eitan Gur [mailto:[EMAIL PROTECTED] Sent: 27 June

RE: How to handle RAR in Ant

2006-06-27 Thread Keith Hatton
RAR as in J2EE Resource ARchive file? Just use with and , and . Hope this helps Keith -Original Message- From: Leon Pu [mailto:[EMAIL PROTECTED] Sent: 27 June 2006 04:42 To: Ant Users List Subject: How to handle RAR in Ant Hi all, how to create and extract RAR file in Ant build scr

RE: SQL task output encoding

2006-05-04 Thread Keith Hatton
See the following: http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#cha renc "The default encoding is determined during virtual-machine startup and typically depends upon the locale and encoding being used by the underlying operating system." You can use -Dfile.encoding=xxx on

RE: Ant won't run, help interpreting output needed

2006-05-02 Thread Keith Hatton
Try running without a CLASSPATH environment variable. Maybe your CLASSPATH contains unquoted spaces (e.g., Program Files), or ends in a backslash character. Hope this helps Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 May 2006 15:50 To: user@ant.ap

RE: Javac: multiple source roots & filesets

2006-04-26 Thread Keith Hatton
Two possibilities that spring to mind: 1. the files you require from either source tree to a single working directory structure, then from there. 2. the generated files you don't want before invoking . As a general rule, I prefer introducing simplicity over hiding complexity, by which I mean

RE: Replace task value can't take less than sign.

2006-04-25 Thread Keith Hatton
XML escapes are just like HTML. So < = < > = > & = & etc. Keith -Original Message- From: Michael Atlas [mailto:[EMAIL PROTECTED] Sent: 25 April 2006 16:36 To: user@ant.apache.org Subject: Replace task value can't take less than sign. This is the task I am trying to run:

RE: forced update with war target

2006-03-30 Thread Keith Hatton
Option 1. the files before so that they will definitely have a newer timestamp. Option 2. the archive, the files to be replaced, then to create a new WAR file. Hope this helps Keith -Original Message- From: Torgeir Veimo [mailto:[EMAIL PROTECTED] Sent: 30 March 2006 14:35 To: user

RE: echo with html

2006-01-30 Thread Keith Hatton
Not sure if this is the problem, but you can use markers to escape the HTML within your build file. Hope this helps Keith -Original Message- From: Sommers, Elizabeth [mailto:[EMAIL PROTECTED] Sent: 30 January 2006 16:45 To: 'user@ant.apache.org' Subject: echo with html Does anybody h

Using mapper to rename files included in WAR

2006-01-24 Thread Keith Hatton
I'm using Ant 1.6.2 and I need to include deployment descriptor files in the WEB-INF section of my WAR file. However I need to rename them when I include them so that, for example, console-weblogic.xml becomes weblogic.xml and console-orion-web.xml becomes orion-web.xml. I skimmed the section on m

RE: Problems installing Ant under Linux Red Hat: can't find org.apache.ant.launch.Launcher class

2006-01-18 Thread Keith Hatton
Did you install Ant 1.6.5 yourself? This sounds like there may be multiple Ant installations - for example, one might be packaged with RedHat by default. Trying something like "which ant" might give you some help. FYI, in Ant 1.6 the Launcher class it's complaining about is in ANT_HOME/lib/ant-la

RE: Jboss start and stop scripts

2005-11-01 Thread Keith Hatton
ea? - Original Message - From: "Keith Hatton" <[EMAIL PROTECTED]> To: "Ant Users List" Sent: Tuesday, November 01, 2005 3:39 PM Subject: RE: Jboss start and stop scripts This works for me - on Windoze anyway, I'm sure you can

RE: Jboss start and stop scripts

2005-11-01 Thread Keith Hatton
This works for me - on Windoze anyway, I'm sure you can do something similar on other platforms. HTH Keith -Original Message- From: Andrei [mailto:[EMAIL PROTECTED] Sent: 01 November 2005 12:36 To: Ant Users List Subject: Re:

RE: possible to filter java packages not to run javancss on

2005-10-12 Thread Keith Hatton
You could only the files that should be included to a working directory and run from there. Hope this helps Keith -Original Message- From: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 13:41 To: user@ant.apache.org Subject: possible to filter java packages

RE: AW: Problem updating application.xml

2005-10-07 Thread Keith Hatton
I've had problems with updating JAR files in the past when the "updated" file is in fact older than the one already in the archive (and "older" may mean "newer within 2 seconds" on Windoze). So you may want to it first. Or as Jan suggested, do an , then for your application.xml, then it back

RE: [JUnit] fork mode other than "yes" ignores classpath

2005-09-02 Thread Keith Hatton
Hi Marcel, I don't think you are doing anything wrong, and I don't think it is necessarily a bug either. Generally -type elements are only used when Ant starts a new JVM (, , etc.), so this would require your or element to have a fork="true" attribute. However the Ant manual (http://ant.apac

RE: [Junit] How to handle TestSuites correctly

2005-08-30 Thread Keith Hatton
forkmode="once" will take care of that if you are using Ant 1.6.2+. Also, http://gsbase.sourceforge.net/ has a set of Junit extensions such as an OrderedTestSuite that might help you. (Of course, the purist approach says your unit tests should be independent of one another, but there can be times

RE: taskdef & log4j (precompiled jsp & jasper)

2005-07-13 Thread Keith Hatton
Do you simply need a that points to a directory where your properties file is? The you have defined consists solely of jar files. Hope this helps Keith -Original Message- From: Prasad Iyer [mailto:[EMAIL PROTECTED] Sent: 13 July 2005 12:01 To: user@ant.apache.org Subject: taskdef & lo

RE: problem:

2005-06-29 Thread Keith Hatton
Check the manual for ? Hope this helps Keith -Original Message- From: Nir Geier [mailto:[EMAIL PROTECTED] Sent: 29 June 2005 13:58 To: Ant Users List Subject: problem: hi again, im trying to use and I keep getting the following exception: (make no difference if there is no internal

RE: Junit Tests with depedencies - possible to determine order

2005-06-14 Thread Keith Hatton
I've found the GSBase extension for Junit (www.gargoylesoftware.com) useful for doing this sort of thing. It's simply a matter of returning a different implementation from the static suite() method in your test case class. I'm not aware of anything in Ant that does this specifically, though. Hope

RE: deployment of web app

2005-06-01 Thread Keith Hatton
I am not 100% sure that I have read your mail right but it sounds like your WEB-INF folder is at the wrong level, which would make everything else fail. (Are you using the task? This should make building the file quite easy). A war file should have the following structure (root) <=

RE: updating jar file with existing file: overwrite?

2005-05-16 Thread Keith Hatton
Andreas, update="true" can be used on etc. Make sure that the "new" versions of the files you wish to include really do have later date/time stamps as that is the basis for applying the update. Of course, underneath Ant is extracting and recreating the archive as you describe. Hope this helps Ke

RE:

2005-05-16 Thread Keith Hatton
The 'divide and conquer' strategy would be good here. What happens if you run Ant 1.6.3 on JDK 1.4? That way you will find out whether it's likely to be the JDK or the Ant release that has broken things. Hope this helps Keith -Original Message- From: Bevan Arps [mailto:[EMAIL PROTECTED]

RE: NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

2005-04-07 Thread Keith Hatton
Possibly ANT_HOME is wrong. Should be ANT_HOME=/usr/share/ant <== note, no /bin Then you'll need to change your path so that it is ANT_HOME/bin and so on. Hope this helps Keith -Original Message- From: mickeydog [mailto:[EMAIL PROTECTED] Sent: 07 April 2005 14:30 To: user@ant.apache.o

RE: MS Word automation

2005-03-15 Thread Keith Hatton
ct: RE: MS Word automation I thought of doing it from BSF but I don't know what language supports COM automation. I can't find VBScript on the BSF page. I was hoping to do it with Jython and am trying to get that to work. Thanks for the suggestion though! -David -Original Messag

RE: MS Word automation

2005-03-15 Thread Keith Hatton
Maybe user

RE: launching Ant from a perl script

2005-03-11 Thread Keith Hatton
Isn't there a runant.pl in your ANT_HOME/bin? -Original Message- From: John Cortell [mailto:[EMAIL PROTECTED] Sent: 11 March 2005 00:53 To: user@ant.apache.org Subject: launching Ant from a perl script Hi, I'm having a tough time figuring out how to get the return code from an Ant in

RE: IllegalAccessException

2005-03-10 Thread Keith Hatton
, though it might not work if your OS is particularly obscure. >> Remember, I'm new to ant. Remember, There's a Fine Manual. http://ant.apache.org/manual/index.html -Original Message- From: Payette, Don J [mailto:[EMAIL PROTECTED] Sent: 10 March 2005 15:44 To: Ant Users List Subject: R

RE: Output for running a windows service on Exec

2005-03-02 Thread Keith Hatton
Can you post your task? Are you 'ing the .exe file? If it's a service, the command to start it would be "net start ServiceName" - not sure whether "net" is a valid target for or whether it has to be started with "cmd" ... Hope this helps Keith -Original Message- From: Robert Lin [mailt

RE: if junit batchtest is skipped also skip junitreport?

2005-03-01 Thread Keith Hatton
could in theory have run some tests, all of them failing. But what's the point of running the report when you have no input ;-) Which is why I say it's not really a flaw. The fact that missed such 'crashing' failures may have been fixed I think, as I vaguely recall a bug about

RE: if junit batchtest is skipped also skip junitreport?

2005-02-28 Thread Keith Hatton
I recently did this but was unable to do it with a purely macrodef-based approach. The gist of my solution was to define the fileset generated by Junit. Then check if it was actually there: Then only do the junitreport if the property was set:

RE: Two targets with the same depends-target

2005-02-14 Thread Keith Hatton
Keith -Original Message- From: Kasparek, Bernadette [mailto:[EMAIL PROTECTED] Sent: 14 February 2005 12:51 To: 'Ant Users List' Subject: AW: Two targets with the same depends-target I need the following behavivor: Ant all --> common, one, common, two What can I do? Ber

RE: AW: How can I set last modified date in html files using ant?

2005-02-10 Thread Keith Hatton
http://ant.apache.org/manual/index.html Ant Tasks -> Optional Tasks -> Script Be careful about the library dependencies - exactly which version of BSF/Rhino you need will depend on which version of Ant you have (that link currently points to the 1.6.2 manual). Keith -Original Message- >

RE: Uff VSS, hanging

2005-01-28 Thread Keith Hatton
Hi Pritesh, You need serverPath="\\your-vss-server\vss-share\path\to\vss" in your Ant task. This path must be where the srcsafe.ini file is *on the server*. Hope this helps Keith -Original Message- From: Pritesh Saharey [mailto:[EMAIL PROTECTED] Sent: 28 January 2005 07:00 To: Ant Users

RE: Any way to get at the machine name?

2005-01-25 Thread Keith Hatton
It's all the environment variables that are currently set. In Windoze, type SET at a Command Prompt. Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 January 2005 16:59 To: user@ant.apache.org Subject: Re: Any way to get at the machine name? James Ab

RE: passing parameters to ant

2005-01-11 Thread Keith Hatton
Shouldn't the -D... settings go immediately after "ant" and before "-buildfile ..."? Keith -Original Message- From: Radha Sangal [mailto:[EMAIL PROTECTED] Sent: 11 January 2005 16:01 To: Ant Users List Subject: RE: passing parameters to ant Changed command line : cmd /c ant -buildfile

RE: Automatic way to convert from DOS to Unix line endings?

2005-01-10 Thread Keith Hatton
See the manual for the FixCRLF task. http://ant.apache.org/manual/CoreTasks/fixcrlf.html Hope this helps Keith -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: 10 January 2005 17:40 To: user@ant.apache.org Subject: Automatic way to convert from DOS to Unix line endings

RE: and Processor Version

2004-12-16 Thread Keith Hatton
Looks like you have some (but not all) weblogic stuff in your CLASSPATH. I would try removing that and see what happens. Keith -Original Message- From: Arro [mailto:[EMAIL PROTECTED] Sent: 15 December 2004 20:02 To: [EMAIL PROTECTED] Subject: and Processor Version I have been getting

RE: script task using java

2004-12-07 Thread Keith Hatton
to 'cast' to a build exception ? *** throw new BuildException(e); *** -> OK to use coma separated values for one property ? *** yes Peter Keith Hatton wrote: >Yeah, the .* is wrong and you have a typo in the third import (no . between >Packages and java). >

RE: script task using java

2004-12-07 Thread Keith Hatton
eas ? Gilbert -Original Message- From: Keith Hatton [<a href="mailto:[EMAIL">mailto:[EMAIL</a> PROTECTED] Sent: Tuesday, December 07, 2004 12:50 PM To: Ant Users List Subject: RE: script task using java importPackage(Packages.java.lang); etc. Keith -O

RE: script task using java

2004-12-07 Thread Keith Hatton
importPackage(Packages.java.lang); etc. Keith -Original Message- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 11:47 To: ant_user (E-Mail) Subject: script task using java Hi, i want to use an existing regex class into my build script. This is my first try usi

RE: Java task - jar woes but classname goes

2004-07-16 Thread Keith Hatton
Hi Geoff, >From the JDK Tool docs: java -jar ... "When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored." If you want to launch an application using java -jar, then build that jar file with a Class-Path entry in its manifest.

RE: how to automate the java2wsdl using ant?

2004-07-01 Thread Keith Hatton
Does your build.xml file contain a for axis-wsdl2java (the last bullet point on the output from Ant)? Assuming ${dir.lib.axis} is the directory where your Axis jars are, ... -Original Message- From: Lalith Weerasinghe [mailto:[EMAIL PROTECTED] Sent: 30 June 2004 17:22 To: [

RE: ant war task bug?

2004-04-07 Thread Keith Hatton
>> Also, I was under the impression that the standard WEB-INF directory must be in upper case, but the ant war task changes it to lower case. Is this related to my problem? Does it matter? << WEB-INF is correct, and that is what Ant does. But be aware that WinZip often displays this directory as

RE: War update = true

2004-02-25 Thread Keith Hatton
-Original Message- >> So when is war/uptodate="true" valuable (or >> zip/jar/war/ear for that >> matter)? >> >Ya got me. ;) Maybe when you just want to add files >to an archive and they don't all exist in an >uncompressed form? Otherwise, someone might just have >a preference to update

RE: Ant 1.6 and JUnit - NoClassDefFoundError

2004-01-07 Thread Keith Hatton
0, Errors: 0, Time elapsed: 0.016 sec [junit] Testcase: testAdd took 0.016 sec [junit] Testcase: testSubtract took 0 sec [junit] Testcase: testMultiply took 0 sec [junit] Testcase: testDivide took 0 sec BUILD SUCCESSFUL Total time: 1 second C:\TanguyLand> Keith Hatton wrote: &

Ant 1.6 and JUnit - NoClassDefFoundError

2004-01-07 Thread Keith Hatton
I'm just taking a look at Ant 1.6 and I'm having a problem with a build file that works fine in 1.5.3. java -version gives 1.3.1 ant -version gives 1.6 The only changes to the standard installation is that I've copied junit.jar and xalan.jar into ANT_HOME/lib (which I did for Ant 1.5) - prior t

RE: ANT arithmetic operation task ?

2003-12-12 Thread Keith Hatton
Perhaps you can use

RE: javadoc of multiple sub-projects

2003-11-14 Thread Keith Hatton
Hi Svetlin, As a work-around, could you all the source trees to a single temporary location, and run from there? Keith -Original Message- From: Svetlin Stanchev [mailto:[EMAIL PROTECTED] Sent: 14 November 2003 13:58 To: 'Ant Users List' Subject: RE: javadoc of multiple sub-projects

Generating build.xml

2003-08-22 Thread Keith Hatton
Hi all, Is there any way to generate the build.xml file for a corresponding Project object (other than by hand)? The specific thing I am trying to do is to use Ant as an installer. The idea is, as I collect user responses, I can build the Project and its Targets on the fly. And as I go, I can

RE: perl task?

2003-08-22 Thread Keith Hatton
Doesn't

RE: How to use VSS from script running on linux..?

2003-06-23 Thread Keith Hatton
Could you telnet to a Windoze box and run VSS from there? Perhaps with a Samba share back to the Linux box? Never tried it, but maybe Rant (Remote Ant) is worth a look? Keith -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 17:34 To: Ant Users List Subj

RE: Ant newbie fun

2003-06-17 Thread Keith Hatton
Your properties should either be in Java properties file format (name=value) or XML format. The example you give below is neither. If that doesn't help, suggest you post the properties file and build.xml for us to look at. Hope this helps Keith -Original Message- From: Neil Walsh [mai

RE: *.java to *.class?

2003-04-02 Thread Keith Hatton
Hi Todor, I think you need the element - look in the Ant docs for File Mappers. Something like Hope this helps Keith -Original Message- From: Todor Boev [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 16:59 To: Ant Users List Subject: *.java to *.class? Hello all, Assume I have a file

RE: Strange javac behaviour

2003-02-13 Thread Keith Hatton
1. What does javac do from the command line, in the same circumstances? 2. The "obvious" thing is that one or more classes in your ejb package reference classes in the other packages, which reference other classes ... which ends up with 155 classes being compiled. Running ant with -debug or java

FW: Spamarrest

2003-02-11 Thread Keith Hatton
CTED]] Sent: 11 February 2003 09:37 To: Keith Hatton Subject: RE: RE: Missing & misleading documentation, help needed on advanced Jar functionality (verification) This is a spam mail prevention service. Just this once, click the link below so I can receive your emails. You won't have t

RE: Missing & misleading documentation, help needed on advanced Jar functionality

2003-02-11 Thread Keith Hatton
I wouldn't try to make your application into one single jar file. IMHO, it's better to have *your* class files in a jar file whose manifest contains "Class-Path" entries pointing to the other jars your application requires. Then there's no confusion about who supplies which class file, versionin