« Return to Thread: Comments / Ideas for MNG-3244
lukas theussl wrote:This behavior is correct according to the rfc specs: http://www.ietf.org/rfc/rfc2396.txt (see eg the example given in App D).
If you want the "1" to be interpreted as a hierarchical component (ie as a directory on a filesystem), you need to append a slash in the end:
PathDescriptor( new URL( http://www.foo.com/foo/bar/1/ ), "../../images/banner-lhs.png" )
which is a recommended practice for web URLs anyway, see eg http://www.standardzilla.com/2007/07/09/dont-forget-your-trailing-slash/
RFC 2396, "5.2. Resolving Relative References to Absolute Form"
6) If this step is reached, then we are resolving a relative-path
reference. The relative path needs to be merged with the base
URI's path. Although there are many ways to do this, we will
describe a simple method using a separate string buffer.
a) All but the last segment of the base URI's path component is
copied to the buffer. In other words, any characters after the
last (right-most) slash character, if any, are excluded.
On 04/03/2008, at 6:22 AM, Brian E. Fox wrote:
>
>> As I understand your proposal, the don't-append-marker would vanish
> after
>> the first inheritance step, re-enabling the default behavior for all
>> descendant POMs?
>
> You're right, it probably won't work that way. I was thinking the
> behavior info would be available throughout the inheritance process,
> but
> removed after...but then you couldn't inherit from a deployed pom.
It's ugly, but there is a workaround for this now in respecifying the
URLs in the child POMs. It's a pain but it's not the end of the world
and I'd say better than adding even more voodoo.
I'd also like to take the time to apologise for adding this behaviour,
it seemed like a good idea at the time...
> I'm not convinced adding a flag to the pom will help because we have
> so
> many different urls (site, scm, distro) and I don't think a global
> switch for all of them is what people want.
In the attributes branch we have different model readers for different
versions and can presumably have different semantics as people update
through the versions. I would say that's the best way to go - keep
behaving the same way as now for 4.0.0 POMs, and come up with a better
solution for people that choose to use 4.1.0 POMs (once they are in
place).
My 2c.
Cheers,
Brett
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
« Return to Thread: Comments / Ideas for MNG-3244
| Free embeddable forum powered by Nabble | Forum Help |