You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@apache.org> on 2007/05/15 14:13:22 UTC
Locator bugs
Well, I've been fixing the locator class, and adding new tests (not yet
committed)
I've fix all outstanding defects but can show a problem in which a path
with forward slashes in it gets two leading slashes cut off:
public void testTripleForwardSlashNetworkURI() throws Exception {
resolveTo("file:///PC03/jclasses/lib/ant-1.7.0.jar",
"///PC03/jclasses/lib/ant-1.7.0.jar");
}
the error is:
junit.framework.ComparisonFailure: Expected
file:///PC03/jclasses/lib/ant-1.7.0.jar to resolve to
///PC03/jclasses/lib/ant-1.7.0.jar
but got
/PC03/jclasses/lib/ant-1.7.0.jar
now, we get the same behaviour whether i use the Java URI class, or we
do it by hand using the java1.3 only code. We are at least consistent,
just wrong.
what to do?
(a) leave as is
(b) switch to our own code, change behaviour to retain the forward slashes?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Locator bugs
Posted by Stefan Bodewig <bo...@apache.org>.
"Alia B." <a....@gmail.com> writes:
> I was trying to run ant (v1.7) via jsp but i'm getting
> java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Locator
> it works ok via java but not jsp, is this a configration problem or this is
> a bug?
The bug talked about in this thread is not related to your problem.
You seem to be missing ant-launcher.jar in your CLASSPATH when you
invoke Ant via the JSP.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Locator bugs
Posted by "Alia B." <a....@gmail.com>.
Hi all,
I was trying to run ant (v1.7) via jsp but i'm getting
java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Locator
it works ok via java but not jsp, is this a configration problem or this is
a bug?
Regards,
Stefan Bodewig wrote:
>
> On Tue, 15 May 2007, Steve Loughran <st...@apache.org> wrote:
>> Well, I've been fixing the locator class, and adding new tests (not
>> yet committed)
>>
>> I've fix all outstanding defects but can show a problem in which a
>> path with forward slashes in it gets two leading slashes cut off:
>>
>> public void testTripleForwardSlashNetworkURI() throws Exception
>> { resolveTo("file:///PC03/jclasses/lib/ant-1.7.0.jar",
>> "///PC03/jclasses/lib/ant-1.7.0.jar");
>> }
>>
>> the error is:
>> junit.framework.ComparisonFailure: Expected
>> file:///PC03/jclasses/lib/ant-1.7.0.jar to resolve to
>> ///PC03/jclasses/lib/ant-1.7.0.jar
>> but got
>> /PC03/jclasses/lib/ant-1.7.0.jar
>
> Is the expectation correct at all? /etc/passwd is file:///etc/passwd
> and Ant's code is correct in that case, isn't it?
>
> For a network share it would be file://HOSTNAME/share and I think this
> is dealt with correctly.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Locator-bugs-tp10621641p14542381.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Locator bugs
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 15 May 2007, Steve Loughran <st...@apache.org> wrote:
> Well, I've been fixing the locator class, and adding new tests (not
> yet committed)
>
> I've fix all outstanding defects but can show a problem in which a
> path with forward slashes in it gets two leading slashes cut off:
>
> public void testTripleForwardSlashNetworkURI() throws Exception
> { resolveTo("file:///PC03/jclasses/lib/ant-1.7.0.jar",
> "///PC03/jclasses/lib/ant-1.7.0.jar");
> }
>
> the error is:
> junit.framework.ComparisonFailure: Expected
> file:///PC03/jclasses/lib/ant-1.7.0.jar to resolve to
> ///PC03/jclasses/lib/ant-1.7.0.jar
> but got
> /PC03/jclasses/lib/ant-1.7.0.jar
Is the expectation correct at all? /etc/passwd is file:///etc/passwd
and Ant's code is correct in that case, isn't it?
For a network share it would be file://HOSTNAME/share and I think this
is dealt with correctly.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Locator bugs
Posted by Steve Loughran <st...@apache.org>.
Kevin Jackson wrote:
> Hi,
>> what to do?
>>
>> (a) leave as is
>> (b) switch to our own code, change behaviour to retain the forward
>> slashes?
>
> If we change to our own code will we 'break' anything that was
> expecting the old behaviour? I doubt it, but just in case, we should
> be careful not to break old builds
>
I dont see anything needing the old behaviour, as I dont see (right
now), how broken back slashes would get down to the locator. Even on
windows, by the time locator gets called, we've had things processed
into forward slashes (hence the file://server/share bug in the URI class
surfacing)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Locator bugs
Posted by Kevin Jackson <fo...@gmail.com>.
Hi,
> what to do?
>
> (a) leave as is
> (b) switch to our own code, change behaviour to retain the forward slashes?
If we change to our own code will we 'break' anything that was
expecting the old behaviour? I doubt it, but just in case, we should
be careful not to break old builds
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org