| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Copyright (C) 2009-2010 the original author or authors. |
| See the notice.md file distributed with this work for additional |
| information regarding copyright ownership. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <project name="generate-pdfs" default="all" basedir="."> |
| |
| <property name="sitegen" value="${basedir}/target/sitegen"/> |
| <property name="target" value="${basedir}/target"/> |
| |
| <macrodef name="prince"> |
| <attribute name="document" /> |
| <attribute name="input" default="${sitegen}/@{document}.html"/> |
| <attribute name="output" default="${sitegen}/@{document}.pdf"/> |
| <sequential> |
| <echo message="Running Prince XML (http://princexml.com) on @{input}" /> |
| <exec executable="prince"> |
| <arg value="@{input}" /> |
| <arg value="@{output}" /> |
| <arg value="--log"/> |
| <arg value="${target}/prince.log"/> |
| </exec> |
| <echo message="Successfully created @{output}"/> |
| </sequential> |
| </macrodef> |
| |
| <target name="jbi" description="Generate the JBI Guide PDF"> |
| <prince document="jbi/jbi-guide"/> |
| </target> |
| |
| <target name="guide" description="Generate the User Guide PDF"> |
| <prince document="users-guide/manual"/> |
| </target> |
| |
| <target name="all" depends="jbi,guide" description="Generate all the PDF documents"> |
| <!-- convenience target to generate all the PDFs --> |
| </target> |
| |
| </project> |