You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2008/09/17 11:53:44 UTC

[jira] Created: (IVY-908) UNIX-style filenames for path to work on MS-Windows

UNIX-style filenames for path to work on MS-Windows
---------------------------------------------------

                 Key: IVY-908
                 URL: https://issues.apache.org/jira/browse/IVY-908
             Project: Ivy
          Issue Type: Improvement
    Affects Versions: 2.0-RC1
         Environment: cywgin on MS Wondows.
            Reporter: Andy Seaborne


A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.

This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).

Leads to less portability between Linux and Windows.

In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631811#action_12631811 ] 

Matt Benson commented on IVY-908:
---------------------------------

No Java process I've ever heard of has any support for cygwin.  Java on cygwin == Java on Windows.  You can achieve portability either by basing everything from the current directory (should be properly supported in the current development line intended for release as Ivy 2.0) or injecting a base directory; in either case the paths you feed Ivy are relative.  Anything absolute (not relative to a base directory) should be externally injected e.g. with properties.  I would call this report INVALID.

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631776#action_12631776 ] 

Maarten Coene commented on IVY-908:
-----------------------------------

You can already use "/" as path separator at the moment, you just have to be sure it isn't a relative path.
On windows, relative paths start with "/" or "\", as your test demonstrates

So, if you use "/path/to/repository" in your settings.xml on windows, Ivy will complain that it is not an absolute path.
Even if you use cygwin (which also runs on window), Ivy will complain, because the windows JVM doesn't know you run it from cygwin

If you want your settings.xml to be portable between unix and windows, you'll have to use properties in your paths, like "${keyFile.dir}/pub-keyfile" instead of "/path/to/keyfile/pub-keyfile". Than you give this keyFile.dir a different value on unix and on windows



> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632409#action_12632409 ] 

Maarten Coene commented on IVY-908:
-----------------------------------

Matt: Since 2.0-RC1 I dosn't support relative paths any longer, so Ivy will throw an error if you use relative paths and will not append it any longer to the current directory.
If this was the behaviour you wanted you'll have to prefix your relative paths with ${user.dir}, so "/path/to/repository" becomes "${user.dir}/path/to/repository" in your new settings.xml file

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated IVY-908:
------------------------------


Does this include checking the documentation?  The example of "/path/to/repositiory" is from the documentation (various places) and it ivy and any both say that using / or \ on windows does not matter.  So a MS Windows user (not just cygwin users) may be lead to think that "/path/to/something" is going to be OK.  Time will tell!



> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-908.
-------------------------------

    Resolution: Invalid

I'll resolve this issue as 'Invalid" as Matt suggested.
If you don't agree or think I didn't understand this issue at all, please reopen!

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated IVY-908:
------------------------------

    Priority: Minor  (was: Major)
     Summary: UNIX-style filenames for paths to work on MS-Windows  (was: UNIX-style filenames for path to work on MS-Windows)

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631740#action_12631740 ] 

Maarten Coene commented on IVY-908:
-----------------------------------

I think the problem is only cygwin related.
The JVM still runs on windows, so it won't understand the UNIX-style filenames.

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-908) UNIX-style filenames for paths to work on MS-Windows

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated IVY-908:
------------------------------


On windows "\" and "/" are acceptable separators: hence documentation saying "/path/to" is confusing:

Test:: this is without Cygwin:

Absolute: /foo/bar==>false
Parent: /foo/bar==>\foo

Absolute: \foo\bar==>false
Parent: \foo\bar==>\foo

Absolute: c:/foo/bar==>true
Parent: c:/foo/bar==>c:\foo     # Shows / is a separator.

Absolute: c:\foo\bar==>true
Parent: c:\foo\bar==>c:\foo

from::

 static void test(String x)
    {
        System.out.println("Absolute: "+x+"==>"+new File(x).isAbsolute()) ;
        System.out.println("Parent: "+x+"==>"+new File(x).getParent()) ;
        System.out.println() ;
    }
    
    public static void main(String ... args) throws IOException
    {
        test("/foo/bar") ;
        test("\\foo\\bar") ;
        test("c:/foo/bar") ;
        test("c:\\foo\\bar") ;
        System.exit(0) ;
  }

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.