You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2009/03/04 10:24:13 UTC
[jira] Created: (MANTTASKS-142) Default remote repository id not
safe
Default remote repository id not safe
-------------------------------------
Key: MANTTASKS-142
URL: http://jira.codehaus.org/browse/MANTTASKS-142
Project: Maven 2.x Ant Tasks
Issue Type: Bug
Components: dependencies task
Affects Versions: 2.0.9
Reporter: Benjamin Bentmann
Priority: Minor
The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon (:) from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier closed MANTTASKS-142.
-------------------------------
Resolution: Fixed
Fixed in [r771907|http://svn.apache.org/viewvc?view=rev&revision=771907]
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Assignee: Paul Gier
> Priority: Minor
> Fix For: 2.0.10
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MANTTASKS-142:
--------------------------------
Fix Version/s: 2.1.0
2.0.10
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175077#action_175077 ]
Herve Boutemy commented on MANTTASKS-142:
-----------------------------------------
ok, you're right Benjamin (how could I ever imagine the contrary... ;) )
{code}ant -f sample.build.xml test-deps-two-repos{code}
on my Linux box, I get a weird target/tmp/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT/maven-metadata-file: directory
I suppose it simply fails on a Windows box...
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MANTTASKS-142:
----------------------------------------
Description:
The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
was:
The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon (:) from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175013#action_175013 ]
Paul Gier commented on MANTTASKS-142:
-------------------------------------
{quote}
[...] since not all repository urls have a host name
Would be "localhost" then, isn't it? Anyway, this was just a half-thought idea.
{quote}
Not necessarily. For "file:///home/user/stuff", java.net.URL just returns an empty string for the hostname. But I guess it depends on what you use to parse the URL.
But I think the hostname is not good to use anyway because of the possible duplicates.
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MANTTASKS-142) Default remote
repository id not safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174930#action_174930 ]
Paul Gier edited comment on MANTTASKS-142 at 5/3/09 10:15 PM:
--------------------------------------------------------------
I'm not sure using the hostname would be a good idea, since not all repository urls have a host name. For example deploying to the local file system "file:///home/user/stuff". Also it seems fairly common that two repositories could be on the same hostname.
Maybe the MD5 digest could work though.
When would the repository id be used in a file path that the special characters would blow up?
was (Author: pgier):
I'm not sure using the hostname would be a good idea, since not all repository urls have a host name. For example deploying to the local file system "file:///home/user/stuff". Also it seems fairly common that two repositories could be on the hostname.
Maybe the MD5 digest could work though.
When would the repository id be used in a file path that the special characters would blow up?
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174943#action_174943 ]
Benjamin Bentmann commented on MANTTASKS-142:
---------------------------------------------
bq. [...] since not all repository urls have a host name
Would be "localhost" then, isn't it? Anyway, this was just a half-thought idea.
bq. When would the repository id be used in a file path that the special characters would blow up?
Oh yes, I forgot to mention that. The repo id will be used for the metadata files, i.e. {{maven-metadata-<repo-id>.xml}}.
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175080#action_175080 ]
Herve Boutemy commented on MANTTASKS-142:
-----------------------------------------
I just checked: as expected, Maven core does not support remote repositories without id
{code}org.apache.maven.artifact.InvalidRepositoryException: Repository ID must not be empty (URL is: file://${user.dir}/src/test/repo).
at org.apache.maven.project.ProjectUtils.buildArtifactRepository(ProjectUtils.java:101){code}
Then I think Maven Ant Tasks should not really support this case either: any algorithm that tries to compute a human readable defautl id cannot work.
I propose the following:
- add a warning if no id is defined
- compute a default value as simple as hex-encoded MD5-digest
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MANTTASKS-142:
--------------------------------
Assignee: Paul Gier
Fix Version/s: (was: 2.1.0)
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Assignee: Paul Gier
> Priority: Minor
> Fix For: 2.0.10
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174930#action_174930 ]
Paul Gier commented on MANTTASKS-142:
-------------------------------------
I'm not sure using the hostname would be a good idea, since not all repository urls have a host name. For example deploying to the local file system "file:///home/user/stuff". Also it seems fairly common that two repositories could be on the hostname.
Maybe the MD5 digest could work though.
When would the repository id be used in a file path that the special characters would blow up?
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175086#action_175086 ]
Benjamin Bentmann commented on MANTTASKS-142:
---------------------------------------------
bq. you're right Benjamin (how could I ever imagine the contrary..
Benjamin IS_A human, human IS_A error-prone component ;-)
bq. I propose the following: [...]
+1
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174955#action_174955 ]
Benjamin Bentmann commented on MANTTASKS-142:
---------------------------------------------
The issue has a broader scope than just deployment, it also affects artifact resolution/download. Eventually, it seems that {{RemoteRepository.getDefaultId()}} needs to be fixed.
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MANTTASKS-142) Default remote repository id not
safe
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTTASKS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174949#action_174949 ]
Herve Boutemy commented on MANTTASKS-142:
-----------------------------------------
I updated in r770933 the unit test for MANTTASKS-103 to show that DeployTask.java "automagically" replaces repo id with "remote" to avoid the problem reported here
can you check if a problem persists?
> Default remote repository id not safe
> -------------------------------------
>
> Key: MANTTASKS-142
> URL: http://jira.codehaus.org/browse/MANTTASKS-142
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Components: dependencies task
> Affects Versions: 2.0.9
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> The default id for a remote repository is just the repo URL. However, a URL typically contains all kind of characters that are not safe for usage in local file paths. E.g. the colon ':' from the URL scheme will just blow up on Windows. The slashes from the URL also cause troubles for a path that is meant to be a simple file name instead of a directory spec.
> Better choices for the default repo id could be the host name only or just some hex-encoded MD5-digest of the URL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira