AW: using a path element to copy to archive the whole structure

2006-01-05 Thread Jan.Materne
Or take a HEAD version of Ant. fileset´s and path´s are "only" a subset of resource collections there. Jan >-Ursprüngliche Nachricht- >Von: Matt Benson [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 5. Januar 2006 16:55 >An: Ant Users List >Betreff: Re: using a path element to copy to

Re: Which command line parameter could get all targets' name in build.xml ?

2006-01-05 Thread ajax chelsea
Got it ! Thanks for all helps 2006/1/3, Yves Martin <[EMAIL PROTECTED]>: > > Wascally Wabbit <[EMAIL PROTECTED]> writes: > > > ant -projecthelp gives list of public targets for build.xml in current > > directory. (Use -f to name alternative build script.) > > You may also use ant -v -projecthelp

Re: using a path element to copy to archive the whole structure

2006-01-05 Thread Matt Benson
There are some things that you might find useful at antcontrib. https://sourceforge.net/projects/antcontrib/ HTH, Matt --- Stephane Nicoll <[EMAIL PROTECTED]> wrote: > Hello list, > > I am currenlty working with path and have a problem. > I checked the > documentation and see nothing that would

Re: using a path element to copy to archive the whole structure

2006-01-05 Thread James Fuller
Stephane Nicoll wrote: >Hello list, > >I am currenlty working with path and have a problem. I checked the >documentation and see nothing that would help me. > >I have a path named "maven.compile.src.set" which contains a list of >directories containing Java source files. I would like to create an

using a path element to copy to archive the whole structure

2006-01-05 Thread Stephane Nicoll
Hello list, I am currenlty working with path and have a problem. I checked the documentation and see nothing that would help me. I have a path named "maven.compile.src.set" which contains a list of directories containing Java source files. I would like to create an archive (jar or zip it does not

AW: SOLVED Loading resources from my task's JAR?

2006-01-05 Thread Jan.Materne
>Okay, I found the problem. I'm very sorry to have wasted >everyone's time. Although I was dumping the name of the file >to the log, I was actually calling getResourceAsStream() with >a modified version of the filename (an artifact left over from >my first attempt to put the templates in a "tem

Re: SOLVED Loading resources from my task's JAR?

2006-01-05 Thread Rick Mann
Okay, I found the problem. I'm very sorry to have wasted everyone's time. Although I was dumping the name of the file to the log, I was actually calling getResourceAsStream() with a modified version of the filename (an artifact left over from my first attempt to put the templates in a "temp

Re: Loading resources from my task's JAR?

2006-01-05 Thread Ray Tayek
At 09:48 PM 1/4/2006, you wrote: I wrote an Ant task that needs to load some files ... and I've tried getting at it with (and more) from within my task's code: i had a bunch of trouble getting resources from jars a while back, but was all in java. if you are getting a null when trying to get

RE: Loading resources from my task's JAR?

2006-01-05 Thread Stephen McConnell
> -Original Message- > From: Rick Mann [mailto:[EMAIL PROTECTED] > Sent: Thursday, 5 January 2006 8:53 PM > To: Ant Users List > Subject: Re: Loading resources from my task's JAR? > > > On Jan 5, 2006, at 1:25 AM, Stephen McConnell wrote: > > > Given that the "templates/Class.tmpl" i

Re: AW: Loading resources from my task's JAR?

2006-01-05 Thread Rick Mann
On Jan 5, 2006, at 2:12 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: I did a quick test... and it works for me. Yep, your example works for me, too. Grr. $ ant Buildfile: build.xml build: [mkdir] Created dir: /Users/rmann/Desktop/testtask/build/classes [javac] Compiling 1

AW: Loading resources from my task's JAR?

2006-01-05 Thread Jan.Materne
Played a little bit more ... public void execute() { log("My JAR is " + getClass().getProtectionDomain().getCodeSource().getLocation().toString() ); log("resource: " + resName); InputStream is = getClass().getResourceAsStream(resName); log(" stream: " + is);

Re: Loading resources from my task's JAR?

2006-01-05 Thread Rick Mann
On Jan 5, 2006, at 1:25 AM, Stephen McConnell wrote: Given that the "templates/Class.tmpl" is a relative address (relative to the package namespace of the class returned from getClass()), and if the class is in the package namespece "com/mycompany/tools/dbgen" then woudn't the absolute re

AW: Loading resources from my task's JAR?

2006-01-05 Thread Jan.Materne
I did a quick test... and it works for me. Jan ./build.xml ---8-<---8-<---8-<---8-<---8-<---8-<---8-<---8-< ---8

RE: Loading resources from my task's JAR?

2006-01-05 Thread Stephen McConnell
> -Original Message- > From: Rick Mann [mailto:[EMAIL PROTECTED] > Sent: Thursday, 5 January 2006 8:26 PM > To: Ant Users List > Subject: Re: Loading resources from my task's JAR? > > > On Jan 5, 2006, at 1:45 AM, Stephen McConnell wrote: > > > This is not a issue of locating the jar

RE: Loading resources from my task's JAR?

2006-01-05 Thread Stephen McConnell
> -Original Message- > From: Steve Loughran [mailto:[EMAIL PROTECTED] > Sent: Thursday, 5 January 2006 7:34 PM > To: Ant Users List > Subject: Re: Loading resources from my task's JAR? > > Rick Mann wrote: > > I wrote an Ant task that needs to load some files (it's a source > > genera

Re: Loading resources from my task's JAR?

2006-01-05 Thread Rick Mann
On Jan 5, 2006, at 1:45 AM, Stephen McConnell wrote: This is not a issue of locating the jar file - after all you running which means you class is loaded which means the JRE has located the class which means the jar is know. If you task class is com/mycompany/tools/dbgen/DBGenAntTask.class

RE: Loading resources from my task's JAR?

2006-01-05 Thread Stephen McConnell
> -Original Message- > From: Rick Mann [mailto:[EMAIL PROTECTED] > Sent: Thursday, 5 January 2006 8:03 PM > To: Ant Users List > Subject: Re: Loading resources from my task's JAR? > > > On Jan 5, 2006, at 1:04 AM, Steve Loughran wrote: > > > this should work. make sure you have put t

Re: Loading resources from my task's JAR?

2006-01-05 Thread Rick Mann
On Jan 5, 2006, at 1:04 AM, Steve Loughran wrote: this should work. make sure you have put the template into the JAR. the task may need to explicitly ask for it, or you should be using to copy the files from their source dir to build/ classes or wherever. I would have an "unjar" target

Re: Loading resources from my task's JAR?

2006-01-05 Thread Steve Loughran
Rick Mann wrote: I wrote an Ant task that needs to load some files (it's a source generator that loads template files). I'd like to store those files in the task's .jar file, but so far I've met with no success. I've tried storing the files in various parts of the .jar: templates/Class.tmp

Re: calling ant API from java instead of using build.xml from console

2006-01-05 Thread Dieter Frej
Hi Stephen, first of all: thanks for your answer and help! I know that is some kind against the philosophy of ant. The thing in my application is that nearly all properties have to be generated on-the-fly and if something fails the stream has to be parsed and the properties re-adjusted before th