MPPDF-31 : Can't insert the logo image described in the POM if its path begins with /

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@232599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier 2005-08-14 11:36:37 +00:00
parent 98db06423c
commit ae119ea551
3 changed files with 19 additions and 15 deletions

View File

@ -39,19 +39,19 @@
pattern="${maven.xdoc.date.format}" pattern="${maven.xdoc.date.format}"
locale="${maven.xdoc.date.locale}"/> locale="${maven.xdoc.date.locale}"/>
</tstamp> </tstamp>
<j:if test="not ${maven.pdf.projectLogo.startsWith('http://')}"> <j:set var="image" value="${maven.pdf.projectLogo}"/>
<maven:makeAbsolutePath <j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
var="maven.pdf.projectLogo" <j:if test="${image.startsWith('/')}" trim="yes">
basedir="${maven.xdoc.src}" <j:set var="image" value="${image.substring(1)}"/>
path="${maven.pdf.projectLogo}" </j:if>
trim="true"/> <j:set var="maven.pdf.projectLogo" value="${image}"/>
</j:if> </j:if>
<j:if test="not ${maven.pdf.companyLogo.startsWith('http://')}"> <j:set var="image" value="${maven.pdf.companyLogo}"/>
<maven:makeAbsolutePath <j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
var="maven.pdf.companyLogo" <j:if test="${image.startsWith('/')}" trim="yes">
basedir="${maven.xdoc.src}" <j:set var="image" value="${image.substring(1)}"/>
path="${maven.pdf.companyLogo}" </j:if>
trim="true"/> <j:set var="maven.pdf.companyLogo" value="${image}"/>
</j:if> </j:if>
<!-- internal variables --> <!-- internal variables -->

View File

@ -17,5 +17,3 @@
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S # P R O J E C T P R O P E R T I E S
# ------------------------------------------------------------------- # -------------------------------------------------------------------
maven.pdf.projectLogo=${maven.docs.src}/images/maven.gif
maven.pdf.companyLogo=${maven.docs.src}/images/asf_logo_wide_clear.gif

View File

@ -21,6 +21,12 @@
<artifactId>maven-pdf-plugin</artifactId> <artifactId>maven-pdf-plugin</artifactId>
<name>Maven PDF Plug-in</name> <name>Maven PDF Plug-in</name>
<currentVersion>2.3.1-SNAPSHOT</currentVersion> <currentVersion>2.3.1-SNAPSHOT</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
<logo>/images/asf_logo_wide_clear.gif</logo>
</organization>
<logo>/images/maven.gif</logo>
<description>PDF Documentation generator</description> <description>PDF Documentation generator</description>
<shortDescription>Generator of project documentation in PDF Format.</shortDescription> <shortDescription>Generator of project documentation in PDF Format.</shortDescription>
<url>http://maven.apache.org/reference/plugins/pdf/</url> <url>http://maven.apache.org/reference/plugins/pdf/</url>