You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2011/02/01 22:27:13 UTC

svn commit: r1066223 - in /servicemix/documentation/trunk: ./ src/main/ant/ src/main/scripts/ src/main/webapp/jbi/ src/main/webapp/users-guide/camel/ src/main/webapp/users-guide/nmr/

Author: gertv
Date: Tue Feb  1 21:27:12 2011
New Revision: 1066223

URL: http://svn.apache.org/viewvc?rev=1066223&view=rev
Log:
Improve build to ease configuration when building multiple PDF files

Added:
    servicemix/documentation/trunk/src/main/scripts/GeneratePdfDocuments.scala
    servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.pdf.conf
      - copied, changed from r1060273, servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.conf
    servicemix/documentation/trunk/src/main/webapp/users-guide/camel/camel-guide.pdf.conf
      - copied, changed from r1060273, servicemix/documentation/trunk/src/main/webapp/users-guide/camel/manual.conf
    servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/nmr-guide.pdf.conf
      - copied, changed from r1060273, servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/manual.conf
Removed:
    servicemix/documentation/trunk/src/main/ant/generate-pdfs.xml
    servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.conf
    servicemix/documentation/trunk/src/main/webapp/users-guide/camel/manual.conf
    servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/manual.conf
Modified:
    servicemix/documentation/trunk/pom.xml

Modified: servicemix/documentation/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/documentation/trunk/pom.xml?rev=1066223&r1=1066222&r2=1066223&view=diff
==============================================================================
--- servicemix/documentation/trunk/pom.xml (original)
+++ servicemix/documentation/trunk/pom.xml Tue Feb  1 21:27:12 2011
@@ -21,475 +21,464 @@
 
 <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">
 
-  <parent>
+    <parent>
+        <groupId>org.apache.servicemix</groupId>
+        <artifactId>servicemix-pom</artifactId>
+        <version>4</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
     <groupId>org.apache.servicemix</groupId>
-    <artifactId>servicemix-pom</artifactId>
-    <version>4</version>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.servicemix</groupId>
-  <artifactId>documentation</artifactId>
-  <name>Apache ServiceMix Documentation</name>
-  <version>4.3.0-SNAPSHOT</version>
-  <packaging>war</packaging>
-
-  <properties>
-    <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
-    <jetty-port>8080</jetty-port>
-    <webapp.srcdir>${project.basedir}/src/main/webapp</webapp.srcdir>
-    <webapp.dir>${project.build.directory}/webapp</webapp.dir>
-    <maven.wagon.version>1.0-beta-6</maven.wagon.version>
-
-    <pdf.required>false</pdf.required>
-
-    <scala.version>2.8.1</scala.version>
-
-    <scalate.version>1.4.0-SNAPSHOT</scalate.version>
-    <scalate.mode>production</scalate.mode>
-    <scalate.workdir>${basedir}/target/scalateWorkDir</scalate.workdir>
-
-    <components.version>2011.01-SNAPSHOT</components.version>
-    <karaf.version>2.1.99-SNAPSHOT</karaf.version>
-    <servicemix.version>4.3.0-SNAPSHOT</servicemix.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.fusesource.scalate</groupId>
-      <artifactId>scalate-wikitext</artifactId>
-      <version>${scalate.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.fusesource.scalate</groupId>
-      <artifactId>scalate-page</artifactId>
-      <version>${scalate.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>ch.qos.logback</groupId>
-      <artifactId>logback-classic</artifactId>
-      <version>0.9.24</version>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>1.6.0</version>
-    </dependency>
-
-      <!-- ensure that the components are available in the local repo -->
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-bean</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-cxf-bc</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-cxf-se</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-drools</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-eip</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-exec</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>      
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-file</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-ftp</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-http</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-jms</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-mail</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-osworkflow</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-quartz</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>      
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-saxon</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-scripting</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-snmp</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-validation</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-vfs</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.servicemix</groupId>
-          <artifactId>servicemix-xmpp</artifactId>
-          <version>${components.version}</version>
-          <scope>provided</scope>
-          <optional>true</optional>
-      </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.8</version>
-      <scope>test</scope>
-    </dependency>
-      <dependency>
-        <groupId>org.fusesource.scalate</groupId>
-        <artifactId>maven-scalate-plugin</artifactId>
-        <version>${scalate.version}</version>
-        <scope>test</scope>
-      </dependency>
-  </dependencies>
+    <artifactId>documentation</artifactId>
+    <name>Apache ServiceMix Documentation</name>
+    <version>4.3.0-SNAPSHOT</version>
+    <packaging>war</packaging>
+
+    <properties>
+        <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
+        <jetty-port>8080</jetty-port>
+        <webapp.srcdir>${project.basedir}/src/main/webapp</webapp.srcdir>
+        <webapp.dir>${project.build.directory}/webapp</webapp.dir>
+        <maven.wagon.version>1.0-beta-6</maven.wagon.version>
+
+        <pdf.required>false</pdf.required>
+
+        <scala.version>2.8.1</scala.version>
+
+        <scalate.version>1.4.0-SNAPSHOT</scalate.version>
+        <scalate.mode>production</scalate.mode>
+        <scalate.workdir>${basedir}/target/scalateWorkDir</scalate.workdir>
+
+        <components.version>2011.01-SNAPSHOT</components.version>
+        <karaf.version>2.1.99-SNAPSHOT</karaf.version>
+        <servicemix.version>4.3.0-SNAPSHOT</servicemix.version>
+    </properties>
 
-  <dependencyManagement>
     <dependencies>
-      <dependency>
-        <groupId>org.scala-lang</groupId>
-        <artifactId>scala-compiler</artifactId>
-        <version>${scala.version}</version>
-      </dependency>      
-      <dependency>
-        <groupId>org.scala-lang</groupId>
-        <artifactId>scala-library</artifactId>
-        <version>${scala.version}</version>
-      </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.fusesource.scalate</groupId>
+            <artifactId>scalate-wikitext</artifactId>
+            <version>${scalate.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.fusesource.scalate</groupId>
+            <artifactId>scalate-page</artifactId>
+            <version>${scalate.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>0.9.24</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.6.0</version>
+        </dependency>
+
+        <!-- ensure that the components are available in the local repo -->
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-bean</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-cxf-bc</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-cxf-se</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-drools</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-eip</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-exec</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-file</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-ftp</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-http</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-jms</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-mail</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-osworkflow</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-quartz</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-saxon</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-scripting</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-snmp</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-validation</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-vfs</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-xmpp</artifactId>
+            <version>${components.version}</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.fusesource.scalate</groupId>
+            <artifactId>maven-scalate-plugin</artifactId>
+            <version>${scalate.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
-  </dependencyManagement>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.scala-tools</groupId>
-        <artifactId>maven-scala-plugin</artifactId>
-        <version>2.15.0</version>
-        <executions>
-          <execution>
-            <id>compile</id>
-            <goals>
-              <goal>compile</goal>
-              <goal>testCompile</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>generate-components-docs</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>script</goal>
-            </goals>
-            <configuration>
-              <includeScopes>plugin</includeScopes>
-              <scriptFile>src/main/scripts/GenerateComponentDocs.scala</scriptFile>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <!-- Unpack the manual sources into the /karaf subdirectory -->
-            <id>unpack-karaf-manual</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>unpack</goal>
-            </goals>
-            <configuration>
-              <artifactItems>
-                <artifactItem>
-                  <groupId>org.apache.karaf</groupId>
-                  <artifactId>org.apache.karaf.doc</artifactId>
-                  <version>${karaf.version}</version>
-                  <type>war</type>
-                  <outputDirectory>${project.build.directory}/webapp/karaf</outputDirectory>
-                  <includes>developers-guide/*.conf,users-guide/*.conf</includes>
-                </artifactItem>
-              </artifactItems>
-            </configuration>
-          </execution>
-          <execution>
-            <!-- Unpack the commands documentation sources into the /commands -->
-            <id>unpack-karaf-commands</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>unpack</goal>
-            </goals>
-            <configuration>
-              <artifactItems>
-                <artifactItem>
-                  <groupId>org.apache.karaf</groupId>
-                  <artifactId>org.apache.karaf.doc</artifactId>
-                  <version>${karaf.version}</version>
-                  <type>war</type>
-                  <outputDirectory>${project.build.directory}/webapp</outputDirectory>
-                  <includes>commands/*.conf</includes>
-                </artifactItem>
-              </artifactItems>
-            </configuration>
-          </execution>          
-        </executions>
-      </plugin>      
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>filter</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${webapp.dir}</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>${webapp.srcdir}</directory>
-                  <filtering>true</filtering>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.fusesource.scalate</groupId>
-        <artifactId>maven-scalate-plugin</artifactId>
-        <version>${scalate.version}</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>sitegen-no-fork</goal>
-            </goals>
-            <phase>prepare-package</phase>
-            <configuration>
-              <warSourceDirectory>${webapp.dir}</warSourceDirectory>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <warSourceDirectory>${webapp.dir}</warSourceDirectory>
-          <remoteServerId>people.apache.org</remoteServerId>
-          <remoteServerUrl>scp://people.apache.org/www/servicemix.apache.org/docs/${servicemix.version}</remoteServerUrl>
-        </configuration>
+    <dependencyManagement>
         <dependencies>
-          <dependency>
-            <groupId>org.apache.maven.wagon</groupId>
-            <artifactId>wagon-ssh</artifactId>
-            <version>${maven.wagon.version}</version>
-          </dependency>        
+            <dependency>
+                <groupId>org.scala-lang</groupId>
+                <artifactId>scala-compiler</artifactId>
+                <version>${scala.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.scala-lang</groupId>
+                <artifactId>scala-library</artifactId>
+                <version>${scala.version}</version>
+            </dependency>
         </dependencies>
-      </plugin>
-      <plugin>
-        <artifactId>maven-war-plugin</artifactId>
-        <version>2.1</version>
-        <configuration>
-          <warSourceDirectory>${webapp.dir}</warSourceDirectory>
-          <archive>
-            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>7.1.5.v20100705</version>
-        <configuration>
-          <webAppConfig>
-            <contextPath>/</contextPath>
-            <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
-              <resourcesAsCSV>${webapp.srcdir},${webapp.dir}</resourcesAsCSV>
-            </baseResource>
-          </webAppConfig>
-          <systemProperties>
-            <systemProperty>
-              <name>scalate.workdir</name>
-              <value>${scalate.workdir}</value>
-            </systemProperty>
-            <systemProperty>
-              <name>scalate.mode</name>
-              <value>${scalate.mode}</value>
-            </systemProperty>
-            <systemProperty>
-              <name>logback.configurationFile</name>
-              <value>${basedir}/src/etc/logback.xml</value>
-            </systemProperty>
-          </systemProperties>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.1.0</version>
-        <executions>
-          <execution>
-            <id>bundle-manifest</id>
-            <phase>prepare-package</phase>
-            <goals>
-              <goal>manifest</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <supportedProjectTypes>
-            <supportedProjectType>jar</supportedProjectType>
-            <supportedProjectType>bundle</supportedProjectType>
-            <supportedProjectType>war</supportedProjectType>
-          </supportedProjectTypes>
-          <instructions>
-            <Import-Package>javax.servlet,javax.servlet.http,org.osgi.framework,org.osgi.service.packageadmin,javax.swing.tree</Import-Package>
-            <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
-            <Embed-Directory>WEB-INF/lib</Embed-Directory>
-            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
-            <Embed-Transitive>true</Embed-Transitive>
-            <Webapp-Context>documentation</Webapp-Context>
-          </instructions>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <id>generate-pdf</id>
-            <configuration>
-              <tasks>
-                <ant antfile="${project.basedir}/src/main/ant/generate-pdfs.xml"
-                     dir="${project.basedir}">
-                  <property name="pdf.required" value="${pdf.required}"/>
-                </ant>
-            </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <phase>package</phase>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <!-- Scalate snapshots -->
-  <repositories>
-    <repository>
-      <id>fusesource.snapshots</id>
-      <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <!-- Scalate snapshots -->
-  <pluginRepositories>
-    <pluginRepository>
-      <id>fusesource.snapshots</id>
-      <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>      
-    </pluginRepository>
-  </pluginRepositories>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+                <version>2.15.0</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>generate-components-docs</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>script</goal>
+                        </goals>
+                        <configuration>
+                            <includeScopes>plugin</includeScopes>
+                            <scriptFile>src/main/scripts/GenerateComponentDocs.scala</scriptFile>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>generate-pdfs</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>script</goal>
+                        </goals>
+                        <configuration>
+                            <includeScopes>plugin</includeScopes>
+                            <scriptFile>src/main/scripts/GeneratePdfDocuments.scala</scriptFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <!-- Unpack the manual sources into the /karaf subdirectory -->
+                        <id>unpack-karaf-manual</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.karaf</groupId>
+                                    <artifactId>org.apache.karaf.doc</artifactId>
+                                    <version>${karaf.version}</version>
+                                    <type>war</type>
+                                    <outputDirectory>${project.build.directory}/webapp/karaf</outputDirectory>
+                                    <includes>developers-guide/*.conf,users-guide/*.conf</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <!-- Unpack the commands documentation sources into the /commands -->
+                        <id>unpack-karaf-commands</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.karaf</groupId>
+                                    <artifactId>org.apache.karaf.doc</artifactId>
+                                    <version>${karaf.version}</version>
+                                    <type>war</type>
+                                    <outputDirectory>${project.build.directory}/webapp</outputDirectory>
+                                    <includes>commands/*.conf</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>filter</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${webapp.dir}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${webapp.srcdir}</directory>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.fusesource.scalate</groupId>
+                <artifactId>maven-scalate-plugin</artifactId>
+                <version>${scalate.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>sitegen-no-fork</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <warSourceDirectory>${webapp.dir}</warSourceDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <warSourceDirectory>${webapp.dir}</warSourceDirectory>
+                    <remoteServerId>people.apache.org</remoteServerId>
+                    <remoteServerUrl>scp://people.apache.org/www/servicemix.apache.org/docs/${servicemix.version}</remoteServerUrl>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.wagon</groupId>
+                        <artifactId>wagon-ssh</artifactId>
+                        <version>${maven.wagon.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.1</version>
+                <configuration>
+                    <warSourceDirectory>${webapp.dir}</warSourceDirectory>
+                    <archive>
+                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <version>7.1.5.v20100705</version>
+                <configuration>
+                    <webAppConfig>
+                        <contextPath>/</contextPath>
+                        <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
+                            <resourcesAsCSV>${webapp.srcdir},${webapp.dir}</resourcesAsCSV>
+                        </baseResource>
+                    </webAppConfig>
+                    <systemProperties>
+                        <systemProperty>
+                            <name>scalate.workdir</name>
+                            <value>${scalate.workdir}</value>
+                        </systemProperty>
+                        <systemProperty>
+                            <name>scalate.mode</name>
+                            <value>${scalate.mode}</value>
+                        </systemProperty>
+                        <systemProperty>
+                            <name>logback.configurationFile</name>
+                            <value>${basedir}/src/etc/logback.xml</value>
+                        </systemProperty>
+                    </systemProperties>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.1.0</version>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <supportedProjectTypes>
+                        <supportedProjectType>jar</supportedProjectType>
+                        <supportedProjectType>bundle</supportedProjectType>
+                        <supportedProjectType>war</supportedProjectType>
+                    </supportedProjectTypes>
+                    <instructions>
+                        <Import-Package>javax.servlet,javax.servlet.http,org.osgi.framework,org.osgi.service.packageadmin,javax.swing.tree</Import-Package>
+                        <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
+                        <Embed-Directory>WEB-INF/lib</Embed-Directory>
+                        <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
+                        <Embed-Transitive>true</Embed-Transitive>
+                        <Webapp-Context>documentation</Webapp-Context>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <!-- Scalate snapshots -->
+    <repositories>
+        <repository>
+            <id>fusesource.snapshots</id>
+            <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <!-- Scalate snapshots -->
+    <pluginRepositories>
+        <pluginRepository>
+            <id>fusesource.snapshots</id>
+            <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
 
 
     <profiles>
@@ -498,38 +487,6 @@
             <properties>
                 <pdf.required>true</pdf.required>
             </properties>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>build-helper-maven-plugin</artifactId>
-                        <version>1.5</version>
-                        <executions>
-                            <execution>
-                                <id>attach-artifacts</id>
-                                <phase>verify</phase>
-                                <goals>
-                                    <goal>attach-artifact</goal>
-                                </goals>
-                                <configuration>
-                                    <artifacts>
-                                        <artifact>
-                                            <file>${project.build.directory}/sitegen/users-guide/manual.pdf</file>
-                                            <type>pdf</type>
-                                            <classifier>users-guide</classifier>
-                                        </artifact>
-                                        <artifact>
-                                            <file>${project.build.directory}/sitegen/jbi/jbi-guide.pdf</file>
-                                            <type>pdf</type>
-                                            <classifier>jbi-guide</classifier>
-                                        </artifact>
-                                    </artifacts>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
         </profile>
     </profiles>
 

Added: servicemix/documentation/trunk/src/main/scripts/GeneratePdfDocuments.scala
URL: http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/scripts/GeneratePdfDocuments.scala?rev=1066223&view=auto
==============================================================================
--- servicemix/documentation/trunk/src/main/scripts/GeneratePdfDocuments.scala (added)
+++ servicemix/documentation/trunk/src/main/scripts/GeneratePdfDocuments.scala Tue Feb  1 21:27:12 2011
@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+import java.io.{File, PrintWriter}
+import org.apache.maven.project.{MavenProjectHelper, DefaultMavenProjectHelper}
+import scala.io.Source
+
+val TARGET = new File(project("project.build.directory"))
+val LOG_FILE = new PrintWriter(new File(TARGET, "prince.log"))
+val SITEGEN = new File(TARGET, "sitegen")
+val PDF_REQUIRED = project("pdf.required").toBoolean
+
+val helper = session.lookup(MavenProjectHelper.ROLE).asInstanceOf[MavenProjectHelper]
+
+def debug(message: String) = LOG_FILE.println(message)
+def info(message: String) = log.info(message)
+def warn(message: String) = log.warn(message)
+
+def createPdf(input: File) {
+  info("- converting " + input)
+  val pdf = new File(input.getParent, input.getName.take(input.getName.length-5))
+  val process = new ProcessBuilder("prince", input.getCanonicalPath, "-o", pdf.getCanonicalPath)
+                  .redirectErrorStream(true)
+                  .start
+  process.waitFor
+  Source.fromInputStream(process.getInputStream).getLines.foreach(debug)
+
+  pdf.exists match {
+    case false if PDF_REQUIRED =>
+      throw new RuntimeException("PDF generation required but failed to convert %".format(input))
+    case false if !PDF_REQUIRED =>
+      warn("  conversion to PDF failed - check %s for more information".format(LOG_FILE))
+    case true =>
+      helper.attachArtifact(project.getWrapped, "pdf", pdf.getName.split("\\.").head, pdf)
+  }
+}
+
+def createPdfs(dir: File) {
+  for (file <- dir.listFiles) {
+    if (file.isDirectory) {
+      createPdfs(file)
+    } else if (file.getName.endsWith(".pdf.html")) {
+      createPdf(file)
+    }
+  }
+}
+
+try {
+  info("Running Prince XML (http://princexml.com) to convert HTML to PDF")
+  createPdfs(SITEGEN)
+} catch {
+  case e: Exception if !PDF_REQUIRED => warn("An error occured while generating PDF files: " + e.getMessage)
+} finally {
+  LOG_FILE.flush
+  LOG_FILE.close
+}
+

Copied: servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.pdf.conf (from r1060273, servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.conf)
URL: http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.pdf.conf?p2=servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.pdf.conf&p1=servicemix/documentation/trunk/src/main/webapp/jbi/jbi-guide.conf&r1=1060273&r2=1066223&rev=1066223&view=diff
==============================================================================
    (empty)

Copied: servicemix/documentation/trunk/src/main/webapp/users-guide/camel/camel-guide.pdf.conf (from r1060273, servicemix/documentation/trunk/src/main/webapp/users-guide/camel/manual.conf)
URL: http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/users-guide/camel/camel-guide.pdf.conf?p2=servicemix/documentation/trunk/src/main/webapp/users-guide/camel/camel-guide.pdf.conf&p1=servicemix/documentation/trunk/src/main/webapp/users-guide/camel/manual.conf&r1=1060273&r2=1066223&rev=1066223&view=diff
==============================================================================
    (empty)

Copied: servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/nmr-guide.pdf.conf (from r1060273, servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/manual.conf)
URL: http://svn.apache.org/viewvc/servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/nmr-guide.pdf.conf?p2=servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/nmr-guide.pdf.conf&p1=servicemix/documentation/trunk/src/main/webapp/users-guide/nmr/manual.conf&r1=1060273&r2=1066223&rev=1066223&view=diff
==============================================================================
    (empty)