Advertisement
gusto2

apache karaf feature and kar

Oct 5th, 2013
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.96 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <sample>
  3. <!-- ============== FEATURE FILE ================ -->
  4. <features name="xxx-features">
  5.     <!--xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"-->
  6.     <!--<repository>mvn:com.apogado.xxx/xxx-feature/1.0-SNAPSHOT/xml/features</repository>-->
  7.     <feature name="xxx-feature" version="1.0-SNAPSHOT">
  8.        
  9.         <!-- generic feature dependencies -->
  10.         <feature>war</feature>
  11.         <feature>cxf</feature>
  12.         <feature>config</feature>
  13.         <feature>wss4j</feature>
  14.         <feature>camel-core</feature>
  15.         <feature>camel-blueprint</feature>
  16.         <feature>camel-spring</feature>
  17.         <feature>camel-cxf</feature>
  18.         <feature>spring-dm</feature>
  19.         <feature>webconsole</feature>
  20.         <feature>camel-jaxb</feature>
  21.        
  22.         <!-- support bundles -->
  23.         <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
  24.         <bundle>mvn:commons-pool/commons-pool/1.5.4</bundle>
  25.         <bundle>mvn:commons-dbcp/commons-dbcp/1.4</bundle>
  26.         <bundle>mvn:commons-lang/commons-lang/2.5</bundle>
  27.         <bundle>mvn:commons-codec/commons-codec/1.6</bundle>
  28.         <bundle>wrap:mvn:postgresql/postgresql/9.1-901-1.jdbc4</bundle>
  29.  
  30.         <!-- common classes -->
  31.         <bundle>mvn:com.apogado.xxx/commons/1.0-SNAPSHOT</bundle>        
  32.  
  33.         <config name="com.apogado.xxx.utils.xxx">
  34.             param1=value1
  35.             param2=value2
  36.             param3=value3
  37.         </config>
  38.     </feature>
  39. </features>
  40.  
  41. <!-- ========= POM KAR generation ============= -->
  42. <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">
  43.     <modelVersion>4.0.0</modelVersion>
  44.     <!-- deleted -->
  45.     <packaging>pom</packaging>
  46.  
  47.     <build>
  48.         <plugins>
  49.             <plugin>
  50.                 <groupId>org.apache.felix</groupId>
  51.                 <artifactId>maven-bundle-plugin</artifactId>
  52.                 <extensions>true</extensions>
  53.                 <version>${maven-bundle-plugin.version}</version>
  54.             </plugin>
  55.             <plugin>
  56.                 <groupId>org.apache.maven.plugins</groupId>
  57.                 <artifactId>maven-resources-plugin</artifactId>
  58.                 <version>${maven-resource-plugin.version}</version>
  59.                 <executions>
  60.                     <execution>
  61.                         <id>copy-features</id>
  62.                         <phase>generate-resources</phase>
  63.                         <goals>
  64.                             <goal>copy-resources</goal>
  65.                         </goals>
  66.                         <configuration>
  67.                             <outputDirectory>target/features</outputDirectory>
  68.                             <resources>
  69.                                 <resource>
  70.                                     <directory>src/main/features</directory>
  71.                                     <filtering>true</filtering>
  72.                                 </resource>
  73.                             </resources>
  74.                         </configuration>
  75.                     </execution>
  76.                 </executions>
  77.             </plugin>        
  78.             <plugin>
  79.                 <groupId>org.codehaus.mojo</groupId>
  80.                 <artifactId>build-helper-maven-plugin</artifactId>
  81.                 <version>1.7</version>
  82.                 <executions>
  83.                     <execution>
  84.                         <id>attach-artifacts</id>
  85.                         <phase>package</phase>
  86.                         <goals>
  87.                             <goal>attach-artifact</goal>
  88.                         </goals>
  89.                         <configuration>
  90.                             <artifacts>
  91.                                 <artifact>
  92.                                     <file>target/features/features.xml</file>
  93.                                     <type>xml</type>
  94.                                     <classifier>features</classifier>
  95.                                 </artifact>
  96.                             </artifacts>
  97.                         </configuration>
  98.                     </execution>
  99.                 </executions>
  100.             </plugin>
  101.             <plugin>
  102.                 <groupId>org.apache.karaf.tooling</groupId>
  103.                 <artifactId>features-maven-plugin</artifactId>
  104.                 <version>2.3.2</version>
  105.                 <executions>
  106.                     <execution>
  107.                         <id>create-kar</id>
  108.                         <goals>
  109.                             <goal>create-kar</goal>
  110.                         </goals>
  111.                         <configuration>
  112.                             <featuresFile>${project.basedir}/src/main/features/features.xml</featuresFile>
  113.                         </configuration>
  114.                     </execution>
  115.                 </executions>
  116.             </plugin>
  117.         </plugins>
  118.     </build>  
  119. </project>
  120.  
  121. </sample>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement