Hi,

I've attached a partial canonical paths patch. I don't know who this should really be going to if it's to find its way into the tree, but I reckon someone here will know.

This doesn't quite fix the problem you are talking about in this thread, but it does fix a similar one that I have encountered. Feel free to grab any parts of the patch if you find them useful.

The problem I ran into was related to using a flattened multi module project hierarchy, where the pom (master) project is at the same level as its modules. The modules are then referenced like this:

<modules>
  <module>../module-1</module>
  <module>../module-2</module>
</modules>

Without the patch the plugin generates unnecessary links in the .project file since it doesn't realise that /some/dir/master/../module-1 is the same path as /some/dir/module-1. By using canonical paths for comparison (that's all that the patch does), this problem goes away and normal source directories without links are created.

Please let me know if I can provide more information.


Regards,
Tomislav



On Fri, 4 Nov 2005, Mark Hobson wrote:

Hi Kenney,

On 04/11/05, Kenney Westerhof <[EMAIL PROTECTED]> wrote:
> I didn't realize the exact difference. I think I added the
'canonical'
> versions, and the 'absolute' versions were implicit. They should
> ofcourse be the same.
>
> Is this correct:
>
>
>         /path/a/b/
>
>         /path/c symlinked to /path/a/b/
>
> - absolute -> just makes a path absolute, preserving symlinks:
>
>         cwd = /path/c; absolute('target/') -> /path/c/target/
>
> - canonical:
>
>         cwd = /path/c; canonical('target/') ->
/path/a/b/target/
>
> ?

Yep, that's right.  On Windows the canoncial path also converts the
drive letter to uppercase, which is the root cause of the test
failures.

> I don't know which version would be the correct one. I think
maven2
> internally uses Absolute paths to resolve $basedir, so I guess
the eclipse
> plugin should use that too.

Moving to one or the other would fix things, so for the eclipse plugin
we should really use whatever eclipse itself uses.  A quick test shows
that eclipse creates canoncial paths - shall we move to that instead?

+1, but I think we also need to keep in mind to convert any paths that
maven2 itself offers (if they're absolute).

-- Kenney


Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

http://mail-archives.apache.org/mod_mbox/maven-dev/200511.mbox/[EMAIL PROTECTED]

Attachment: canonical-paths.patch.gz
Description: GNU Zip compressed data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to