maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Shade and the dependency-reduced-pom
Date Tue, 22 May 2012 02:22:28 GMT
Brett, I wrote the code today.

On May 21, 2012, at 6:51 PM, Brett Porter <brett@apache.org> wrote:

> http://stackoverflow.com/questions/204784/how-to-construct-a-relative-path-in-java-from-two-absolute-paths-or-urls
> http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/FileUtils.html#resolveFile(java.io.File,
java.lang.String)
>
> I was sure there was one around called "relativize", but I can't find it. Maybe was thinking
of the URI one. I remember dealing with the extensive Windows edge cases and so on - probably
in Archiva or Wagon/Release/SCM. Your best bet might be to use commons-io's normalize on both
paths and then chop the common path-delimited substring.
>
> I don't suppose you can avoid resolving it though, and just prepend "../" as long as
you know the depth from the original project, and know that the previous value was already
relative? Don't forget to cover the Maven 3 case where <relativePath></relativePath>
turns off the default.
>
> Cheers,
> Brett
>
> On 22/05/2012, at 6:42 AM, Benson Margulies wrote:
>
>> MSHADE-115 reports the unpleasant consequences of putting the
>> dependency-reduced-pom into the basedir instead of target.
>>
>> I'm working on a fix. The fix needs a function that can relativize one
>> pathname to another. I'm surprised that there doesn't seem to be one
>> of those lying about ... is there one in Plexus that I've perhaps
>> missed?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Mime
View raw message