RE: The good ol' JUnit problem

2005-11-08 Thread Jon Skeet
> This is a similar issue with the xalan classes in the 1.4 jdk. 
> they're exposed directly by sun (and other jvm's) as org.apache.*. 
> basically they just imported xalan and possibly other apache 
> classes into the jvm.  this gives your entire application 
> (jvm) one chance to override the version used by using the 
> extensions folder.  not very good when you have multiple web 
> applications that each need a specific version of xalan or 
> what not.  i believe sun has fixed this issue in
> 1.5 jdk's with a method similar to what i did to get optional 
> ant tasks work w/o modifying the target environment.



Thanks - I'll bear it in mind as an option. I think for the moment it'll
be easier just to copy junit into place and accept that the very first
build on a clean system won't work (or will need to bootstrap itself
somehow).

> it's nice that ant provides tasks for things they can't or 
> won't bundle with their distribution, but i would really like 
> to see ant distributed at least with the same tasks able to 
> be defined externally.  i'd be more than willing to help with 
> this.  what i would envision is ant providing in addition to 
> it's ant/lib folder, a ant/lib/external folder or perhaps an 
> ant/external/lib folder that contains the same tasks in an 
> external.org.apache name space.  this external lib folder 
> would not be loaded by the default ant classloader, but would 
> be available for users to include libs as
> needed.i don't like much the  .vs.  issue, and it
> would be very nice if both taskdefs could define a  or 
>  task w/o any collision.  i'm not sure how that would work.

I think if Ant provided a property for its "home" location (it doesn't
now, does it? I suppose ${env.ANT_HOME} works, but it's hardly neat),
that's all that would be required. Have the jar files somewhere they're
not loaded by default, and we could easily taskdef using a classpath
which included the right libraries.

Perhaps there should be multiple distributions, even - one "bundled" one
and one without any of the optional tasks. Obviously it's easy enough to
modify a distribution so that it doesn't have things, but for ease of
upgrade, being able to take a "stock" distribution is important.

Jon


Clearswift monitors, controls and protects all its messaging traffic in 
compliance with its corporate email policy using Clearswift products.
Find out more about Clearswift, its solutions and services at 
http://www.clearswift.com

This communication is confidential and may contain privileged information 
intended solely for the named addressee(s). It may not be used or disclosed 
except for the purpose for which it has been sent. If you are not the intended 
recipient, you must not copy, distribute or take any action in reliance on it. 
Unless expressly stated, opinions in this message are those of the individual 
sender and not of Clearswift. If you have received this communication in error, 
please notify Clearswift by emailing [EMAIL PROTECTED] quoting the sender and 
delete the message and any attached documents. Clearswift accepts no liability 
or responsibility for any onward transmission or use of emails and attachments 
having left the Clearswift domain.

This footnote confirms that this email message has been swept by MIMEsweeper 
for Content Security threats, including computer viruses.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Issue using ReplaceRegExp

2005-11-08 Thread pritesh.saharey

I tried using the pattern something like this;







But I am seeing no changes in my log.txt file altough now I am not getting any 
error message and ant console output is showing me

try-rep:
[replaceregexp] Replacing pattern '/\[java\] parts created:' with 'Size=' in 
'D:\pvcsAnt\log.txt' by line.

I am totally confused with this ReplaceRegExp
Like to know does the changes will be reflected in the same file (i.e. log.txt) 
file, and I would be able to see "Size=11" instead of "[java] parts created:"?

Can anyone give a snipet of code for this problem, I will be thankful to you.

--Pritesh


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 21, 2005 6:58 PM
To: user@ant.apache.org
Subject: AW: Issue using ReplaceRegExp

Regexp could something around
   /.*parts created: (.*)$/\1

But the "No supported regular expression matcher found" error message is more 
important.
The matcher is part of JDK 1.4+, but because Ant is designed to run on JDK 1.2+ 
we have a word on library depenencies in the manual.


Jan


>-Ursprüngliche Nachricht-
>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Gesendet: Freitag, 21. Oktober 2005 15:09
>An: user@ant.apache.org
>Betreff: Issue using ReplaceRegExp
>
>
>Hi All,
> I am trying to use ReplaceRegExp but finding it difficult to
>cope with it.
>
>There is a log.txt file generated from my build.xml using record task
>which looks like this;
>log.txt
>---
>   [java] Done!
>  [java]
>
>  [java] bytes read: 111059499
>  [java] bytes written: 111059499
>  [java] parts created: 11
>  [java] time used: 46.562 sec.
>
>
>   Now I wanted to use the value of "parts created" which is "11"
>but I am not able to use ReplaceRegExp properly
>
>   It is giving me error message:
>
>
>   No supported regular expression matcher found
>
>   I am using jdk1.3.1_11
>
>
>   I noticed one thing before [java] text there are 5spaces
>
>   The whole idea is that I wanted to use this log.txt file as a property
>file, which I am unable to, and as a
>
>   Experiment I have done something like this in my build.xml file
>
>   
>   
>  match="[java]"
>  replace="\0${insert}"
>  byline="true">
>   
>   
>
>If I want to use this log.txt file as a property file than I
>think I have to replace the strings till : (colon)
>
>  Can anyone help me out?
>
>  Wishes
>  Pritesh
>
>
>
>Confidentiality Notice
>
>
>The information contained in this electronic message and any
>attachments to this message are intended for the exclusive use of the
>addressee(s) and may contain confidential or privileged information. If
>you are not the intended recipient, please notify the sender at Wipro
>or [EMAIL PROTECTED] immediately and destroy all copies of this
>message and any attachments.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
>commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The good ol' JUnit problem

2005-11-08 Thread Steve Loughran

Jon Skeet wrote:
This is a similar issue with the xalan classes in the 1.4 jdk. 
they're exposed directly by sun (and other jvm's) as org.apache.*. 
basically they just imported xalan and possibly other apache 
classes into the jvm.  this gives your entire application 
(jvm) one chance to override the version used by using the 
extensions folder.  not very good when you have multiple web 
applications that each need a specific version of xalan or 
what not.  i believe sun has fixed this issue in
1.5 jdk's with a method similar to what i did to get optional 
ant tasks work w/o modifying the target environment.





Thanks - I'll bear it in mind as an option. I think for the moment it'll
be easier just to copy junit into place and accept that the very first
build on a clean system won't work (or will need to bootstrap itself
somehow).


it's nice that ant provides tasks for things they can't or 
won't bundle with their distribution, but i would really like 
to see ant distributed at least with the same tasks able to 
be defined externally.  i'd be more than willing to help with 
this.  what i would envision is ant providing in addition to 
it's ant/lib folder, a ant/lib/external folder or perhaps an 
ant/external/lib folder that contains the same tasks in an 
external.org.apache name space.  this external lib folder 
would not be loaded by the default ant classloader, but would 
be available for users to include libs as

needed.i don't like much the  .vs.  issue, and it
would be very nice if both taskdefs could define a  or 
 task w/o any collision.  i'm not sure how that would work.



I think if Ant provided a property for its "home" location (it doesn't
now, does it? I suppose ${env.ANT_HOME} works, but it's hardly neat),
that's all that would be required. Have the jar files somewhere they're
not loaded by default, and we could easily taskdef using a classpath
which included the right libraries.


${ant.home}/lib
${user.home}/.ant/lib




Perhaps there should be multiple distributions, even - one "bundled" one
and one without any of the optional tasks. Obviously it's easy enough to
modify a distribution so that it doesn't have things, but for ease of
upgrade, being able to take a "stock" distribution is important.


fetch.xml in the cvs head bootstraps in maven2's library tasks and uses 
that to retrieve other things.


-steve

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: The good ol' JUnit problem

2005-11-08 Thread Jon Skeet
Steve wrote:
> ${ant.home}/lib
> ${user.home}/.ant/lib

Having just checked the source, it's even easier than that (for the
first one): ${ant.library.dir}

Both ant.home and ant.library.dir work from Eclipse, too, which I had
worried about a little bit...

Assuming I actually *do* still have write-access, shall I add these two
properties to the manual in SVN?

Jon


Clearswift monitors, controls and protects all its messaging traffic in 
compliance with its corporate email policy using Clearswift products.
Find out more about Clearswift, its solutions and services at 
http://www.clearswift.com

This communication is confidential and may contain privileged information 
intended solely for the named addressee(s). It may not be used or disclosed 
except for the purpose for which it has been sent. If you are not the intended 
recipient, you must not copy, distribute or take any action in reliance on it. 
Unless expressly stated, opinions in this message are those of the individual 
sender and not of Clearswift. If you have received this communication in error, 
please notify Clearswift by emailing [EMAIL PROTECTED] quoting the sender and 
delete the message and any attached documents. Clearswift accepts no liability 
or responsibility for any onward transmission or use of emails and attachments 
having left the Clearswift domain.

This footnote confirms that this email message has been swept by MIMEsweeper 
for Content Security threats, including computer viruses.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The good ol' JUnit problem

2005-11-08 Thread Steve Loughran

Jon Skeet wrote:

Steve wrote:


${ant.home}/lib
${user.home}/.ant/lib



Having just checked the source, it's even easier than that (for the
first one): ${ant.library.dir}

Both ant.home and ant.library.dir work from Eclipse, too, which I had
worried about a little bit...

Assuming I actually *do* still have write-access, shall I add these two
properties to the manual in SVN?



yes please!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: The good ol' JUnit problem

2005-11-08 Thread Jon Skeet
Steve wrote (replying to me):

> > I think if Ant provided a property for its "home" location 



> ${ant.home}/lib
> ${user.home}/.ant/lib

You star. Could I suggest that ant.home should be added to the manual?
(I did look on the website first, honest!) I suppose I could just edit
it in CVS myself - dangerous path to start down, of course...

> > Perhaps there should be multiple distributions, even - one 
> "bundled" one
> > and one without any of the optional tasks. Obviously it's 
> easy enough to
> > modify a distribution so that it doesn't have things, but 
> for ease of
> > upgrade, being able to take a "stock" distribution is important.
> 
> fetch.xml in the cvs head bootstraps in maven2's library 
> tasks and uses that to retrieve other things.

I'll have a look; the trouble is that if you add the jar file mid-build,
that  jar isn't added to the core classloader (for obvious reasons).
I'll investigate whether using an  task after doing the copy does
the right thing - if it does, then a bootstrapping layer would sort me
out.

I still think it would be nice to separate things out :)
(Maybe that's what you were saying and I'm just being dense though...)

Jon


Clearswift monitors, controls and protects all its messaging traffic in 
compliance with its corporate email policy using Clearswift products.
Find out more about Clearswift, its solutions and services at 
http://www.clearswift.com

This communication is confidential and may contain privileged information 
intended solely for the named addressee(s). It may not be used or disclosed 
except for the purpose for which it has been sent. If you are not the intended 
recipient, you must not copy, distribute or take any action in reliance on it. 
Unless expressly stated, opinions in this message are those of the individual 
sender and not of Clearswift. If you have received this communication in error, 
please notify Clearswift by emailing [EMAIL PROTECTED] quoting the sender and 
delete the message and any attached documents. Clearswift accepts no liability 
or responsibility for any onward transmission or use of emails and attachments 
having left the Clearswift domain.

This footnote confirms that this email message has been swept by MIMEsweeper 
for Content Security threats, including computer viruses.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue using ReplaceRegExp

2005-11-08 Thread Andrew Goktepe
Remove the leading forward slash character in your pattern:
 
 -Andrew
 On 11/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I tried using the pattern something like this;
>
> 
>  byline="true">
>
> 
> 
> 
> But I am seeing no changes in my log.txt file altough now I am not getting
> any error message and ant console output is showing me
>
> try-rep:
> [replaceregexp] Replacing pattern '/\[java\] parts created:' with 'Size='
> in 'D:\pvcsAnt\log.txt' by line.
>
> I am totally confused with this ReplaceRegExp
> Like to know does the changes will be reflected in the same file (i.e.
> log.txt) file, and I would be able to see "Size=11" instead of "[java]
> parts created:"?
>
> Can anyone give a snipet of code for this problem, I will be thankful to
> you.
>
> --Pritesh
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 21, 2005 6:58 PM
> To: user@ant.apache.org
> Subject: AW: Issue using ReplaceRegExp
>
> Regexp could something around
> /.*parts created: (.*)$/\1
>
> But the "No supported regular expression matcher found" error message is
> more important.
> The matcher is part of JDK 1.4+, but because Ant is designed to run on JDK
> 1.2+ we have a word on library depenencies in the manual.
>
>
> Jan
>
>
> >-Ursprüngliche Nachricht-
> >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Gesendet: Freitag, 21. Oktober 2005 15:09
> >An: user@ant.apache.org
> >Betreff: Issue using ReplaceRegExp
> >
> >
> >Hi All,
> > I am trying to use ReplaceRegExp but finding it difficult to
> >cope with it.
> >
> > There is a log.txt file generated from my build.xml using record task
> >which looks like this;
> > log.txt
> > ---
> > [java] Done!
> > [java]
> >
> > [java] bytes read: 111059499
> > [java] bytes written: 111059499
> > [java] parts created: 11
> > [java] time used: 46.562 sec.
> >
> >
> > Now I wanted to use the value of "parts created" which is "11"
> >but I am not able to use ReplaceRegExp properly
> >
> > It is giving me error message:
> >
> >
> > No supported regular expression matcher found
> >
> > I am using jdk1.3.1_11
> >
> >
> > I noticed one thing before [java] text there are 5spaces
> >
> > The whole idea is that I wanted to use this log.txt file as a property
> >file, which I am unable to, and as a
> >
> > Experiment I have done something like this in my build.xml file
> >
> > 
> >  >
> > match="[java]"
> > replace="\0${insert}"
> > byline="true">
> > 
> > 
> >
> > If I want to use this log.txt file as a property file than I
> >think I have to replace the strings till : (colon)
> >
> > Can anyone help me out?
> >
> > Wishes
> > Pritesh
> >
> >
> >
> >Confidentiality Notice
> >
> >
> >The information contained in this electronic message and any
> >attachments to this message are intended for the exclusive use of the
> >addressee(s) and may contain confidential or privileged information. If
> >you are not the intended recipient, please notify the sender at Wipro
> >or [EMAIL PROTECTED] immediately and destroy all copies of this
> >message and any attachments.
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
> >commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
> commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> Confidentiality Notice
>
> The information contained in this electronic message and any attachments
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or
> [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: The good ol' JUnit problem

2005-11-08 Thread Matt Benson


--- Steve Loughran <[EMAIL PROTECTED]> wrote:

> Jon Skeet wrote:
> > Steve wrote:
> > 
> >>${ant.home}/lib
> >>${user.home}/.ant/lib
> > 
> > 
> > Having just checked the source, it's even easier
> than that (for the
> > first one): ${ant.library.dir}
> > 
> > Both ant.home and ant.library.dir work from
> Eclipse, too, which I had
> > worried about a little bit...
> > 
> > Assuming I actually *do* still have write-access,
> shall I add these two
> > properties to the manual in SVN?
> > 
> 
> yes please!

FYI ${ant.home} is documented on
using.html#built-in-props

${ant.library.dir} should probably be documented
alongside it and share its caveat.

-Matt

> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: The good ol' JUnit problem

2005-11-08 Thread Jon Skeet
> FYI ${ant.home} is documented on
> using.html#built-in-props
> 
> ${ant.library.dir} should probably be documented alongside it 
> and share its caveat.

Yup - I noticed that when I dived into SVN. (It's not in the online
manual, which is what I was looking at before.)

I've made the change (as well as fixing up some HTML problems) and
mailed the file to Steve for check-in. It looks like I don't have SVN
access after all - either that, or I've got a different username or
password to before.

Jon


Clearswift monitors, controls and protects all its messaging traffic in 
compliance with its corporate email policy using Clearswift products.
Find out more about Clearswift, its solutions and services at 
http://www.clearswift.com

This communication is confidential and may contain privileged information 
intended solely for the named addressee(s). It may not be used or disclosed 
except for the purpose for which it has been sent. If you are not the intended 
recipient, you must not copy, distribute or take any action in reliance on it. 
Unless expressly stated, opinions in this message are those of the individual 
sender and not of Clearswift. If you have received this communication in error, 
please notify Clearswift by emailing [EMAIL PROTECTED] quoting the sender and 
delete the message and any attached documents. Clearswift accepts no liability 
or responsibility for any onward transmission or use of emails and attachments 
having left the Clearswift domain.

This footnote confirms that this email message has been swept by MIMEsweeper 
for Content Security threats, including computer viruses.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: The good ol' JUnit problem

2005-11-08 Thread Matt Benson
--- Jon Skeet <[EMAIL PROTECTED]> wrote:
[SNIP]
> I've made the change (as well as fixing up some HTML
> problems) and
> mailed the file to Steve for check-in. It looks like
> I don't have SVN
> access after all - either that, or I've got a
> different username or
> password to before.
> 

To commit to Apache svn you would first need to ssh
into svn.apache.org and run svnpasswd .  I'm not sure
about your access anyway, though.  I see from Jim
Jagielski's committers list that you are listed as a
committer, but you don't have any actual projects on
your list anymore.

-Matt

> Jon
> 
> 
> Clearswift monitors, controls and protects all its
> messaging traffic in compliance with its corporate
> email policy using Clearswift products.
> Find out more about Clearswift, its solutions and
> services at http://www.clearswift.com
> 
> This communication is confidential and may contain
> privileged information intended solely for the named
> addressee(s). It may not be used or disclosed except
> for the purpose for which it has been sent. If you
> are not the intended recipient, you must not copy,
> distribute or take any action in reliance on it.
> Unless expressly stated, opinions in this message
> are those of the individual sender and not of
> Clearswift. If you have received this communication
> in error, please notify Clearswift by emailing
> [EMAIL PROTECTED] quoting the sender and delete
> the message and any attached documents. Clearswift
> accepts no liability or responsibility for any
> onward transmission or use of emails and attachments
> having left the Clearswift domain.
> 
> This footnote confirms that this email message has
> been swept by MIMEsweeper for Content Security
> threats, including computer viruses.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to reuse a fileset as a Class-Path in a manifest

2005-11-08 Thread Clifton Craig
Hello All:

I'm trying to re-use a fileset pointing to a lib folder containing all of my 
jars as a manifest Class-Path entry for my project. In short, my approach is 
to declare a property referencing the fileset object id. This gives me a 
value such as this: 

swixml.jar;jdom.jar

I am then looking to declare a manifest entry for my projects resulting jar 
that looks like this:

Class-Path: swixml.jar jdom.jar

If I use the  task I get the absolute path of each entry in the 
list as it is relative to my project folder. For example I'll get this:

Class-Path: /home/ccc/IdeaProjects/myproj/swixml.jar 
/home/ccc/IdeaProjects/myproj/jdom.jar 

I don't want to use any complexity or trickery to acheive my result (for 
example a custom task or a script task) but I just don't see any other way. 
I'm hoping to keep my build file relatively simple as I am trying to create 
some standard practices for my team. Is there a better way?

-- 
Clifton C. Craig, Software Engineer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problems creating war file

2005-11-08 Thread Lothar Krenzien

Hi there,

I'm trying to create a war file using the Ant war-task. The creted file seems 
to be ok but all the files under WEB-INF/classes and WEB-INF/lib exists twice 
or even 3-times (with the same name in the same dir). Of course I can skip the 
duplicate files but it confuse me ;)

My app looks like (for testing reasons I'm using a temporay directory) :

C:\Temp\ant-test\application
|
| src
|   |
|   -- com 
|
| web
|   |
|    css / js / jsp / Meta-INF / Web-INF ...
|
| deployment (temporary working dir)

The Ant script copies all files under src/com and web to the deployment dir, 
compiles the classes (put it under the Web-INF/classes) and then building a 
war-archive using the Ant war-task.

Here's my Ant script:













The created war-file looks like :

|
| -- css
|
| -- js
|
| -- jsp
|
| -- Web-INF
| |
| | -- classes
|
|
| -- Meta-INF

and so on.

Thanks, Lothar


__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems creating war file

2005-11-08 Thread Andrew Goktepe
Use the 'duplicate' attribute of the  task to prevent this.
http://ant.apache.org/manual/CoreTasks/war.html
 If you set duplicate="fail" then the task will fail if it finds duplicates.
You can use this to fix any unnecessary redundancy in the source paths. If
the duplicates in the source paths are needed, then look at the other
possible values for 'duplicate', such as "preserve".
 -Andrew
 On 11/8/05, Lothar Krenzien <[EMAIL PROTECTED]> wrote:
>
>
> Hi there,
>
> I'm trying to create a war file using the Ant war-task. The creted file
> seems to be ok but all the files under WEB-INF/classes and WEB-INF/lib
> exists twice or even 3-times (with the same name in the same dir). Of course
> I can skip the duplicate files but it confuse me ;)
>
> My app looks like (for testing reasons I'm using a temporay directory) :
>
> C:\Temp\ant-test\application
> |
> | src
> | |
> | -- com 
> |
> | web
> | |
> |  css / js / jsp / Meta-INF / Web-INF ...
> |
> | deployment (temporary working dir)
>
> The Ant script copies all files under src/com and web to the deployment
> dir, compiles the classes (put it under the Web-INF/classes) and then
> building a war-archive using the Ant war-task.
>
> Here's my Ant script:
>
>  webxml="${outDir}/web/conergy/WEB-INF/web.xml">
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> The created war-file looks like :
> 
> |
> | -- css
> |
> | -- js
> |
> | -- jsp
> |
> | -- Web-INF
> | |
> | | -- classes
> |
> |
> | -- Meta-INF
>
> and so on.
>
> Thanks, Lothar
>
>
> __
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE  FreeMail: http://f.web.de/?mc=021193
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: problems creating war file

2005-11-08 Thread Clifton Craig
It looks like you got some redundancy in your war task there. You're grabbing 
everything under ${outDir}/web/webapp/WEB-INF with the  subelement 
and then you're going out and specifically grabbing the lib and classes 
folders under your ${outDir}/web/webapp/WEB-INF folder with the lib and 
classes subelements respectively. If you want to get rid of the duplicates 
remove either the  sub element or both the  and  sub 
elements. Of course you can result to what Andrew says in his reply as well.
-- 
Clifton C. Craig, Software Engineer
[EMAIL PROTECTED]
On Tuesday 08 November 2005 12:21 pm, Lothar Krenzien wrote:
> Hi there,
>
> I'm trying to create a war file using the Ant war-task. The creted file
> seems to be ok but all the files under WEB-INF/classes and WEB-INF/lib
> exists twice or even 3-times (with the same name in the same dir). Of
> course I can skip the duplicate files but it confuse me ;)
>
> My app looks like (for testing reasons I'm using a temporay directory) :
>
> C:\Temp\ant-test\application
>
> | src
> |
> |   -- com 
> |
> | web
> |
> |    css / js / jsp / Meta-INF / Web-INF ...
> |
> | deployment (temporary working dir)
>
> The Ant script copies all files under src/com and web to the deployment
> dir, compiles the classes (put it under the Web-INF/classes) and then
> building a war-archive using the Ant war-task.
>
> Here's my Ant script:
>
>  webxml="${outDir}/web/conergy/WEB-INF/web.xml">  dir="${outDir}/web/webapp/META-INF"/>
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> The created war-file looks like :
> 
>
> | -- css
> |
> | -- js
> |
> | -- jsp
> |
> | -- Web-INF
> |
> | | -- classes
> |
> | -- Meta-INF
>
> and so on.
>
> Thanks, Lothar
>
>
> __
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



specify xerces basedir?

2005-11-08 Thread Brian Kuhn
Hi all,

I need to run some targets on a legacy build script. I'm running them from a
new build script in another directory using the 'ant' task. Unfortunately,
the legacy script uses XML entity includes and I'm getting
FileNotFoundExceptions when I run the targets. It seems like my xml parser
(I've tried Xerces 1.3 and 2.x) is using the directory of my new script
(where the JVM was started) as its base directory. Does anyone know of a way
to tell Xerces to use the legacy script's base directory? Is there another
way to fix my problem?

Thanks,
Brian


ps - I cannot edit the legacy script or upgrade Ant to 1.6 and use the
import task...


Re: How to reuse a fileset as a Class-Path in a manifest

2005-11-08 Thread Dominique Devienne
> I'm trying to re-use a fileset pointing to a lib folder containing all of my
> jars as a manifest Class-Path entry for my project.
> [...]
> I don't want to use any complexity or trickery to acheive my result (for
> example a custom task or a script task) but I just don't see any other way.
> I'm hoping to keep my build file relatively simple as I am trying to create
> some standard practices for my team. Is there a better way?

Here's the way to do it using pure Ant.

1) Define a property using the location attribute. This ensure it's
"canonical".



2) Define your fileset. I usually reuse the property above


  
 

3) Define the path

  

3bis) Convert the path into a String suitable for a Jar's manifest:


  


The trick here is to use the "canonical" file name to remove the
absolute path names in your jars, and map it to what you want. Here,
the jar with the in-manifest Class-Path references jars in a all/
subdir, so that's what I map to. The to attribute could also be empty
(to="").

4) Create the jar


  

...

But really, I need to put the custom task I have into Ant, because
it's a recurring question. Now that I have a lot of free time on my
hands, I'll do that... --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XSLT Param from ANT Property.

2005-11-08 Thread Robert r. Sanders

I'm using ANT 1.6.5; Java 1.5.0_04; Win 2000 sp4.

I'm using the XSLT task from within ANT; and can't seem to get the 
 parameter to work as it seems it should.  After trying to 
look it up I haven't been able to find anything useful in explaining 
it.  Basically I have:




  
   

   
   
  
   


When I open the output xml; the params have been set to the strings 
"props.prop1" and "props.prop2" instead of the runtime values.  Am I 
doing something wrong?  Any help would be very useful.


Thanks.

--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to reuse a fileset as a Class-Path in a manifest

2005-11-08 Thread Clifton Craig
Hello All:

I'm trying to re-use a fileset pointing to a lib folder containing all of my 
jars as a manifest Class-Path entry for my project. In short, my approach is 
to declare a property referencing the fileset object id. This gives me a 
value such as this: 

swixml.jar;jdom.jar

I am then looking to declare a manifest entry for my projects resulting jar 
that looks like this:

Class-Path: swixml.jar jdom.jar

If I use the  task I get the absolute path of each entry in the 
list as it is relative to my project folder. For example I'll get this:

Class-Path: /home/ccc/IdeaProjects/myproj/swixml.jar 
/home/ccc/IdeaProjects/myproj/jdom.jar 

I don't want to use any complexity or trickery to acheive my result (for 
example a custom task or a script task) but I just don't see any other way. 
I'm hoping to keep my build file relatively simple as I am trying to create 
some standard practices for my team. Is there a better way?

-- 
Clifton C. Craig, Software Engineer
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



List of directories that contain a file

2005-11-08 Thread Graham, Marc
Can anyone tell me how create a directory list such that each directory
contains a file with a given name? dirlist patterns test the name of the
directory. I want to test if the directory contains a file with a given
name. 

I can get the paths to the files with filelist, and then I could select
the dirnames. Do I have to iterate using foreach? How do I get the
result to be a list of directories to pass in to some other task (in
this case subant)?

Marc H. Graham
Sr. Director, Technology
SS&C Technologies
[EMAIL PROTECTED]

412 421 9407



Re: How to reuse a fileset as a Class-Path in a manifest

2005-11-08 Thread Clifton Craig
Use the map element! Genius! Why didn't I think of that? Works like a charm 
and it's MUCH better than the ad-hoc beanshell I was using in the interim! 
Thanx Dominque!
-- 
Clifton C. Craig, Software Engineer
[EMAIL PROTECTED]
On Tuesday 08 November 2005 2:41 pm, Dominique Devienne wrote:
> > I'm trying to re-use a fileset pointing to a lib folder containing all of
> > my jars as a manifest Class-Path entry for my project.
> > [...]
> > I don't want to use any complexity or trickery to acheive my result (for
> > example a custom task or a script task) but I just don't see any other
> > way. I'm hoping to keep my build file relatively simple as I am trying to
> > create some standard practices for my team. Is there a better way?
>
> Here's the way to do it using pure Ant.
>
> 1) Define a property using the location attribute. This ensure it's
> "canonical".
>
> 
>
> 2) Define your fileset. I usually reuse the property above
>
> 
>   
>  
>
> 3) Define the path
>
>   
>
> 3bis) Convert the path into a String suitable for a Jar's manifest:
>
>   pathsep=" " dirsep="/">
>   
> 
>
> The trick here is to use the "canonical" file name to remove the
> absolute path names in your jars, and map it to what you want. Here,
> the jar with the in-manifest Class-Path references jars in a all/
> subdir, so that's what I map to. The to attribute could also be empty
> (to="").
>
> 4) Create the jar
>
> 
>   
> 
> ...
>
> But really, I need to put the custom task I have into Ant, because
> it's a recurring question. Now that I have a lot of free time on my
> hands, I'll do that... --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: List of directories that contain a file

2005-11-08 Thread Dominique Devienne
> Can anyone tell me how create a directory list such that each directory
> contains a file with a given name? dirlist patterns test the name of the
> directory. I want to test if the directory contains a file with a given
> name.
>
> I can get the paths to the files with filelist, and then I could select
> the dirnames. Do I have to iterate using foreach? How do I get the
> result to be a list of directories to pass in to some other task (in
> this case subant)?

Here's an example. --DD



  
  

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The good ol' JUnit problem

2005-11-08 Thread Stefan Bodewig
Hi Jon,

long time no see.

On Tue, 8 Nov 2005, Jon Skeet <[EMAIL PROTECTED]> wrote:

> Assuming I actually *do* still have write-access, shall I add these
> two properties to the manual in SVN?

No, you don't.  This is the current list of people with write access
to Ant's svn.

ant=rubys,conor,bodewig,chrisw,sbailliez,stevel,ehatcher,bruce,antoine,peterreilly,jhm,jose,mbenson,scohen,jglick,ddevienne,jkf,alexeys

The good thing about being an emeritus committer is that you can
regain karma by asking for it.  Let us know if you want to become
active again and we can rearange things - Conor and myself (when
wearing my Gump hat) are able to grant access to you.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSLT Param from ANT Property.

2005-11-08 Thread Dominique Devienne
> I'm using the XSLT task from within ANT; and can't seem to get the
>  parameter to work as it seems it should.
>
> When I open the output xml; the params have been set to the strings
> "props.prop1" and "props.prop2" instead of the runtime values.  Am I
> doing something wrong?  Any help would be very useful.

This works fine for me (using properties in expression. see below for
an example). Try doing an echo of the properties before , as in

props.prop1 = ${props.prop1}

--DD


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: specify xerces basedir?

2005-11-08 Thread Stefan Bodewig
On Tue, 8 Nov 2005, Brian Kuhn <[EMAIL PROTECTED]> wrote:

> Does anyone know of a way to tell Xerces to use the legacy script's
> base directory?

Ant installs an EntityHandler that resolves relative file URIs
relative to the basedir, but if your legacy build uses the wrong form
of URI (i.e. it doesn't use file: at all), you are out of luck.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Subant supposed to do this??? (newbie)

2005-11-08 Thread Dominique Devienne
> 
>  
>verbose="true"
>  target="compile">
>
>  
> 
>
> Which of course fails, since that file isn't xml. I don't see anything
> in the subant documentation that leads me to expect this behavior. The
> examples contain:

I think you might need to specify directories instead of files in the
nested element of . You may want to use a  and with a
nested  selector to select the dirs containing your
makefile.mak files. I just posted an examlpe of such a . --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: specify xerces basedir?

2005-11-08 Thread Dominique Devienne
> > Does anyone know of a way to tell Xerces to use the legacy script's
> > base directory?
>
> Ant installs an EntityHandler that resolves relative file URIs
> relative to the basedir, but if your legacy build uses the wrong form
> of URI (i.e. it doesn't use file: at all), you are out of luck.

But Stefan, relative XML entities are supposed to be relative to the
file that declares them, not relative to basedir, for that builds, or
its parent. Am I missing something? --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: specify xerces basedir?

2005-11-08 Thread Stefan Bodewig
On Tue, 8 Nov 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote:
>> > Does anyone know of a way to tell Xerces to use the legacy
>> > script's base directory?
>>
>> Ant installs an EntityHandler that resolves relative file URIs
>> relative to the basedir, but if your legacy build uses the wrong
>> form of URI (i.e. it doesn't use file: at all), you are out of
>> luck.
> 
> But Stefan, relative XML entities are supposed to be relative to the
> file that declares them, not relative to basedir, for that builds,
> or its parent. Am I missing something?

You are correct, this is the code

if (systemId.startsWith("file:")) {
String path = FILE_UTILS.fromURI(systemId);

File file = new File(path);
if (!file.isAbsolute()) {
file = FILE_UTILS.resolveFile(context.getBuildFileParent(), 
path);
}

so relative file: URIs get resolved relative to the build file, not
relative to basedir.

Thanks for correcting me.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSLT Param from ANT Property.

2005-11-08 Thread Robert r. Sanders
Ok, I think the issue was that I had fixed my ANT file (which had been 
setting the param incorrectly) but there was some kind of up-to-date 
check, and since neither the source XML nor the XSLT files had changed 
the output xml wasn't getting regenerated.


Dominique Devienne wrote:

I'm using the XSLT task from within ANT; and can't seem to get the
 parameter to work as it seems it should.

When I open the output xml; the params have been set to the strings
"props.prop1" and "props.prop2" instead of the runtime values.  Am I
doing something wrong?  Any help would be very useful.



This works fine for me (using properties in expression. see below for
an example). Try doing an echo of the properties before , as in

props.prop1 = ${props.prop1}

--DD


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: List of directories that contain a file

2005-11-08 Thread Marc H. Graham
I can't say I understand this. And I couldn't get it to work. It seems
that it will only look in the immediate subdirectories. I need it to go
arbitrarily far down.

I ran this:



  

  



   
  

  
  
  
 
   
 



   



And I got (minus verbiage):

printme:
 [echo] K:\builddir\webheatmaps\Server

Despite the fact that there are four directories that I'd like to get,
viz:

WebHeatmaps>find k:/buildDir/webHeatmaps -name 'makefile.mak'
k:/buildDir/webHeatmaps/Server/makefile.mak
k:/buildDir/webHeatmaps/Server/SeverEventLogging/makefile.mak
k:/buildDir/webHeatmaps/Tunnels/IsapiTunnel/makefile.mak
k:/buildDir/webHeatmaps/Tunnels/ResourceTunnel/makefile.mak

What exactly do these things say? The dirset, without the ,
should be all the subdirectories of ${DIR}.  No? What exactly is the
 operating on? All the directories? 

I can't say any of this makes sense.
-Original Message-
From: Dominique Devienne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 08, 2005 3:02 PM
To: Ant Users List
Subject: Re: List of directories that contain a file


> Can anyone tell me how create a directory list such that each
directory
> contains a file with a given name? dirlist patterns test the name of
the
> directory. I want to test if the directory contains a file with a
given
> name.
>
> I can get the paths to the files with filelist, and then I could
select
> the dirnames. Do I have to iterate using foreach? How do I get the
> result to be a list of directories to pass in to some other task (in
> this case subant)?

Here's an example. --DD



  
  

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSLT Param from ANT Property.

2005-11-08 Thread Dominique Devienne
> Ok, I think the issue was that I had fixed my ANT file (which had been
> setting the param incorrectly) but there was some kind of up-to-date
> check, and since neither the source XML nor the XSLT files had changed
> the output xml wasn't getting regenerated.

Right.  does a timestamp check. Use the force attribute to bypass it. --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: List of directories that contain a file (ignore previous message)

2005-11-08 Thread Marc H. Graham
Just a matter of getting rid of the include, which was restricting it to
one level.

-Original Message-
From: Dominique Devienne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 08, 2005 3:02 PM
To: Ant Users List
Subject: Re: List of directories that contain a file


> Can anyone tell me how create a directory list such that each
directory
> contains a file with a given name? dirlist patterns test the name of
the
> directory. I want to test if the directory contains a file with a
given
> name.
>
> I can get the paths to the files with filelist, and then I could
select
> the dirnames. Do I have to iterate using foreach? How do I get the
> result to be a list of directories to pass in to some other task (in
> this case subant)?

Here's an example. --DD



  
  

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



password input task

2005-11-08 Thread Jason Novotny


Hi,

   I'd like to use the input task to ask a user to enter a password, 
but I don't want the password to be displayed on the screen-- is there a 
way to do this?


   Thanks, Jason

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: password input task

2005-11-08 Thread Ninju Bohra
 Nope...not possible to do that in a platform-neutral fashion  ;-(
 
P.S. This question has been asked many times before (I know because I was one 
the "repeat" offenders).  Please check the archives before asking a question :-)
 
Ninju

Jason Novotny <[EMAIL PROTECTED]> wrote:

Hi,

I'd like to use the input task to ask a user to enter a password, 
but I don't want the password to be displayed on the screen-- is there a 
way to do this?

Thanks, Jason

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: password input task

2005-11-08 Thread Petar Tahchiev
On 09/11/05, Ninju Bohra <[EMAIL PROTECTED]> wrote:
>
> Nope...not possible to do that in a platform-neutral fashion ;-(
>
> P.S. This question has been asked many times before (I know because I was
> one the "repeat" offenders). Please check the archives before asking a
> question :-)
>
> Ninju
>
> Jason Novotny <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'd like to use the input task to ask a user to enter a password,
> but I don't want the password to be displayed on the screen-- is there a
> way to do this?
>
> Thanks, Jason
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> Yahoo! FareChase - Search multiple travel sites in one click.
>

I want to say that this problem was already solved by Ivan Ivanov. I
strongly recommend you reading his article. It could be found in [1] or [2].


[1] https://sourceforge.net/project/showfiles.php?group_id=103509
[2] http://ant.apache.org/resources.html

--
Regards, Petar!