Custom distribution with my private features

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom distribution with my private features

thaij
Hi,

I'm trying to create my own Karaf distribution with karaf-maven-plugin and
include my private features. My target is just bring the resulting .tar.gz
and extract it on an application server without interacting with the
Console.

I have successfully generated a feature.xml with the following plugin
configuration in my pom.xml:

<plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <version>4.2.6</version>
        <executions>
          <execution>
            <goals>
              <goal>features-generate-descriptor</goal>
            </goals>
            <configuration>
              <includeProjectArtifact>true</includeProjectArtifact>
            </configuration>
          </execution>
        </executions>
</plugin>

However, I can't seem to have it installed (in other pom.xml):
<installedFeatures>
          <feature>wrapper</feature>
          <feature>aries-blueprint</feature>
          <feature>shell-compat</feature>
          <feature>my-feature</feature> <== This didn't work
</installedFeatures>

What am I missing? What is the right way to achieve my goal?

Thank you very much for your help!!!
Jasper



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Custom distribution with my private features

jbonofre
Hi,

did you add your features XML repo in dependency of your assembly pom ?

You can take a look on the example:

https://github.com/apache/karaf/tree/master/examples/karaf-docker-example/karaf-docker-example-dynamic-dist
https://github.com/apache/karaf/tree/master/examples/karaf-docker-example/karaf-docker-example-static-dist

depending if you want a dynamic (mutable) or static (immutable)
distribution.

Regards
JB

On 30/09/2019 09:41, thaij wrote:

> Hi,
>
> I'm trying to create my own Karaf distribution with karaf-maven-plugin and
> include my private features. My target is just bring the resulting .tar.gz
> and extract it on an application server without interacting with the
> Console.
>
> I have successfully generated a feature.xml with the following plugin
> configuration in my pom.xml:
>
> <plugin>
>         <groupId>org.apache.karaf.tooling</groupId>
>         <artifactId>karaf-maven-plugin</artifactId>
>         <version>4.2.6</version>
>         <executions>
>           <execution>
>             <goals>
>               <goal>features-generate-descriptor</goal>
>             </goals>
>             <configuration>
>               <includeProjectArtifact>true</includeProjectArtifact>
>             </configuration>
>           </execution>
>         </executions>
> </plugin>
>
> However, I can't seem to have it installed (in other pom.xml):
> <installedFeatures>
>           <feature>wrapper</feature>
>           <feature>aries-blueprint</feature>
>           <feature>shell-compat</feature>
>           <feature>my-feature</feature> <== This didn't work
> </installedFeatures>
>
> What am I missing? What is the right way to achieve my goal?
>
> Thank you very much for your help!!!
> Jasper
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Custom distribution with my private features

thaij
Hi JB,

Thanks for pointing to the right instructions :)

I did add the dependency and my custom distribution does have the feature
now. However, I still have one problem. Since my features is described in a
features.xml (/src/main/resources/features.xml) as:

<features>
  <feature name="firstFeature">
  <feature name="wxi-local">
</features>

It seems that I can't make it includes all of the features listed and I
can't start the distribution. What should be the right approach to have
those features included?

Thanks again!



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html