You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:17:52 UTC
[maven-pdf-plugin] branch master2 created (now 7301ba1)
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a change to branch master2
in repository https://gitbox.apache.org/repos/asf/maven-pdf-plugin.git.
at 7301ba1 [MPDF-84] display pdf generated file(s) location
This branch includes the following new commits:
new 7301ba1 [MPDF-84] display pdf generated file(s) location
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@maven.apache.org" <co...@maven.apache.org>'].
[maven-pdf-plugin] 01/01: [MPDF-84] display pdf generated file(s)
location
Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master2
in repository https://gitbox.apache.org/repos/asf/maven-pdf-plugin.git
commit 7301ba177c1862bec099e116baee4495a0270ade
Author: Herve Boutemy <hb...@apache.org>
AuthorDate: Sat Nov 25 17:44:22 2017 +0000
[MPDF-84] display pdf generated file(s) location
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1816336 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java b/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
index 06106db..f5330a5 100644
--- a/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
+++ b/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java
@@ -449,10 +449,7 @@ public class PdfMojo
private void copyGeneratedPdf()
throws MojoExecutionException, IOException
{
- if ( outputDirectory.getCanonicalPath().equals( workingDirectory.getCanonicalPath() ) )
- {
- return;
- }
+ boolean requireCopy = !outputDirectory.getCanonicalPath().equals( workingDirectory.getCanonicalPath() );
String outputName = getDocumentModel( getDefaultLocale() ).getOutputName().trim();
if ( !outputName.endsWith( ".pdf" ) )
@@ -472,8 +469,13 @@ public class PdfMojo
File generatedPdfDest = new File( getLocaleDirectory( outputDirectory, locale ), outputName );
- FileUtils.copyFile( generatedPdfSource, generatedPdfDest );
- generatedPdfSource.delete();
+ if ( requireCopy )
+ {
+ FileUtils.copyFile( generatedPdfSource, generatedPdfDest );
+ generatedPdfSource.delete();
+ }
+
+ getLog().info( "pdf generated: " + generatedPdfDest );
}
}
--
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.