[KARAF-2782] Isolate PDF manual generation in a specific profile
diff --git a/manual/pom.xml b/manual/pom.xml
index a050bb1..26cfb37 100644
--- a/manual/pom.xml
+++ b/manual/pom.xml
@@ -129,35 +129,6 @@
                 </dependencies>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.6</version>
-                <executions>
-                    <execution>
-                        <id>create-manual</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks>
-                                <mkdir dir="${manual.dir}"/>
-                                <move file="${project.build.directory}/sitegen/manual.html" tofile="${manual}.html"/>
-                                <echo message="Generating PDF using Prince XML (http://www.princexml.com/)"/>
-                                <exec executable="prince">
-                                    <arg value="${manual}.html"/>
-                                    <arg value="${manual}.pdf"/>
-                                    <arg value="--log"/>
-                                    <arg value="${project.build.directory}/prince.log"/>
-                                </exec>
-                                <attachartifact file="${manual}.html" type="html"/>
-                                <attachartifact file="${manual}.pdf" type="pdf"/>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <artifactId>maven-war-plugin</artifactId>
                 <version>2.1</version>
                 <configuration>
@@ -207,7 +178,63 @@
             </plugin>
         </plugins>
     </build>
+    <profiles>
+         <profile>
+            <id>pdf-manual</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-manual</id>
+                                <phase>install</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <mkdir dir="${manual.dir}" />
+                                        <move file="${project.build.directory}/sitegen/manual.html" tofile="${manual}.html" />
+                                        <echo message="Generating PDF using Prince XML (http://www.princexml.com/)" />
+                                        <exec executable="prince">
+                                            <arg value="${manual}.html" />
+                                            <arg value="${manual}.pdf" />
+                                            <arg value="--log" />
+                                            <arg value="${project.build.directory}/prince.log" />
+                                        </exec>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-artifacts</id>
+                                <phase>install</phase>
+                                <goals>
+                                    <goal>attach-artifact</goal>
+                                </goals>
+                                <configuration>
+                                    <artifacts>
+                                        <artifact>
+                                            <file>${manual}.pdf</file>
+                                            <type>pdf</type>
+                                        </artifact>
+                                    </artifacts>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
 
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
     <reporting>
         <plugins>
             <plugin>