Author: gertv
Date: Mon Nov  8 21:56:55 2010
New Revision: 1032756

URL: http://svn.apache.org/viewvc?rev=1032756&view=rev
Log:
Add information about features-maven-plugin to the manual

Added:
    
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-add.conf
    
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-generate.conf
    
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-validate.conf
    
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin.conf
Modified:
    karaf/trunk/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp
    karaf/trunk/manual/src/main/webapp/_navigation.conf
    karaf/trunk/manual/src/main/webapp/developers-guide/index.conf
    karaf/trunk/manual/src/main/webapp/manual.conf

Modified: karaf/trunk/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp?rev=1032756&r1=1032755&r2=1032756&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp 
(original)
+++ karaf/trunk/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp Mon 
Nov  8 21:56:55 2010
@@ -17,6 +17,7 @@ limitations under the License.
 --%>
 <%@ var body: String %>
 <%@ var title: String = "Apache Karaf ${karaf.version}" %>
+<% escapeMarkup = false %>
 <!DOCTYPE html>
 <html>
 <head>

Modified: karaf/trunk/manual/src/main/webapp/_navigation.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/_navigation.conf?rev=1032756&r1=1032755&r2=1032756&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/_navigation.conf (original)
+++ karaf/trunk/manual/src/main/webapp/_navigation.conf Mon Nov  8 21:56:55 2010
@@ -25,7 +25,7 @@ h3. [Developers Guide|/developers-guide/
 
 - [Extending the Console|/developers-guide/extending-console]
 - [Security Framework|/developers-guide/security-framework]
-
+- [features-maven-plugin|features-maven-plugin]
 - [writing-tests]
 - [debugging]
 - [creating-bundes]

Added: 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-add.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-add.conf?rev=1032756&view=auto
==============================================================================
--- 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-add.conf
 (added)
+++ 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-add.conf
 Mon Nov  8 21:56:55 2010
@@ -0,0 +1,45 @@
+h2. Goal {{features:add-features-to-repo}}
+
+The {{features:add-features-to-repo}} goal adds all the required bundles for a 
given set of features into directory.  You can use this goal to create a 
{{/system}} directory for building your own Karaf-based distribution.
+
+h3. Example
+The example below copies the bundles for the {{spring}} and {{war}} features 
defined in the Karaf features XML descriptor into the {{target/features-repo}} 
directory.
+{pygmentize:xml}
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>features-maven-plugin</artifactId>
+        <version>${project.version}</version>
+
+        <executions>
+          <execution>
+            <id>add-features-to-repo</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>add-features-to-repo</goal>
+            </goals>
+            <configuration>
+              <descriptors>
+                
<descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
+              </descriptors>
+              <features>
+                <feature>spring</feature>
+                <feature>war</feature>
+              </features>
+              <repository>target/features-repo</repository>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>  
+</project>
+{pygmentize}
+
+h3. Parameters
+|| Name || Type || Description ||
+| {{descriptors}} | {{String[]}} | List of features XML descriptors where the 
features are defined |
+| {{features}} | {{String[]}} | List of features that bundles should be copied 
to the repository directory |
+| {{repository}} | {{File}} | The directory where the bundles will be copied 
by the plugin goal |
\ No newline at end of file

Added: 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-generate.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-generate.conf?rev=1032756&view=auto
==============================================================================
--- 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-generate.conf
 (added)
+++ 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-generate.conf
 Mon Nov  8 21:56:55 2010
@@ -0,0 +1,53 @@
+h2. Goal {{features:generate}}
+
+The {{features:generate}} goal generates a features XML file for every bundle 
listed in the project's dependencies.  In order to satisfy the required imports 
in these bundles, the plugin will add bundles:
+- bundles provided by Apache Karaf
+- a list of bundles
+- bundles discovered in the POM's transitive dependencies
+
+Afterwards, the generated file is attached to the build as an additional build 
artifact (by default as {{group:artifact:version:xml:features}})
+
+h3. Example
+The example below generates one feature that installs bundle 
{{mvn:org.apache:bundle1:1.0}} in a features XML file called 
{{target/features.xml}}.  It will find bundle in Apache Karaf 
${project.version}, the transitive dependencies for this POM and the bundles 
listed in {{src/main/resources/bundles.properties}}. 
+{pygmentize:xml}
+<project>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache</groupId>
+      <artifactId>bundle1</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>features-maven-plugin</artifactId>
+        <version>${project.version}</version>
+          <executions>
+            <execution>
+              <id>generate</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>generate</goal>
+              </goals>
+              <configuration>
+                <bundles>src/main/resources/bundles.properties</bundles>
+                <kernelVersion>${project.version}</kernelVersion>
+                <outputFile>target/features.xml</outputFile>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+    </plugins>
+  </build>  
+</project>
+{pygmentize}
+
+h3. Parameters
+|| Name || Type || Description ||
+| {{outputFile}} | {{File}} | Name of the features XML file that is being 
generated \\ Default value: {{${project.build.directory}/classes/feature.xml}} |
+| {{attachmentArtifactType}} | {{String}} | The artifact type for attaching 
the generated file to the project \\ Default value: {{xml}) |
+| {{attachmentArtifactClassifier}} | {{String}} | The artifact classifier for 
attaching the generated file to the project \\ Default value: {{features}} |
+| {{kernelVersion}} | {{String}} | The version of Karaf that is used to 
determine system bundles and default provided features |
+| {{bundles}} | {{File}} | A properties file that contains a list of bundles 
that will be used to generate the features.xml file |

Added: 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-validate.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-validate.conf?rev=1032756&view=auto
==============================================================================
--- 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-validate.conf
 (added)
+++ 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin-validate.conf
 Mon Nov  8 21:56:55 2010
@@ -0,0 +1,46 @@
+h2. Goal {{features:validate}}
+
+The {{features:validate}} goal validates a features XML descriptor by checking 
if all the required imports for the bundles defined in the features can be 
matched to a provided export.
+
+h3. Example
+The example below validates the features defined in the 
{{target/features.xml}} by checking all the imports and exports.  It reads the 
definition for the packages that are exported by the system bundle from the 
{{src/main/resources/config.properties}} file.
+{pygmentize:xml}
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>features-maven-plugin</artifactId>
+        <version>${project.version}</version>
+          <executions>
+            <execution>
+              <id>validate</id>
+              <phase>process-resources</phase>
+              <goals>
+                <goal>validate</goal>
+              </goals>
+              <configuration>
+                <file>target/features.xml</file>
+                <karafConfig>src/main/resources/config.properties</karafConfig>
+              </configuration>
+            </execution>
+          </executions>
+          <dependencies>
+            <dependency>
+              <groupId>org.slf4j</groupId>
+              <artifactId>slf4j-simple</artifactId>
+              <version>1.4.3</version>
+               </dependency>
+          </dependencies>
+        </plugin>
+    </plugins>
+  </build>  
+</project>
+{pygmentize}
+
+h3. Parameters
+|| Name || Type || Description ||
+| {{file}} | {{File}} | The features XML descriptor file to validate. \\ 
Default value: {{${project.build.directory}/classes/features.xml}} |
+| {{karafConfig}} | {{String}} | The Karaf {{config.properties}} file to use 
during the validation process \\ Default value: {{config.properties}} |
+| {{jreVersion}} | {{String}} | The JRE version that is used during the 
validation process \\ Default value: {{jre-1.5}) |
+| {{repositories}} | {{String[]}} | Additional features XML descriptors that 
will be used during the validation process |
\ No newline at end of file

Added: 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin.conf?rev=1032756&view=auto
==============================================================================
--- 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin.conf 
(added)
+++ 
karaf/trunk/manual/src/main/webapp/developers-guide/features-maven-plugin.conf 
Mon Nov  8 21:56:55 2010
@@ -0,0 +1,29 @@
+h1. Using the features-maven-plugin
+
+The {{features-maven-plugin}} provides several goals to help you create and 
validate features XML descriptors as well as leverage your features to create a 
custom Karaf distribution.
+
+|| Goal || Description ||
+| {{[features:add-features-to-repo|features-maven-plugin-add]}} | Copies all 
the bundles required for a given set of features into a directory \\ (e.g. for 
creating your own Karaf-based distribution) |
+| {{features:generate-features-file}} | Deprecated - use 
{{[features:generate-features-xml|features-maven-plugin-generate]}} instead |
+| {{[features:generate-features-xml|features-maven-plugin-generate]}} | 
Generates a features XML descriptor for a set of bundles |
+| {{[features:validate|features-maven-plugin-validate]}} | Validate a features 
XML descriptor by checking if all the required imports can be matched to 
exports |
+
+h2. Configure the features-maven-plugin
+In order to use the {{features-maven-plugin}}, you have to define the plugin 
in your project's {{pom.xml}} file:
+{pygmentize:xml}
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>features-maven-plugin</artifactId>
+        <version>${project.version}</version>
+
+        <executions>
+          <!-- add execution definitions here -->
+        </executions>
+      </plugin>
+    </plugins>
+  </build>  
+</project>
+{pygmentize}

Modified: karaf/trunk/manual/src/main/webapp/developers-guide/index.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/developers-guide/index.conf?rev=1032756&r1=1032755&r2=1032756&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/developers-guide/index.conf (original)
+++ karaf/trunk/manual/src/main/webapp/developers-guide/index.conf Mon Nov  8 
21:56:55 2010
@@ -2,7 +2,7 @@ h1. Developers Guide
 
 * [Extending the Console|extending-console]
 * [Security Framework|security-framework]
-
+* [Using features-maven-plugin|features-maven-plugin]
 * [writing-tests]
 * [debugging]
 * [creating-bundes]

Modified: karaf/trunk/manual/src/main/webapp/manual.conf
URL: 
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/manual.conf?rev=1032756&r1=1032755&r2=1032756&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/manual.conf (original)
+++ karaf/trunk/manual/src/main/webapp/manual.conf Mon Nov  8 21:56:55 2010
@@ -20,3 +20,7 @@ h1. Users Guide
 h1. Developers Guide
 {include:developers-guide/extending-console.conf}
 {include:developers-guide/security-framework.conf}
+{include:developers-guide/features-maven-plugin.conf}
+{include:developers-guide/features-maven-plugin-add.conf}
+{include:developers-guide/features-maven-plugin-generate.conf}
+{include:developers-guide/features-maven-plugin-validate.conf}


Reply via email to