Repository: karaf Updated Branches: refs/heads/karaf-3.0.x 07f33e9c1 -> 3835b37b4
[KARAF-3425] Update documentation Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/3835b37b Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3835b37b Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3835b37b Branch: refs/heads/karaf-3.0.x Commit: 3835b37b4af79faddcf1b676147d3956f44c5381 Parents: 07f33e9 Author: Jean-Baptiste Onofré <[email protected]> Authored: Sun Jan 4 19:17:25 2015 +0100 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Sun Jan 4 19:18:06 2015 +0100 ---------------------------------------------------------------------- .../developers-guide/custom-distribution.conf | 118 ++++++++++++++++++- 1 file changed, 114 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/3835b37b/manual/src/main/webapp/developers-guide/custom-distribution.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/developers-guide/custom-distribution.conf b/manual/src/main/webapp/developers-guide/custom-distribution.conf index 7be3790..98ff0ee 100644 --- a/manual/src/main/webapp/developers-guide/custom-distribution.conf +++ b/manual/src/main/webapp/developers-guide/custom-distribution.conf @@ -45,13 +45,13 @@ h3. Plugin configuration Control how features are installed using these elements referring to features from installed feature repositories: -<startupFeature>foo</startupFeature> This will result in the feature bundles being listed in startup.properties at the appropriate start level and the bundles being copied into the "system" internal repository. +* <startupFeature>foo</startupFeature> This will result in the feature bundles being listed in startup.properties at the appropriate start level and the bundles being copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats. -<bootFeature>bar</bootFeature> This will result in the feature name added to boot-features in the features service configuration file and all the bundles in the feature copied into the "system" internal repository. +* <bootFeature>bar</bootFeature> This will result in the feature name added to boot-features in the features service configuration file and all the bundles in the feature copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats. -<installedFeature>baz</installedFeature> This will result in all the bundles in the feature being installed in the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories. +* <installedFeature>baz</installedFeature> This will result in all the bundles in the feature being installed in the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories. You can use feature_name or feature_name/feature_version formats. -h3. Example +h3. Minimal Distribution Example This is the minimal assembly pom changed to use the packaging and annotated @@ -141,6 +141,116 @@ This is the minimal assembly pom changed to use the packaging and annotated </project> {code} +h3. Custom Distribution Example + +It's possible to specify feature versions using the name/version format. + +For instance, to pre-install Spring 4.0.7.RELEASE_1 feature in your custom distribution, you can use the following pom.xml: + +{code} +<?xml version="1.0" encoding="UTF-8"?> +<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/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <groupId>my.custom</groupId> + <artifactId>my.distribution</artifactId> + <version>1.0</version> + <packaging>karaf-assembly</packaging> + + <dependencies> + <dependency> + <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file --> + <groupId>org.apache.karaf.features</groupId> + <artifactId>framework</artifactId> + <version>4.0.0</version> + <type>kar</type> + </dependency> + <dependency> + <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration --> + <groupId>org.apache.karaf.features</groupId> + <artifactId>standard</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + <dependency> + <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration --> + <groupId>org.apache.karaf.features</groupId> + <artifactId>spring</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + </dependencies> + + <build> + <!-- if you want to include resources in the distribution --> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <directory>src/main/filtered-resources</directory> + <filtering>true</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + + <plugins> + <!-- if you want to include resources in the distribution --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>process-resources</id> + <goals> + <goal>resources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.karaf.tooling</groupId> + <artifactId>karaf-maven-plugin</artifactId> + <version>4.0.0</version> + <extensions>true</extensions> + <configuration> + <!-- no startupFeatures --> + <bootFeatures> + <feature>jaas</feature> + <feature>shell</feature> + <feature>ssh</feature> + <feature>management</feature> + <feature>bundle</feature> + <feature>config</feature> + <feature>deployer</feature> + <feature>diagnostic</feature> + <feature>instance</feature> + <feature>kar</feature> + <feature>log</feature> + <feature>package</feature> + <feature>service</feature> + <feature>system</feature> + </bootFeatures> + <installedFeatures> + <feature>wrapper</feature> + <feature>spring/4.0.7.RELEASE_1</feature> + </installedFeatures> + </configuration> + </plugin> + </plugins> + </build> +</project> +{code} h2. (deprecated old style) Maven assembly
