Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] Problems resolving mixed paths with .. in Ant integration in Eclipse

Darins,

I tried to reproduce the problem and was unable to ... same as you found.
Digging a bit deeper I found that the problem was entirely different.
When running in Eclipse, ${ant.home} is undefined. This leads to a line in
my build.xml which defines <property name="ant.home" value="."/> (I wonder
what this is good for anyway) being executed which puts an invalid path on the
classpath which made me think I had the problem I was describing. Under DOS,
ant.home is defined which leads to that line not being executed (as properties
are immutable) and everything works fine.

This leaves us with the question: Why is ant.home not defined when running
under Eclipse?

Torsten

> On the 2.1, 2.1.1 or the 3.0 stream I cannot reproduce your problem
> 
> My  simple test case:
> 
> <project name="Echo" default="echo">
> 
>         <property name="path" value="${basedir}/../target"/>
> 
>         <target name="echo">
>                 <mkdir dir="${path}"/>
>         </target>
> </project>
> 
> Can you please provide a sample build file that exhibits your problem?
> Darins
> 
> 
> 
> 
> 
> Torsten Schlabach <TSchlabach@xxxxxxx>
> Sent by: platform-ant-dev-admin@xxxxxxxxxxx
> 07/29/03 08:22 AM
> Please respond to platform-ant-dev
> 
>  
>         To:     platform-ant-dev@xxxxxxxxxxx
>         cc: 
>         Subject:        [platform-ant-dev] Problems resolving mixed paths
> with .. in Ant 
> integration in Eclipse
> 
> 
> 
> Dear list,
> 
> there seems to be a problem with path name resolution when Ant is run 
> inside
> Eclipse. (This is 2.1.0 to be exact.)
> 
> If under windows a path happend to look like this:
> 
> c:\local\src\anyapp\build/../target
> 
> because you had defined a property such as ${basedir}/../target
> 
> this gets resolved to
> 
> c:\local\src\anyapp\build\target
> 
> instead of
> 
> c:\local\src\anyapp\target
> 
> Leaving everything unchanged and running ant from a DOS box (same version;
> 1.5.3) does not have this problem.
> 
> I brought this up on the newsgroup already. Darin Swanson considered this 
> a
> bug and wanted to have a look. Any workarounds / patches would be nice as
> this is causing trouble with a lot of OSS packages that do not build under
> Windows because of this.
> 
> Regards,
> Torsten
> 
> 
> 
> _______________________________________________
> platform-ant-dev mailing list
> platform-ant-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ant-dev
> 
> 
> 



Back to the top