You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by dj...@apache.org on 2011/08/31 08:09:28 UTC

svn commit: r1163494 - in /karaf/trunk: manual/pom.xml pom.xml

Author: djencks
Date: Wed Aug 31 06:09:27 2011
New Revision: 1163494

URL: http://svn.apache.org/viewvc?rev=1163494&view=rev
Log:
KARAF-832 use pdf-manual profile for pdf manual generation, always generate html manual

Modified:
    karaf/trunk/manual/pom.xml
    karaf/trunk/pom.xml

Modified: karaf/trunk/manual/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/manual/pom.xml?rev=1163494&r1=1163493&r2=1163494&view=diff
==============================================================================
--- karaf/trunk/manual/pom.xml (original)
+++ karaf/trunk/manual/pom.xml Wed Aug 31 06:09:27 2011
@@ -291,52 +291,6 @@
                 </dependencies>
             </plugin>
             <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.2</version>
-                <executions>
-                    <execution>
-                        <id>attach-manual</id>
-                        <phase>install</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks>
-                                <taskdef name="trycatch" classname="net.sf.antcontrib.logic.TryCatchTask" classpathref="maven.plugin.classpath" />
-                                <mkdir dir="${manual.dir}" />
-                                <move file="${project.build.directory}/sitegen/manual.html" tofile="${manual}.html" />
-                                <trycatch property="error">
-                                    <try>
-                                        <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>
-                                    </try>
-                                    <catch>
-                                        <if>
-                                            <equals arg1="${must-succeed}" arg2="true" />
-                                            <then>
-                                                <echo>ERROR: ${error}</echo>
-                                                <fail>${error}</fail>
-                                            </then>
-                                            <else>
-                                                <echo>ERROR: ${error}</echo>
-                                                <echo>Falling back to dummy manuals</echo>
-                                                <copy file="src/fallback/manual.html" tofile="${manual}.html" />
-                                                <copy file="src/fallback/manual.pdf" tofile="${manual}.pdf" />
-                                            </else>
-                                        </if>
-                                    </catch>
-                                </trycatch>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
                 <version>1.5</version>
@@ -350,10 +304,6 @@
                         <configuration>
                             <artifacts>
                                 <artifact>
-                                    <file>${manual}.pdf</file>
-                                    <type>pdf</type>
-                                </artifact>
-                                <artifact>
                                     <file>${manual}.html</file>
                                     <type>html</type>
                                 </artifact>
@@ -462,6 +412,62 @@
             </properties>
         </profile>
         <profile>
+            <id>pdf-manual</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.2</version>
+                        <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>
+                        <version>1.5</version>
+                        <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>
+        <profile>
             <id>release</id>
             <properties>
                 <must-succeed>true</must-succeed>

Modified: karaf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/pom.xml?rev=1163494&r1=1163493&r2=1163494&view=diff
==============================================================================
--- karaf/trunk/pom.xml (original)
+++ karaf/trunk/pom.xml Wed Aug 31 06:09:27 2011
@@ -53,6 +53,7 @@
         <module>tooling</module>
         <module>archetypes</module>
         <module>diagnostic</module>
+        <module>manual</module>
     </modules>
 
     <scm>
@@ -1469,12 +1470,6 @@
             </properties>
         </profile>
         <profile>
-            <id>manual</id>
-            <modules>
-                <module>manual</module>
-            </modules>
-        </profile>
-        <profile>
             <id>rat</id>
             <build>
                 <plugins>
@@ -1513,9 +1508,6 @@
         </profile>
         <profile>
             <id>release</id>
-            <modules>
-                <module>manual</module>
-            </modules>
             <build>
                 <plugins>
                     <!-- We want to deploy the artifact to a staging location for perusal -->