Re: calculating relative paths

2009-09-09 Thread Andy Stevens
2009/9/9 : > The enhancement of seems to be good candidate. ... > > --> ../my/file.txt ../file.txt, surely? my/dir + .. -> my, my/dir + ../my -> my/my, my/dir + ../my/file.txt -> my/my/file.txt You might also like to add a test case for --> ../dir1/file.txt which I don't think is covered b

AW: calculating relative paths

2009-09-09 Thread Jan.Materne
nrw.de [mailto:jan.mate...@rzf.fin-nrw.de] >Gesendet: Mittwoch, 9. September 2009 11:30 >An: user@ant.apache.org >Betreff: AW: calculating relative paths > >>Perhaps I should raise an enhancement request. A couple of new >>attributes "relative" (default false) and &quo

AW: calculating relative paths

2009-09-09 Thread Jan.Materne
>Perhaps I should raise an enhancement request. A couple of new >attributes "relative" (default false) and "basedir" (default >${basedir}) that can be used in conjunction with the "location" >attribute seem a relatively minor addition, and would reduce my >problem to relative="true" basedir="${bui

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Francis GALIEGUE : > On Tue, Sep 8, 2009 at 21:03, Andy > Stevens wrote: >> 2009/9/8 Francis GALIEGUE : >>> On Tue, Sep 8, 2009 at 08:41, Andy >>> Stevens wrote: Hi, Is there an easy way to calculate an arbitrary relative path between two files? Part of my Ant scr

Re: calculating relative paths

2009-09-08 Thread Francis GALIEGUE
On Tue, Sep 8, 2009 at 21:03, Andy Stevens wrote: > 2009/9/8 Francis GALIEGUE : >> On Tue, Sep 8, 2009 at 08:41, Andy >> Stevens wrote: >>> Hi, >>> >>> Is there an easy way to calculate an arbitrary relative path between two >>> files? >>> Part of my Ant script copies a default configuration file

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Jan.Materne : > I am not aware of any built in task, but there is a method in FileUtils you > could use. > > Jan > > > > > > > > Strange, that looks like it ought to be just the job, but with build.dir=build buil

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Francis GALIEGUE : > On Tue, Sep 8, 2009 at 08:41, Andy > Stevens wrote: >> Hi, >> >> Is there an easy way to calculate an arbitrary relative path between two >> files? >> Part of my Ant script copies a default configuration file to a build >> folder, in the course of which I modify it (w

Re: calculating relative paths

2009-09-08 Thread Dominique Devienne
On Tue, Sep 8, 2009 at 1:41 AM, Andy Stevens wrote: > Is there an easy way to calculate an arbitrary relative path between two > files? Indirectly, with , which computes the rel. path between a set of files and the jar. May be subverted into doing it I think. --DD ---

AW: calculating relative paths

2009-09-08 Thread Jan.Materne
cation()); } } } >-Ursprüngliche Nachricht- >Von: Andy Stevens [mailto:insomniacpeng...@googlemail.com] >Gesendet: Dienstag, 8. September 2009 08:42 >An: user >Betreff: calculating relative paths > >Hi, > >Is there an easy way to calculate an arbitrary relati

Re: calculating relative paths

2009-09-08 Thread Francis GALIEGUE
On Tue, Sep 8, 2009 at 08:41, Andy Stevens wrote: > Hi, > > Is there an easy way to calculate an arbitrary relative path between two > files? > Part of my Ant script copies a default configuration file to a build > folder, in the course of which I modify it (with xmltask) with the > location of so

calculating relative paths

2009-09-07 Thread Andy Stevens
Hi, Is there an easy way to calculate an arbitrary relative path between two files? Part of my Ant script copies a default configuration file to a build folder, in the course of which I modify it (with xmltask) with the location of some source files. At the moment I'm using to get the absolute p

Re: [ant] Determining relative paths resp. substring?

2009-01-30 Thread Patrick Martin
Hello, I think you can strip the prefix by using with a . Cheers, Patrick On Sat, Jan 17, 2009 at 11:32 PM, Georg-Johann Lay wrote: > Georg-Johann Lay schrieb: >> >> Hi, >> >> can anyone assist me in solving this following quite trivial problem? >> >> Given a path A and the current directory

Re: [ant] Determining relative paths resp. substring?

2009-01-17 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: Hi, can anyone assist me in solving this following quite trivial problem? Given a path A and the current directory B=. derermine B relative to A. This is needed for prefixes in zipfileset. In the special case that I am after B is a subdirectory (of some level) of A

[ant] Determining relative paths resp. substring?

2009-01-17 Thread Georg-Johann Lay
Hi, can anyone assist me in solving this following quite trivial problem? Given a path A and the current directory B=. derermine B relative to A. This is needed for prefixes in zipfileset. In the special case that I am after B is a subdirectory (of some level) of A. So gettig the relative pa

Re: [ant] Determining relative paths resp. substring?

2009-01-16 Thread Scot P. Floess
So, thats sorta the problem...replaceregex works on a file...not on a property... Ant Contrib's version works on a property itself... I wrote the macrodef as I did...as I can reuse it over and over... On Sat, 17 Jan 2009, Georg-Johann Lay wrote: Georg-Johann Lay schrieb: Ant proper reall

Re: [ant] Determining relative paths resp. substring?

2009-01-16 Thread Georg-Johann Lay
Georg-Johann Lay schrieb: Ant proper really is not capable to perform things that look in C like >> char * prefix; >> char * path; >> char * suffix = path + strlen (prefix); or like >> String prefix; >> String path; >> String suffix = path.substring (prefix.length()); in Java? Hi, I

Re: [ant] Determining relative paths resp. substring?

2009-01-16 Thread Scot P. Floess
Oh I completely understand :) No worries :) I tend to go overboard with Ant. To be honest, I use it as more than a build environment...I use it as a cross platform scripting language :) Anyway, you can probably do the same thing with beanshell or another scripting language directly from wi

Re: [ant] Determining relative paths resp. substring?

2009-01-16 Thread Georg-Johann Lay
Scot P. Floess schrieb: I am enclosing my macrodef to compute a branch: description = "Compute the branch based upon a root dir, @{root}, and full path, @{full-path}. The branch represents the full path minus the root dir. Please note: if @{root} does not exist in @{full-path}

Re: [ant] Determining relative paths resp. substring?

2009-01-16 Thread Scot P. Floess
I had a need for something exactly like this...long story but it had to do with javacc :) Anyway, my open source project Keros (url is in my sig line) has a lot of this type of functionality... I am enclosing my macrodef to compute a branch: description = "Compute the branch ba

[ant] Determining relative paths resp. substring?

2009-01-16 Thread Georg-Johann Lay
Hi, can anyone assist me in solving this following quite trivial problem? Given a path A and the current directory B=. derermine B relative to A. This is needed for prefixes in zipfileset. In the special case that I am after B is a subdirectory (of some level) of A. So gettig the relative path

Re: Ant Difference of Two Relative Paths?

2009-01-06 Thread iamleppert
ect structure css folder? (see > below the structure) > > > ... > css/ > - myconcatenatedfile.css > images/ > - image.gif > ... > > is it possible? > > supareno > > ---

Re: Ant Difference of Two Relative Paths?

2009-01-06 Thread supareno
iamleppert a écrit : Is it possible somehow using the pathconvert task to translate one relative path to another, given a "reference point"? E.g. Given the following directory structure: modules/mymodule/resources/css/something.css I have relative paths in something.css like the

Ant Difference of Two Relative Paths?

2009-01-05 Thread iamleppert
Is it possible somehow using the pathconvert task to translate one relative path to another, given a "reference point"? E.g. Given the following directory structure: modules/mymodule/resources/css/something.css I have relative paths in something.css like the following: background-

AW: AW: AW: Inserting different relative paths into multiple files using the same token

2008-11-10 Thread Jan.Materne
>-Ursprüngliche Nachricht- >Von: jbmdharris [mailto:[EMAIL PROTECTED] >Gesendet: Montag, 10. November 2008 15:20 >An: user@ant.apache.org >Betreff: Re: AW: AW: Inserting different relative paths into >multiple files using the same token > > >I could implement this

Re: AW: AW: Inserting different relative paths into multiple files using the same token

2008-11-10 Thread jbmdharris
ething new in the environment requires work and proof that it's really necessary. So, I'm trying to use the built-in capabilities of the environment provided to me. At least I have ant-contrib available... -- View this message in context: http://www.nabble.com/Inserting-different

AW: AW: Inserting different relative paths into multiple files using the same token

2008-11-10 Thread Jan.Materne
You could rewrite that in Java and that class. Jan >-Ursprüngliche Nachricht- >Von: jbmdharris [mailto:[EMAIL PROTECTED] >Gesendet: Montag, 10. November 2008 13:03 >An: user@ant.apache.org >Betreff: Re: AW: Inserting different relative paths into >multiple files us

Re: AW: Inserting different relative paths into multiple files using the same token

2008-11-10 Thread jbmdharris
My build environment doesn't include Rhino for executing JavaScript in Java and it's unlikely that I would be allowed to add it. -- View this message in context: http://www.nabble.com/Inserting-different-relative-paths-into-multiple-files-using-the-same-token-tp20411245p20418710.html

AW: Inserting different relative paths into multiple files using the same token

2008-11-09 Thread Jan.Materne
} Jan >-Ursprüngliche Nachricht- >Von: jbmdharris [mailto:[EMAIL PROTECTED] >Gesendet: Sonntag, 9. November 2008 22:50 >An: user@ant.apache.org >Betreff: Inserting different relative paths into multiple >files using the same token > > >I have m

Re: Inserting different relative paths into multiple files using the same token

2008-11-09 Thread jbmdharris
this. -- View this message in context: http://www.nabble.com/Inserting-different-relative-paths

Inserting different relative paths into multiple files using the same token

2008-11-09 Thread jbmdharris
owever, I'm getting an error that can't call tasks recursively. Does anyone have any ideas? -- View this message in context: http://www.nabble.com/Inserting-different-relative-paths-into-multiple-files-using-the-same-token-tp20411245p20411245.html Sent from the Ant - Users mailing list archive

Re: Force fileset to relative paths?

2008-09-01 Thread Stefan Bodewig
On Mon, 1 Sep 2008, <[EMAIL PROTECTED]> wrote: > SO, finally, my question: Is there any way to force the fileset > returned values to be relative paths? doesn't really return absolute paths, it returns a collection of strings and the task that uses the fileset usually turns t

Re: Force fileset to relative paths?

2008-09-01 Thread Dominique Devienne
w bypassing ? > SO, finally, my question: Is there any way to force the fileset > returned values to be relative paths? Or is there any way I can modify > what it returns, through a find-replace or some kind of tool? That's 's job, but you must turn your fileset into a property tho

Force fileset to relative paths?

2008-09-01 Thread c0uchm0nster
arameter instead of a file: [cpptasks:cc] cl : Command line warning D9002 : ignoring unknown option '/var/cruisecontrol/checkout/idkfa/libs/include/DXUT.cpp' SO, finally, my question: Is there any way to force the fileset returned values to be relative paths? Or is there any way I can mo

Re: Relative Paths in Imported Files

2008-08-26 Thread Peter Reilly
On Sun, Aug 17, 2008 at 9:18 PM, Francisco Tolmasky <[EMAIL PROTECTED]> wrote: > I have a common.xml file that I import in all my build.xml throughout my > project (subdirectories included). One of the tasks defined in this > common.xml has to reference a file in a java task, as so: > > > >

Re: Relative Paths in Imported Files

2008-08-18 Thread Stefan Bodewig
On Sun, 17 Aug 2008, Francisco Tolmasky <[EMAIL PROTECTED]> wrote: Before I answer the original question let me state that I have seen a bug with a combination of , and that manifested itself as -elements using the wrong basedir - I was able to work around it by using instead of . Unfortunatel

Relative Paths in Imported Files

2008-08-17 Thread Francisco Tolmasky
I have a common.xml file that I import in all my build.xml throughout my project (subdirectories included). One of the tasks defined in this common.xml has to reference a file in a java task, as so:

Re: Unexpected behavior regarding relative paths in - bug?

2008-02-12 Thread Gilles Scokart
> > It seems that the functionality treats relative paths in an > unexpected way. In the deliverpattern attribute, it appears that paths > are resolved relative to the ${user.dir} system property. This is > different from the usual Ant behavior of resolving them relative to > ${b

Unexpected behavior regarding relative paths in - bug?

2008-02-12 Thread Brown, Carlton
I think I may have found a bug, can someone confirm this behavior for me: It seems that the functionality treats relative paths in an unexpected way. In the deliverpattern attribute, it appears that paths are resolved relative to the ${user.dir} system property. This is different from the

Re: Creating SymLinks with relative paths

2007-11-06 Thread Steve Loughran
yvesforkl wrote: Andrew Goktepe wrote: The symlink task (http://ant.apache.org/manual/OptionalTasks/symlink.html) can be used to create symbolic links with relative paths on a per-file basis [...] Thank you for this hint, once again I see that most of what needs to be done is fairly easy

Re: Creating SymLinks with relative paths

2007-11-06 Thread yvesforkl
Andrew Goktepe wrote: > > The symlink task (http://ant.apache.org/manual/OptionalTasks/symlink.html) > can be used to create symbolic links with relative paths on a per-file > basis [...] > Thank you for this hint, once again I see that most of what needs to be done is fairly e

Re: Creating SymLinks with relative paths

2007-11-05 Thread Andrew Goktepe
The symlink task (http://ant.apache.org/manual/OptionalTasks/symlink.html) can be used to create symbolic links with relative paths on a per-file basis: The value given for the resource attribute is relative to the location of the link you are creating (same behavior as command-line usage of ln

Creating SymLinks with relative paths

2007-11-05 Thread yvesforkl
Creating SymLinks with relative paths shouldn't be too hard for ant. However, I can't figure out the right way to do it. Using bash commands, I'd do cd dir_b ln -s ../../dir_a/*.xml . yielding symbolic links within dir_b that look like ../../dir_a/file1.xml etc. What is the equ

Re: How to Customize Relative Paths Read From Properties File

2006-05-02 Thread Dominique Devienne
have to write a custom task? -- View this message in context: http://www.nabble.com/How-to-Customize-Relative-Paths-Read-From-Properties-File-t1519027.html#a4123630 Sent from the Ant - Users forum at Nabble.com. - To unsubscri

How to Customize Relative Paths Read From Properties File

2006-04-27 Thread Michael Creech
g is: but the problem is that ANT will make these absolute paths based on base directory, which isn't what is desired. Is there some simple way to do this? Do I have to write a custom task? -- View this message in context: http://www.nabble.com/How-to-Customize-Relative-Paths-Read

AW: absolute paths vs. relative paths

2006-02-17 Thread Jan.Materne
nested in Jan >-Ursprüngliche Nachricht- >Von: Paul Pogonyshev [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 14:37 >An: user@ant.apache.org >Betreff: absolute paths vs. relative paths > >Hi, > >I have one more question. How can I get

absolute paths vs. relative paths

2006-02-17 Thread Paul Pogonyshev
Hi, I have one more question. How can I get relative paths instead of absolute ones? For instance, say I need to save the paths into a file. If I use absolute paths, it will be meaningless for someone on a different machine or with different home directory... Paul

RE: Relative paths

2006-01-13 Thread Paulo Jorge Guedes
> -Original Message- > From: Clifton Craig [mailto:[EMAIL PROTECTED] > Sent: sexta-feira, 13 de Janeiro de 2006 14:04 > To: Ant Users List > Subject: Re: Relative paths > > > One more suggestion, maybe you could clean it up a little by using: > >

Re: Relative paths

2006-01-13 Thread Clifton Craig
On Friday 13 January 2006 8:53 am, Paulo Jorge Guedes wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: sexta-feira, 13 de Janeiro de 2006 13:20 > > To: Ant Users List > > Subject: RE: Relative paths > >

RE: Relative paths

2006-01-13 Thread Paulo Jorge Guedes
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: sexta-feira, 13 de Janeiro de 2006 13:20 > To: Ant Users List > Subject: RE: Relative paths > > >It looks on the nbproject path... > > I thought, that is what you want. > Tha

RE: Relative paths

2006-01-13 Thread harnackf
age- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: sexta-feira, 13 de Janeiro de 2006 12:38 > > To: Ant Users List > > Subject: RE: Relative paths > > > > OK, > > inheritall="false" > > is better than using the dir at

RE: Relative paths

2006-01-13 Thread Paulo Jorge Guedes
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: sexta-feira, 13 de Janeiro de 2006 12:38 > To: Ant Users List > Subject: RE: Relative paths > > OK, > inheritall="false" > is better than using the dir attribute. And

RE: Relative paths

2006-01-13 Thread harnackf
2006 11:57 > > To: Ant Users List > > Subject: RE: Relative paths > > > > Something like this maybe help you in your root build.xml: > > > > > > target="compileApp1" > > inheritall="true" inheritrefs=&q

RE: Relative paths

2006-01-13 Thread harnackf
> > automatically generated by the IDE. > > Is there any way to workaround it instead of overriding the targets in > > the app1 folder? > > > > Paulo > > > > > -Original Message- > > > From: Paulo Jorge Guedes [mailto:[EMAIL

RE: Relative paths

2006-01-13 Thread Paulo Jorge Guedes
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: sexta-feira, 13 de Janeiro de 2006 11:57 > To: Ant Users List > Subject: RE: Relative paths > > Something like this maybe help you in your root build.xml: > > >

RE: Relative paths

2006-01-13 Thread harnackf
--Original Message- > > From: Paulo Jorge Guedes [mailto:[EMAIL PROTECTED] > > Sent: sexta-feira, 13 de Janeiro de 2006 10:49 > > To: Ant Users List > > Subject: Relative paths > > > > Hi, > > > > I have this directory structure: > > > >

RE: Relative paths

2006-01-13 Thread Paulo Jorge Guedes
Original Message- > From: Paulo Jorge Guedes [mailto:[EMAIL PROTECTED] > Sent: sexta-feira, 13 de Janeiro de 2006 10:49 > To: Ant Users List > Subject: Relative paths > > Hi, > > I have this directory structure: > > Root > Apps >

Re: Relative paths

2006-01-13 Thread Petar Tahchiev
On 13/01/06, Paulo Jorge Guedes <[EMAIL PROTECTED]> wrote: > > Hi, > > I have this directory structure: > > Root > Apps > App1 > Nbproject > Src > > The build.xml files just import the files in the inner directories. The > buil

Relative paths

2006-01-13 Thread Paulo Jorge Guedes
Hi, I have this directory structure: Root Apps App1 Nbproject Src The build.xml files just import the files in the inner directories. The build file on nbproject folder does all the work. In each file I set the "basedir" att

RE: Generate manifest classpath with relative paths

2005-07-12 Thread Dominique Devienne
> -Original Message- > From: Martin Olsson [mailto:[EMAIL PROTECTED] > I already have an ANT target that creates myprogram.jar but I also need it > to create a manifest with a proper Class-Path pointing to > ./lib/commons/commons-net.jar etc etc > > I managed to implement this using _absol

Re: Generate manifest classpath with relative paths

2005-07-11 Thread Conor MacNeill
Martin Olsson wrote: > Hi, > > At runtime my program is stored like this: > > ./myprogram.jar > ./lib/commons/commons-net.jar > ./lib/commons/commons-configuration.jar > ./lib/spring/spring_jar1.jar > ./lib/spring/spring_jar2.jar > ./lib/some/other/jarfile.jar > > There is a ton of other .jar

Generate manifest classpath with relative paths

2005-07-11 Thread Martin Olsson
Hi, At runtime my program is stored like this: ./myprogram.jar ./lib/commons/commons-net.jar ./lib/commons/commons-configuration.jar ./lib/spring/spring_jar1.jar ./lib/spring/spring_jar2.jar ./lib/some/other/jarfile.jar There is a ton of other .jar files too organized in the directory tree below