Author: ltheussl Date: Thu Jan 13 14:42:06 2011 New Revision: 1058583 URL: http://svn.apache.org/viewvc?rev=1058583&view=rev Log: fix windows build: use getRelativeWebPath instead of getRelativeFilePath to avoid problems with File paths, see PLXUTILS-116
Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/URIPathDescriptor.java maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtilsTest.java Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/URIPathDescriptor.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/URIPathDescriptor.java?rev=1058583&r1=1058582&r2=1058583&view=diff ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/URIPathDescriptor.java (original) +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/URIPathDescriptor.java Thu Jan 13 14:42:06 2011 @@ -133,7 +133,7 @@ public class URIPathDescriptor return link; } - final String relativePath = PathTool.getRelativeFilePath( newBaseURI.getPath(), link.getPath() ); + final String relativePath = PathTool.getRelativeWebPath( newBaseURI.getPath(), link.getPath() ); try { @@ -184,7 +184,7 @@ public class URIPathDescriptor return resolveLink(); } - final String relativeBasePath = PathTool.getRelativeFilePath( newBaseURI.getPath(), baseURI.getPath() ); + final String relativeBasePath = PathTool.getRelativeWebPath( newBaseURI.getPath(), baseURI.getPath() ); try { Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtilsTest.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtilsTest.java?rev=1058583&r1=1058582&r2=1058583&view=diff ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtilsTest.java (original) +++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtilsTest.java Thu Jan 13 14:42:06 2011 @@ -67,11 +67,11 @@ public class PathUtilsTest { PathDescriptor oldPath = new PathDescriptor( "http://maven.apache.org/", "source" ); PathDescriptor newPath = new PathDescriptor( "http://maven.apache.org/", "target" ); - assertEquals( ".." + SLASH + "source", PathUtils.getRelativePath( oldPath, newPath ) ); + assertEquals( "../source", PathUtils.getRelativePath( oldPath, newPath ) ); oldPath = new PathDescriptor( "scp://people.apache.org/", "source" ); newPath = new PathDescriptor( "scp://people.apache.org/", "target" ); // same with scp URLs fails?! DOXIASITETOOLS-47 - //assertEquals( ".." + SLASH + "source", PathUtils.getRelativePath( oldPath, newPath ) ); + //assertEquals( "../source", PathUtils.getRelativePath( oldPath, newPath ) ); } }