You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Dominique Devienne <dd...@gmail.com> on 2009/09/08 20:02:48 UTC

Re: svn commit: r812573 - in /ant/core/trunk/src: etc/testcases/taskdefs/manifestclasspath.xml main/org/apache/tools/ant/taskdefs/ManifestClassPath.java tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java

On Tue, Sep 8, 2009 at 11:16 AM, <bo...@apache.org> wrote:
> Author: bodewig
> Date: Tue Sep  8 16:16:54 2009
> New Revision: 812573
>
> URL: http://svn.apache.org/viewvc?rev=812573&view=rev
> Log: Use FileUtils.getRelativePath which knows how to deal with drive letters.  PR 44499
> [...]
> +  <target name="testDifferentDrive">
> +    <manifestclasspath jarfile="C:/Temp/e.jar"
> +                       maxParentLevels="99" property="cp">
> +      <classpath>
> +        <pathelement location="D:/a/b/x.jar"/>
> +      </classpath>
> +    </manifestclasspath>
> +  </target>
>  </project>

I don't get it Stefan. What is going to be in the manifest?

AFAIK, there's no way to change drive (letter) with a relative path/filename.
You can't "cd .." when you're in D:\ or C:\ so how does one go from C: to D:
using a relative path??? cd /d allows changing drive letter, but takes an
absolute path, not a relative one.

IMHO, a <manifest> classpath should only ever contain true relative paths,
or absolute URLs (in which case one would need file:///D/a/b/x.jar and
D:/a/b/x.jar is not a valid entry for Class-Path: IMHO.)

So I'm not sure the bug report is valid at all, and why my original code didn't
allow changing drives, because AFAIK each drive is a "root" directory. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: svn commit: r812573 - in /ant/core/trunk/src: etc/testcases/taskdefs/manifestclasspath.xml main/org/apache/tools/ant/taskdefs/ManifestClassPath.java tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java

Posted by Dominique Devienne <dd...@gmail.com>.
On Tue, Sep 8, 2009 at 10:17 PM, Stefan Bodewig <bo...@apache.org> wrote:
>> So I'm not sure the bug report is valid at all,
>
> The report talked about problems when staying on the same drive, this
> failed before I changed the code.

Thanks for the precisions. I get it now, and sorry for the noise. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: svn commit: r812573 - in /ant/core/trunk/src: etc/testcases/taskdefs/manifestclasspath.xml main/org/apache/tools/ant/taskdefs/ManifestClassPath.java tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-09-08, Dominique Devienne <dd...@gmail.com> wrote:

> On Tue, Sep 8, 2009 at 11:16 AM, <bo...@apache.org> wrote:
>> Author: bodewig
>> Date: Tue Sep  8 16:16:54 2009
>> New Revision: 812573

>> URL: http://svn.apache.org/viewvc?rev=812573&view=rev
>> Log: Use FileUtils.getRelativePath which knows how to deal with drive letters.  PR 44499
>> [...]
>>>  <target name="testDifferentDrive">
>>>    <manifestclasspath jarfile="C:/Temp/e.jar"
>>>                       maxParentLevels="99" property="cp">
>>>      <classpath>
>>>        <pathelement location="D:/a/b/x.jar"/>
>>>      </classpath>
>>>    </manifestclasspath>
>>>  </target>
>>  </project>

> I don't get it Stefan. What is going to be in the manifest?

The task will fail because it cannot find a relative path (and the test
asserts the error).  FileUtils.getRelativePath returns the canonical
path of the target file.

> IMHO, a <manifest> classpath should only ever contain true relative paths,

It does.

> So I'm not sure the bug report is valid at all,

The report talked about problems when staying on the same drive, this
failed before I changed the code.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org