MPPDF-35: Standardize copyright notices.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@232666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f7ba3c0aea
commit
d99bfe6f60
108
pdf/plugin.jelly
108
pdf/plugin.jelly
@ -16,29 +16,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:maven="jelly:maven">
|
||||
|
||||
|
||||
<project xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven">
|
||||
<goal name="pdf:init" prereqs="xdoc:init">
|
||||
|
||||
<!-- xdoc plugin properties -->
|
||||
<maven:get var="maven.xdoc.src" plugin="maven-xdoc-plugin" property="maven.docs.src"/>
|
||||
<maven:get var="maven.xdoc.dest" plugin="maven-xdoc-plugin" property="maven.docs.dest"/>
|
||||
<maven:get var="maven.xdoc.gen" plugin="maven-xdoc-plugin" property="maven.gen.docs"/>
|
||||
<maven:get var="maven.xdoc.date.format" plugin="maven-xdoc-plugin" property="maven.xdoc.date.format"/>
|
||||
<maven:get var="maven.xdoc.date.locale" plugin="maven-xdoc-plugin" property="maven.xdoc.date.locale"/>
|
||||
|
||||
<maven:get var="maven.xdoc.src" plugin="maven-xdoc-plugin" property="maven.docs.src"/>
|
||||
<maven:get var="maven.xdoc.dest" plugin="maven-xdoc-plugin" property="maven.docs.dest"/>
|
||||
<maven:get var="maven.xdoc.gen" plugin="maven-xdoc-plugin" property="maven.gen.docs"/>
|
||||
<maven:get var="maven.xdoc.date.format" plugin="maven-xdoc-plugin" property="maven.xdoc.date.format"/>
|
||||
<maven:get var="maven.xdoc.date.locale" plugin="maven-xdoc-plugin" property="maven.xdoc.date.locale"/>
|
||||
<tstamp>
|
||||
<format
|
||||
property="maven.pdf.cover.date"
|
||||
pattern="${maven.xdoc.date.format}"
|
||||
locale="${maven.xdoc.date.locale}"/>
|
||||
</tstamp>
|
||||
<format property="maven.pdf.cover.date" pattern="${maven.xdoc.date.format}" locale="${maven.xdoc.date.locale}"/>
|
||||
<format property="mavenCurrentYear" pattern="yyyy"/>
|
||||
</tstamp>
|
||||
<j:set var="image" value="${maven.pdf.projectLogo}"/>
|
||||
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
|
||||
<j:if test="${image.startsWith('/')}" trim="yes">
|
||||
@ -53,10 +42,8 @@
|
||||
</j:if>
|
||||
<j:set var="maven.pdf.companyLogo" value="${image}"/>
|
||||
</j:if>
|
||||
|
||||
<!-- internal variables -->
|
||||
<j:set var="internal_pdf_workingDir" value="${maven.build.dir}/pdf"/>
|
||||
|
||||
<j:if test="${maven.pdf.debug}">
|
||||
<ant:echo>
|
||||
### Debug mode is on ###
|
||||
@ -98,34 +85,26 @@ internal_pdf_workingDir = [${internal_pdf_workingDir}]
|
||||
### Debug mode is off ###
|
||||
</ant:echo>
|
||||
</j:if>
|
||||
|
||||
<!-- Create working directory -->
|
||||
<!-- Create working directory -->
|
||||
<mkdir dir="${internal_pdf_workingDir}"/>
|
||||
</goal>
|
||||
|
||||
|
||||
<goal
|
||||
name="fo"
|
||||
prereqs="fo:fo"
|
||||
description="This simply pre-requisites the fo:fo goal. "/>
|
||||
|
||||
|
||||
<goal
|
||||
name="fo:fo"
|
||||
prereqs="pdf:prepare"
|
||||
description="Generates an fo xml document from the ${maven.pdf.navigationFile} file supplied as part of the documentation.">
|
||||
|
||||
<goal name="fo" prereqs="fo:fo" description="This simply pre-requisites the fo:fo goal. "/>
|
||||
<goal name="fo:fo" prereqs="pdf:prepare" description="Generates an fo xml document from the ${maven.pdf.navigationFile} file supplied as part of the documentation.">
|
||||
<echo>Generating ${internal_pdf_workingDir}/project.fo from ${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile} ...</echo>
|
||||
<available file="${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile}" property="maven.fo.navigation.available"/>
|
||||
<fail
|
||||
message="PDF generation cannot complete as ${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile} is missing"
|
||||
unless="maven.fo.navigation.available"/>
|
||||
|
||||
<xslt
|
||||
in="${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile}"
|
||||
out="${internal_pdf_workingDir}/project.fo"
|
||||
style="${plugin.resources}/project2fo.xslt"
|
||||
force="true">
|
||||
<fail message="PDF generation cannot complete as ${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile} is missing" unless="maven.fo.navigation.available"/>
|
||||
<j:if test="${empty(maven.pdf.copyrightYear)}">
|
||||
<j:set var="maven.pdf.copyrightYear">
|
||||
<j:if test="${!empty(pom.organization.name)}">
|
||||
<j:if test="${!empty(pom.inceptionYear)}">
|
||||
<j:if test="${pom.inceptionYear == mavenCurrentYear}">${mavenCurrentYear}</j:if>
|
||||
<j:if test="${pom.inceptionYear != mavenCurrentYear}">${pom.inceptionYear}-${mavenCurrentYear}</j:if>
|
||||
</j:if>
|
||||
<j:if test="${empty(pom.inceptionYear)}">${mavenCurrentYear}</j:if>
|
||||
</j:if>
|
||||
</j:set>
|
||||
</j:if>
|
||||
<xslt in="${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile}" out="${internal_pdf_workingDir}/project.fo" style="${plugin.resources}/project2fo.xslt" force="true">
|
||||
<param name="basePath" expression="${internal_pdf_workingDir}"/>
|
||||
<param name="confidential" expression="${maven.pdf.confidential}"/>
|
||||
<param name="paperType" expression="${maven.pdf.paperType}"/>
|
||||
@ -141,20 +120,9 @@ internal_pdf_workingDir = [${internal_pdf_workingDir}]
|
||||
<param name="imageDpi" expression="${maven.pdf.imageDpi}"/>
|
||||
<param name="debug" expression="${maven.pdf.debug}"/>
|
||||
</xslt>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
<goal
|
||||
name="pdf"
|
||||
prereqs="fo:fo,pdf:prepare,pdf:pdf"
|
||||
description="This is the default goal of the plugin and simply pre-requisites the pdf:pdf goal. "/>
|
||||
|
||||
|
||||
<goal
|
||||
name="pdf:prepare"
|
||||
prereqs="pdf:init"
|
||||
description="Stages all files needed to generate the PDF">
|
||||
<goal name="pdf" prereqs="fo:fo,pdf:prepare,pdf:pdf" description="This is the default goal of the plugin and simply pre-requisites the pdf:pdf goal. "/>
|
||||
<goal name="pdf:prepare" prereqs="pdf:init" description="Stages all files needed to generate the PDF">
|
||||
<!-- First, copy all of the generated xdocs -->
|
||||
<copy todir="${internal_pdf_workingDir}">
|
||||
<fileset dir="${maven.xdoc.gen}" force="true">
|
||||
@ -183,13 +151,7 @@ internal_pdf_workingDir = [${internal_pdf_workingDir}]
|
||||
</fileset>
|
||||
</copy>
|
||||
</goal>
|
||||
|
||||
|
||||
<goal
|
||||
name="pdf:pdf"
|
||||
description="Generates a PDF document containing all project documentation. The PDF is generated from the .fo file generated in the fo:fo goal."
|
||||
prereqs="pdf:prepare">
|
||||
|
||||
<goal name="pdf:pdf" description="Generates a PDF document containing all project documentation. The PDF is generated from the .fo file generated in the fo:fo goal." prereqs="pdf:prepare">
|
||||
<echo>Generating ${internal_pdf_workingDir}/${maven.pdf.pdfName} ...</echo>
|
||||
<echo>Config file: ${internal_pdf_workingDir}/userconfig.xml</echo>
|
||||
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
|
||||
@ -216,15 +178,15 @@ internal_pdf_workingDir = [${internal_pdf_workingDir}]
|
||||
<pathelement location="${plugin.getDependencyPath('avalon-framework')}"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
<fop>
|
||||
<ant:setProperty name="basedir" value="${internal_pdf_workingDir}" />
|
||||
<ant:setProperty name="userconfig" value="${internal_pdf_workingDir}/userconfig.xml" />
|
||||
<fop>
|
||||
<ant:setProperty name="basedir" value="${internal_pdf_workingDir}"/>
|
||||
<ant:setProperty name="userconfig" value="${internal_pdf_workingDir}/userconfig.xml"/>
|
||||
<if test="${maven.pdf.debug}">
|
||||
<ant:setProperty name="messagelevel" value="debug" />
|
||||
<ant:setProperty name="messagelevel" value="debug"/>
|
||||
</if>
|
||||
<ant:setProperty name="fofile" value="${internal_pdf_workingDir}/project.fo" />
|
||||
<ant:setProperty name="outfile" value="${internal_pdf_workingDir}/${maven.pdf.pdfName}" />
|
||||
</fop>
|
||||
<ant:setProperty name="fofile" value="${internal_pdf_workingDir}/project.fo"/>
|
||||
<ant:setProperty name="outfile" value="${internal_pdf_workingDir}/${maven.pdf.pdfName}"/>
|
||||
</fop>
|
||||
<copy todir="${maven.xdoc.dest}" file="${internal_pdf_workingDir}/${maven.pdf.pdfName}"/>
|
||||
</goal>
|
||||
</project>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
maven.pdf.confidential=false
|
||||
maven.pdf.paperType=A4
|
||||
maven.pdf.companyIncName=${pom.organization.name}
|
||||
maven.pdf.copyrightYear=${pom.inceptionYear}
|
||||
#maven.pdf.copyrightYear=Not defined by default
|
||||
maven.pdf.imageDpi=72
|
||||
maven.pdf.debug=false
|
||||
maven.pdf.navigationFile=navigation.xml
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<xsl:with-param name="headerText" select="translate('Table of Contents', $lc, $uc)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="body-footer">
|
||||
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
|
||||
<xsl:with-param name="footerText" select="$footerText"/>
|
||||
</xsl:call-template>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<!-- Render the chapter heading -->
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<xsl:param name="paperType">US</xsl:param>
|
||||
<xsl:param name="companyIncName">Apache Software Foundation, Inc.</xsl:param>
|
||||
<xsl:param name="confidential">false</xsl:param>
|
||||
<xsl:param name="publicationYear">2003</xsl:param>
|
||||
<xsl:param name="publicationYear"/>
|
||||
<xsl:param name="imageDpi">150</xsl:param>
|
||||
<xsl:param name="companyLogo"/>
|
||||
<xsl:param name="projectLogo"/>
|
||||
@ -43,7 +43,7 @@
|
||||
<xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
|
||||
<xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
|
||||
<xsl:variable name="footerText">©<xsl:value-of select="$publicationYear"/>
|
||||
<xsl:value-of select="concat(' ',$companyIncName)"/> • All rights reserved<xsl:if test="$confidential = 'true'">• Proprietary and Confidential</xsl:if>
|
||||
<xsl:value-of select="concat(', ',$companyIncName)"/> • ALL RIGHTS RESERVED<xsl:if test="$confidential = 'true'">• PROPRIETARY AND CONFIDENTIAL</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="colorDarkGray">#454545</xsl:variable>
|
||||
<xsl:variable name="colorMediumGray">#A9A9A9</xsl:variable>
|
||||
@ -145,7 +145,7 @@
|
||||
<xsl:with-param name="headerText" select="concat($chapterNumber, ' ', translate(@name, $lc, $uc))"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="body-footer">
|
||||
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
|
||||
<xsl:with-param name="footerText" select="$footerText"/>
|
||||
</xsl:call-template>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<!-- Render the chapter heading -->
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
<body>
|
||||
<release version="2.3.1-SNAPSHOT" date="In SVN">
|
||||
<action dev="aheritier" type="fix" issue="MPPDF-39" due-to="Lukas Theussl">Missing patch for MPPDF-24 ( it defines a missing attribute for <code style="indent"> tags and cleans up some layout issues with definition lists).</action>
|
||||
<action dev="aheritier" type="fix" issue="MPPDF-35" due-to="Lukas Theussl">Standardize copyright notices.</action>
|
||||
<action dev="aheritier" type="fix" issue="MPPDF-33" due-to="Valerie Nyre">Fix some "contents overflows area" errors.</action>
|
||||
<action dev="aheritier" type="fix" issue="MPPDF-31" due-to="Lukas Theussl">Can't insert the logo image described in the POM if its path begins with a slash (as it works for the xdoc plugin).</action>
|
||||
<action dev="aheritier" type="fix" issue="MPPDF-22" due-to="Lukas Theussl">Allow copy and paste from pdf to text editor.</action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user