PR: MPARTIFACT-58

add leading / on directory if it is missing


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@233442 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett 2005-08-19 06:47:11 +00:00
parent 8b004b8807
commit f09520091f
2 changed files with 9 additions and 1 deletions

View File

@ -50,8 +50,13 @@ public class RepositoryBuilder
Repository repository = new Repository( id, url );
String dir = (String) project.getContext().getVariable( "maven.repo." + id + ".directory" );
if ( repository.getBasedir() != null )
if ( repository.getBasedir() != null && dir != null )
{
dir = dir.replace( '\\', '/' );
if ( !repository.getBasedir().endsWith( "/" ) && !dir.startsWith( "/" ) )
{
dir = "/" + dir;
}
dir = repository.getBasedir() + dir;
}

View File

@ -24,6 +24,9 @@
<author email="vmassol@apache.org">Vincent Massol</author>
</properties>
<body>
<release version="1.6.1-SNAPSHOT" date="in SVN">
<action dev="brett" type="fix" issue="MPARTIFACT-58">Correct handling of directory without a leading /</action>
</release>
<release version="1.6" date="2005-07-30">
<action dev="brett" type="fix" issue="MPARTIFACT-55">Correct basedir for file:// URLs</action>
<action dev="brett" type="fix" issue="MPARTIFACT-54">Fix handling of dependencies with properties</action>