Repository: karaf Updated Branches: refs/heads/master 020984abd -> 3d386e504
[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/3d386e50 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3d386e50 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3d386e50 Branch: refs/heads/master Commit: 3d386e504f081a38058fe4c7c11b5da6239d55fb Parents: 020984a 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:17:25 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/3d386e50/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 1f120dd..d3f3e62 100644 --- a/manual/src/main/webapp/developers-guide/custom-distribution.conf +++ b/manual/src/main/webapp/developers-guide/custom-distribution.conf @@ -32,13 +32,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 @@ -128,6 +128,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
