Can you share the pom.xml and features.xml ?

Regards
JB

On 11/22/2015 09:11 PM, Arnaud Deprez wrote:
Hi JB,

Sorry, I don't get what you mean by template or dependencies set.

So basically, in my second project, I have a features maven module where
I'm defining the features.xml file. This file is templated with maven
properties and I use the maven resource plugin to replace properties
with maven property placeholder.

Then, I have another module distribution where my configuration is :

...
<dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>features</artifactId>
             <version>${project.version}</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>be.lampiris.pie2.el2</groupId>
             <artifactId>el2-common-query-features</artifactId>
             <version>${lampiris.query.version}</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
     </dependencies>
...
             <plugin>
                 <groupId>org.apache.karaf.tooling</groupId>
                 <artifactId>karaf-maven-plugin</artifactId>
                 <version>${karaf-plugin.version}</version>
                 <extensions>true</extensions>
                 <executions>
                     <execution>
                         <id>features-generate-descriptor</id>
                         <phase>package</phase>
                         <goals>
                             <goal>features-generate-descriptor</goal>
                         </goals>
                         <configuration>
                             <aggregateFeatures>true</aggregateFeatures>
                         </configuration>
                     </execution>
                     <execution>
                         <id>kar</id>
                         <phase>install</phase>
                         <goals>
                             <goal>kar</goal>
                         </goals>
                         <configuration>

<finalName>Lampiris-${project.parent.artifactId}-${project.version}</finalName>

<ignoreDependencyFlag>true</ignoreDependencyFlag>

<featuresFile>${project.build.directory}/feature/feature.xml</featuresFile>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
...

So I use dependencies to import my 2 features files.
Does it help ?

Regards,

Arnaud

On Sun, Nov 22, 2015 at 8:51 PM Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:

    Hi Arnaud,

    Hmmm, it sounds like a bug.

    Do you use a template for the generate descriptor or does it use the
    dependencies set ?

    Regards
    JB

    On 11/22/2015 08:34 PM, Arnaud Deprez wrote:
     > Hi folks,
     >
     > I'm trying to use the karaf-maven-plugin to generate a kar file.
     >
     > Here is my configuration:
     > I have 2 projects, one depends on the other. Each project has its own
     > feature file.
     > In my second project, I defined the following configuration :
     > <plugin>
     >                  <groupId>org.apache.karaf.tooling</groupId>
     >                  <artifactId>karaf-maven-plugin</artifactId>
     >                  <version>${karaf-plugin.version}</version>
     >                  <extensions>true</extensions>
     >                  <executions>
     >                      <execution>
     >                          <id>features-generate-descriptor</id>
     >                          <phase>package</phase>
     >                          <goals>
     >
    <goal>features-generate-descriptor</goal>
     >                          </goals>
     >                          <configuration>
     >
    <aggregateFeatures>true</aggregateFeatures>
     >                          </configuration>
     >                      </execution>
     >                      <execution>
     >                          <id>kar</id>
     >                          <phase>install</phase>
     >                          <goals>
     >                              <goal>kar</goal>
     >                          </goals>
     >                          <configuration>
     >
     >
    
<finalName>Lampiris-${project.parent.artifactId}-${project.version}</finalName>
     >
     > <ignoreDependencyFlag>true</ignoreDependencyFlag>
     >
     >
    
<!--<featuresFile>${project.build.directory}/classes/features.xml</featuresFile>-->
     >
     >
    <featuresFile>${project.build.directory}/feature/feature.xml</featuresFile>
     >                          </configuration>
     >                      </execution>
     >                  </executions>
     >              </plugin>
     >
     > As I've imported the 2 features files in my dependencies, it
    works fine.
     > Except that in the second feature, I've defined <repository> (for
     > example to choose the right camel version) and those tags aren't
     > aggregated in the final feature.xml generated.
     >
     > I didn't find any useful information to achieve that in the
     > documentation. So that's my question : is there a way to also
    aggregate
     > repository tags ?
     >
     > Regards,
     >
     > Arnaud

    --
    Jean-Baptiste Onofré
    [email protected] <mailto:[email protected]>
    http://blog.nanthrax.net
    Talend - http://www.talend.com


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to