Repository: karaf Updated Branches: refs/heads/master 2fff9f7cb -> fb66b3141
[KARAF-2742] Document how to include resources in a custom distribution Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/fb66b314 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/fb66b314 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/fb66b314 Branch: refs/heads/master Commit: fb66b3141e80157113ad9242d9884b274753f67f Parents: 2fff9f7 Author: Jean-Baptiste Onofré <[email protected]> Authored: Fri Sep 26 15:36:34 2014 +0200 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Fri Sep 26 15:47:02 2014 +0200 ---------------------------------------------------------------------- .../main/resources/archetype-resources/pom.xml | 30 ++++++++++++++++ .../developers-guide/custom-distribution.conf | 37 ++++++++++++++++++-- 2 files changed, 65 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/fb66b314/archetypes/assembly/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/assembly/src/main/resources/archetype-resources/pom.xml b/archetypes/assembly/src/main/resources/archetype-resources/pom.xml index a3b1d7c..62785be 100644 --- a/archetypes/assembly/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/assembly/src/main/resources/archetype-resources/pom.xml @@ -73,6 +73,22 @@ </dependencies> <build> + <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> <pluginManagement> <plugins> <plugin> @@ -85,12 +101,26 @@ </pluginManagement> <plugins> <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> <configuration> <installedFeatures> <feature>wrapper</feature> </installedFeatures> + <!-- <startupFeatures/> --> <bootFeatures> <feature>jaas</feature> <feature>shell</feature> http://git-wip-us.apache.org/repos/asf/karaf/blob/fb66b314/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 56228c3..1f120dd 100644 --- a/manual/src/main/webapp/developers-guide/custom-distribution.conf +++ b/manual/src/main/webapp/developers-guide/custom-distribution.conf @@ -59,14 +59,14 @@ This is the minimal assembly pom changed to use the packaging and annotated <dependencies> <dependency> - <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not installed --> + <!-- 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>${project.version}</version> <type>kar</type> </dependency> <dependency> - <!-- scope is runtime so the feature repo is listed in the features service config file, and features may be installed using the karaf-maven-plugin configuration --> + <!-- 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 --> <groupId>org.apache.karaf.features</groupId> <artifactId>standard</artifactId> <classifier>features</classifier> @@ -76,7 +76,40 @@ This is the minimal assembly pom changed to use the packaging and annotated </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> + <!-- karaf-maven-plugin will call both install-kar and instance-create-archive goals --> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId>
