You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Dennis Lundberg <de...@apache.org> on 2010/05/13 23:43:46 UTC

Fixing a bug in Wagon and using it in a plugin - is it possible?

Hi

I've investigated http://jira.codehaus.org/browse/MSITE-477 which is
about wrong paths being created between parent and modules when staging
a site.

After some digging, I've now found the root of the problem to be that
PathUtils.basedir(String url) in Wagon doesn't gracefully handle URLs
without a protocol. One could argue that a URL isn't a URL if it doesn't
have a protocol, but that's another discussion. This does lead to an
off-by-one error when creating the paths between parent and modules,
effectively making the staged site unusable.

IIUC Wagon is an integral part of Maven core. How (if possible) would I
go about fixing this for the Site Plugin. I have a fix with unit tests
ready for Wagon, but it doesn't seem to make a difference to the Site
Plugin when I upgrade it's Wagon dependency to my locally built
1.0-beta-7-SNAPSHOT. Copying the PathUtils class into the Site Plugin in
the same package as in Wagon doesn't work either.

Any ideas?

-- 
Dennis Lundberg

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


Re: Fixing a bug in Wagon and using it in a plugin - is it possible?

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-05-13 23:51, Benjamin Bentmann wrote:
> Dennis Lundberg wrote:
> 
>> IIUC Wagon is an integral part of Maven core. How (if possible) would I
>> go about fixing this for the Site Plugin. I have a fix with unit tests
>> ready for Wagon, but it doesn't seem to make a difference to the Site
>> Plugin when I upgrade it's Wagon dependency to my locally built
>> 1.0-beta-7-SNAPSHOT. Copying the PathUtils class into the Site Plugin in
>> the same package as in Wagon doesn't work either.
> 
> Why not just copy the bits you need into some class specific to the Site
> Plugin, i.e. use a package/class name not conflicting with Wagon stuff?

Thanks I'll give that a try.

-- 
Dennis Lundberg

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


Re: Fixing a bug in Wagon and using it in a plugin - is it possible?

Posted by Benjamin Bentmann <be...@udo.edu>.
Dennis Lundberg wrote:

> IIUC Wagon is an integral part of Maven core. How (if possible) would I
> go about fixing this for the Site Plugin. I have a fix with unit tests
> ready for Wagon, but it doesn't seem to make a difference to the Site
> Plugin when I upgrade it's Wagon dependency to my locally built
> 1.0-beta-7-SNAPSHOT. Copying the PathUtils class into the Site Plugin in
> the same package as in Wagon doesn't work either.

Why not just copy the bits you need into some class specific to the Site 
Plugin, i.e. use a package/class name not conflicting with Wagon stuff?


Benjamin

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