Filippo Diotalevi | f9ecbd6 | 2009-10-13 12:55:35 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <!-- |
| 4 | Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | contributor license agreements. See the NOTICE file distributed with |
| 6 | this work for additional information regarding copyright ownership. |
| 7 | The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | (the "License"); you may not use this file except in compliance with |
| 9 | the License. You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | --> |
| 19 | |
| 20 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 21 | |
| 22 | <parent> |
| 23 | <groupId>org.apache.felix.karaf</groupId> |
| 24 | <artifactId>karaf</artifactId> |
| 25 | <version>1.1.0-SNAPSHOT</version> |
| 26 | </parent> |
| 27 | |
| 28 | <modelVersion>4.0.0</modelVersion> |
| 29 | <groupId>org.apache.felix.karaf</groupId> |
| 30 | <artifactId>manual</artifactId> |
| 31 | <version>1.1.0-SNAPSHOT</version> |
| 32 | <packaging>pom</packaging> |
| 33 | <name>Karaf :: Manual</name> |
| 34 | <description>The Karaf Manual which generates a HTML and PDF representation of the manual.</description> |
| 35 | |
| 36 | <build> |
| 37 | <plugins> |
| 38 | |
| 39 | <plugin> |
| 40 | <artifactId>maven-antrun-plugin</artifactId> |
| 41 | <version>1.2</version> |
| 42 | <executions> |
| 43 | <execution> |
| 44 | <configuration> |
| 45 | <tasks> |
| 46 | <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask" classpathref="maven.plugin.classpath"/> |
| 47 | <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" /> |
| 48 | <mkdir dir="target/site/manual"/> |
| 49 | <get src="http://cwiki.apache.org/confluence/display/FELIX/Karaf+Users%27+Guide+in+one+page" |
| 50 | dest="target/site/manual/manual.html" /> |
| 51 | <for list="1,2,3,4,5,6,7,8,9,10" param="letter"> |
| 52 | <sequential> |
| 53 | <replaceregexp |
| 54 | file="target/site/manual/manual.html" |
| 55 | flags="g" |
| 56 | match='"/confluence/display/FELIX/([^"]*)\+([^"+]*)"' |
| 57 | replace='"/confluence/display/FELIX/\1\2"' /> |
| 58 | </sequential> |
| 59 | </for> |
| 60 | <replaceregexp |
| 61 | file="target/site/manual/manual.html" |
| 62 | flags="g" |
| 63 | match='"/confluence/display/FELIX/([^"]*)"' |
| 64 | replace='"#KarafUsers%27Guideinonepage-\1"' /> |
| 65 | <replaceregexp |
| 66 | file="target/site/manual/manual.html" |
| 67 | flags="g" |
| 68 | match='"/confluence/([^"]*)"' |
| 69 | replace='"http://cwiki.apache.org/confluence/\1"' /> |
| 70 | </tasks> |
| 71 | </configuration> |
| 72 | <goals> |
| 73 | <goal>run</goal> |
| 74 | </goals> |
| 75 | <phase>generate-resources</phase> |
| 76 | </execution> |
| 77 | </executions> |
| 78 | <dependencies> |
| 79 | <dependency> |
| 80 | <groupId>ant-contrib</groupId> |
| 81 | <artifactId>ant-contrib</artifactId> |
| 82 | <version>1.0b3</version> |
| 83 | </dependency> |
| 84 | <dependency> |
| 85 | <groupId>ant</groupId> |
| 86 | <artifactId>ant-optional</artifactId> |
| 87 | <version>1.5.3-1</version> |
| 88 | </dependency> |
| 89 | </dependencies> |
| 90 | </plugin> |
| 91 | |
| 92 | <plugin> |
| 93 | <groupId>org.apache.camel</groupId> |
| 94 | <artifactId>maven-html-to-pdf</artifactId> |
| 95 | <version>2.0.0</version> |
| 96 | <executions> |
| 97 | <execution> |
| 98 | <goals> |
| 99 | <goal>compile</goal> |
| 100 | </goals> |
| 101 | <phase>compile</phase> |
| 102 | </execution> |
| 103 | </executions> |
| 104 | <configuration> |
| 105 | <page>file://${basedir}/target/site/manual/manual.html</page> |
| 106 | <head><![CDATA[ |
| 107 | <link href="file:${basedir}/src/styles/print.css" rel="stylesheet" type="text/css" /> |
| 108 | <style type="text/css"> |
| 109 | @page :left { |
| 110 | @top-left { |
| 111 | content: "Apache Felix Karaf ${pom.version} Developer's Manual"; |
| 112 | } |
| 113 | } |
| 114 | </style> |
| 115 | ]]></head> |
| 116 | <replaceToken><![CDATA[ |
| 117 | >top</a> |
| 118 | ]]></replaceToken> |
| 119 | <replaceValue><![CDATA[ |
| 120 | ></a> |
| 121 | ]]></replaceValue> |
| 122 | </configuration> |
| 123 | </plugin> |
| 124 | <plugin> |
| 125 | <groupId>org.codehaus.mojo</groupId> |
| 126 | <artifactId>build-helper-maven-plugin</artifactId> |
| 127 | <executions> |
| 128 | <execution> |
| 129 | <id>attach-artifacts</id> |
| 130 | <phase>package</phase> |
| 131 | <goals> |
| 132 | <goal>attach-artifact</goal> |
| 133 | </goals> |
| 134 | <configuration> |
| 135 | <artifacts> |
| 136 | <!-- Don't need to attach PDF here because the html-to-pdf plugin did that already --> |
| 137 | <artifact> |
| 138 | <file>${project.build.directory}/site/manual/manual-${project.version}.html</file> |
| 139 | <type>html</type> |
| 140 | </artifact> |
| 141 | </artifacts> |
| 142 | </configuration> |
| 143 | </execution> |
| 144 | </executions> |
| 145 | </plugin> |
| 146 | </plugins> |
| 147 | </build> |
| 148 | |
| 149 | |
| 150 | </project> |