blob: c82e95306df7b6068dacea81715213508fdbb4bb [file] [log] [blame]
<?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)" />
<echo message=" converting @{input}"/>
<echo message=" into @{output}"/>
<exec executable="prince" failifexecutionfails="${pdf.required}">
<arg value="@{input}" />
<arg value="@{output}" />
<arg value="--log"/>
<arg value="${target}/prince.log"/>
</exec>
</sequential>
</macrodef>
<target name="jbi" description="Generate the JBI Guide PDF">
<prince document="jbi/jbi-guide"/>
</target>
<target name="camel" description="Generate the Camel Guide PDF">
<prince document="users-guide/camel/manual"/>
</target>
<target name="getting-started" description="Generate the Getting Started Guide PDF">
<prince document="users-guide/getting-started/manual"/>
</target>
<target name="migration" description="Generate the Migration Guide PDF">
<prince document="users-guide/migration/manual"/>
</target>
<target name="nmr" description="Generate the NMR Guide PDF">
<prince document="users-guide/nmr/manual"/>
</target>
<target name="all" depends="jbi,camel,getting-started,migration,nmr" description="Generate all the PDF documents">
<!-- convenience target to generate all the PDFs -->
</target>
</project>