You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2011/12/11 09:57:39 UTC

svn commit: r1212983 - in /karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide: features-maven-plugin-create-kar.conf features-maven-plugin.conf

Author: jbonofre
Date: Sun Dec 11 08:57:39 2011
New Revision: 1212983

URL: http://svn.apache.org/viewvc?rev=1212983&view=rev
Log:
[KARAF-959] Documentation of the features:create-kar goal

Added:
    karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin-create-kar.conf
Modified:
    karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin.conf

Added: karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin-create-kar.conf
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin-create-kar.conf?rev=1212983&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin-create-kar.conf (added)
+++ karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin-create-kar.conf Sun Dec 11 08:57:39 2011
@@ -0,0 +1,39 @@
+h2. Goal {{features:create-kar}}
+
+The {{features:create-kar}} goal creates a kar file from a given features XML.
+A kar file is a zip archive shipping all bundles and configuration files containing in features of a features XML, and the features XML itself.
+You can deploy a kar file just by copying it in the deploy folder, all resources will be loaded from the kar file.
+
+h3. Example
+The example below generates a kar file from a given features XML. The generated kar will be in the target folder with the ${artifactId}-${version}.kar name.
+{pygmentize:xml}
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>features-maven-plugin</artifactId>
+        <version>${project.version}</version>
+          <executions>
+            <execution>
+              <id>create-kar</id>
+              <goals>
+                <goal>create-kar</goal>
+              </goals>
+              <configuration>
+                <featuresFile>${project.basedir}/src/main/resources/features.xml</featuresFile>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+    </plugins>
+  </build>
+</project>
+{pygmentize}
+
+h3. Parameters
+|| Name || Type || Description ||
+| {{featuresFile}} | {{File}} | The features XML used to generate the KAR file \\ Default value: {{${project.build.directory}/feature/feature.xml}} |
+| {{resourcesDir} | {{File}} | Location of resources directory for additional content to include in the KAR. Note that it includes everything under classes so as to include maven-remote-resources \\ Default value: ${project.build.directory}/classes}} |
+| {{finalName}} | {{String}} | Name of the generated kar \\ Default value: {{${project.build.finalName}}} |
+| {{outputDirectory}} | {{File}} | Directory containing the generated archive \\ Default value: {{${project.build.directory}}} |

Modified: karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin.conf
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin.conf?rev=1212983&r1=1212982&r2=1212983&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin.conf (original)
+++ karaf/branches/karaf-2.2.x/manual/src/main/webapp/developers-guide/features-maven-plugin.conf Sun Dec 11 08:57:39 2011
@@ -7,6 +7,7 @@ The {{features-maven-plugin}} provides s
 | {{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 |
+| {{|features:create-kar|features-maven-plugin-create-kar]}} | Create a KAR file from a features XML |
 
 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: