You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2009/06/20 21:48:12 UTC
svn commit: r786896 -
/maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
Author: ltheussl
Date: Sat Jun 20 19:48:12 2009
New Revision: 786896
URL: http://svn.apache.org/viewvc?rev=786896&view=rev
Log:
Use SiteTool's getRelativePath
Modified:
maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
Modified: maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java?rev=786896&r1=786895&r2=786896&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java (original)
+++ maven/plugins/trunk/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java Sat Jun 20 19:48:12 2009
@@ -45,8 +45,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
-//TODO: replace with something equivalent in plexus.util
-import org.apache.maven.wagon.PathUtils;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.util.FileUtils;
@@ -390,11 +388,13 @@
{
final Locale locale = getDefaultLocale();
- final File descriptorFile =
- siteTool.getSiteDescriptorFromBasedir( PathUtils.toRelative( project.getBasedir(),
- siteDirectory.getAbsolutePath() ),
- project.getBasedir(), locale );
+ final File basedir = project.getBasedir();
+ final String relativePath = siteTool.getRelativePath(
+ basedir.getAbsolutePath(), siteDirectory.getAbsolutePath() );
+
+ final File descriptorFile = siteTool.getSiteDescriptorFromBasedir( relativePath, basedir, locale );
DecorationModel decoration = null;
+
if ( descriptorFile.exists() )
{
XmlStreamReader reader = null;