You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Senpai <it...@gmail.com> on 2014/08/15 09:04:08 UTC

Custom Distribution version >= 3.0.1 with own features.xml

Hi there.

I am trying to create my own karaf distribution with a number of features
installed at boot.
So far, I can create my own distribution with provided features via maven
repositories. My pom.xml basically looks like this:

    <dependencies>
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>3.0.1</version>
            <type>kar</type>
        </dependency>
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>3.0.1</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
    		</dependency>
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>enterprise</artifactId>
            <version>3.0.1</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-karaf</artifactId>
            <version>5.10.0</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.karaf</groupId>
            <artifactId>apache-camel</artifactId>
            <version>2.13.2</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>3.0.1</version>
                <configuration>
                    
                    <bootFeatures>
                      	  <feature>standard</feature>
			  <feature>management</feature>
                        <feature>webconsole</feature>
                        <feature>jdbc</feature>
                        <feature>jndi</feature>
                        <feature>camel-spring</feature>
                        <feature>camel-jetty</feature>
                        <feature>camel-xmljson</feature>
                        <feature>camel-xstream</feature>
                        <feature>camel-websocket</feature>
                        <feature>camel-twitter</feature>
                        <feature>camel-script</feature>
                        <feature>camel-script-javascript</feature>
                        <feature>camel-http</feature>
                        <feature>camel-jdbc</feature>
                        <feature>camel-sql</feature>
			<feature>camel-soap</feature>
			<feature>camel-jpa</feature>
			<feature>camel-base64</feature>
                        <feature>activemq-broker</feature>
                        <feature>activemq-camel</feature>
                        <feature>activemq-blueprint</feature>
                    </bootFeatures>
                    
                </configuration>
            </plugin>
        </plugins>
    </build>

Now I want to add my own features provided via a my-features.xml on the
local filesystem. 
Is it possible to do this with the new maven-karaf-plugin? If yes, how would
i go about it?




--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom Distribution version >= 3.0.1 with own features.xml

Posted by Senpai <it...@gmail.com>.
Thank you Minto for pointing me to the right files.
I was indeed looking into the wrong direction. This helped me a great deal!



--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789p4034825.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom Distribution version >= 3.0.1 with own features.xml

Posted by Minto van der Sluis <mi...@xup.nl>.
Hi Senpai,

Being not sure what you looked at, but when I look at the examples I
gave you I that the karaf-maven-plugin has been used to build the
assemby. Not the maven-assembly plugin. Have a look at this pom file:

https://github.com/misl/Samples/blob/master/WicketKaraf/assembly/pom.xml

Might it be that you by mistake assumed that src/main/assembly is being
used by the maven-assembly plugin? In fact it is used by the
maven-resources plugin to inject additional files into the final karaf
assembly/distribution.

Also looking at the same pom file I see the following list op bootFeatures:

          <bootFeatures>
            <feature>standard</feature>
            <feature>http</feature>
            <feature>ssh</feature>
            <feature>config</feature>
            <feature>wicketkaraf-simple</feature>
          </bootFeatures>

Maybe you should have a closer look.

Regards,

Minto

Senpai schreef op 15-8-2014 11:55:
> Thanks for the quick replies.
>
> I had a look at both suggested examples, however I get the feeling that they
> are based on the old, deprecated style to handle custom distributions, as
> described here:
>
> *http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html
> - (deprecated old style) Maven assembly*
>
> The new style makes use of <bootFeatures>, which both examples do not
> contain.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789p4034793.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541


Re: Custom Distribution version >= 3.0.1 with own features.xml

Posted by Senpai <it...@gmail.com>.
Thanks for the quick replies.

I had a look at both suggested examples, however I get the feeling that they
are based on the old, deprecated style to handle custom distributions, as
described here:

*http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html
- (deprecated old style) Maven assembly*

The new style makes use of <bootFeatures>, which both examples do not
contain.



--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789p4034793.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom Distribution version >= 3.0.1 with own features.xml

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

you have examples how to do it: it's the case in ServiceMix.

Regards
JB

On 08/15/2014 09:04 AM, Senpai wrote:
> Hi there.
>
> I am trying to create my own karaf distribution with a number of features
> installed at boot.
> So far, I can create my own distribution with provided features via maven
> repositories. My pom.xml basically looks like this:
>
>      <dependencies>
>          <dependency>
>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>framework</artifactId>
>              <version>3.0.1</version>
>              <type>kar</type>
>          </dependency>
>          <dependency>
>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>standard</artifactId>
>              <version>3.0.1</version>
>              <classifier>features</classifier>
>              <type>xml</type>
>              <scope>runtime</scope>
>      		</dependency>
>          <dependency>
>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>enterprise</artifactId>
>              <version>3.0.1</version>
>              <classifier>features</classifier>
>              <type>xml</type>
>              <scope>runtime</scope>
>          </dependency>
>          <dependency>
>
>              <groupId>org.apache.activemq</groupId>
>              <artifactId>activemq-karaf</artifactId>
>              <version>5.10.0</version>
>              <type>xml</type>
>              <classifier>features</classifier>
>              <scope>runtime</scope>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.camel.karaf</groupId>
>              <artifactId>apache-camel</artifactId>
>              <version>2.13.2</version>
>              <type>xml</type>
>              <classifier>features</classifier>
>              <scope>runtime</scope>
>          </dependency>
>      </dependencies>
>
>      <build>
>          <plugins>
>              <plugin>
>                  <groupId>org.apache.karaf.tooling</groupId>
>                  <artifactId>karaf-maven-plugin</artifactId>
>                  <extensions>true</extensions>
>                  <version>3.0.1</version>
>                  <configuration>
>
>                      <bootFeatures>
>                        	  <feature>standard</feature>
> 			  <feature>management</feature>
>                          <feature>webconsole</feature>
>                          <feature>jdbc</feature>
>                          <feature>jndi</feature>
>                          <feature>camel-spring</feature>
>                          <feature>camel-jetty</feature>
>                          <feature>camel-xmljson</feature>
>                          <feature>camel-xstream</feature>
>                          <feature>camel-websocket</feature>
>                          <feature>camel-twitter</feature>
>                          <feature>camel-script</feature>
>                          <feature>camel-script-javascript</feature>
>                          <feature>camel-http</feature>
>                          <feature>camel-jdbc</feature>
>                          <feature>camel-sql</feature>
> 			<feature>camel-soap</feature>
> 			<feature>camel-jpa</feature>
> 			<feature>camel-base64</feature>
>                          <feature>activemq-broker</feature>
>                          <feature>activemq-camel</feature>
>                          <feature>activemq-blueprint</feature>
>                      </bootFeatures>
>
>                  </configuration>
>              </plugin>
>          </plugins>
>      </build>
>
> Now I want to add my own features provided via a my-features.xml on the
> local filesystem.
> Is it possible to do this with the new maven-karaf-plugin? If yes, how would
> i go about it?
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Custom Distribution version >= 3.0.1 with own features.xml

Posted by Minto van der Sluis <mi...@xup.nl>.
Hi Senpai,

Maybe this little example can help you out.

https://github.com/misl/Samples/tree/master/WicketKaraf

It has a very simple feature, custom branding and assembling a custom
distribution.

Regards,

Minto

Senpai schreef op 15-8-2014 09:04:
> Hi there.
>
> I am trying to create my own karaf distribution with a number of features
> installed at boot.
> So far, I can create my own distribution with provided features via maven
> repositories. My pom.xml basically looks like this:
>
>     <dependencies>
>         <dependency>
>             
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>framework</artifactId>
>             <version>3.0.1</version>
>             <type>kar</type>
>         </dependency>
>         <dependency>
>             
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>standard</artifactId>
>             <version>3.0.1</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <scope>runtime</scope>
>     		</dependency>
>         <dependency>
>             
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>enterprise</artifactId>
>             <version>3.0.1</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <scope>runtime</scope>
>         </dependency>
>         <dependency>
>             
>             <groupId>org.apache.activemq</groupId>
>             <artifactId>activemq-karaf</artifactId>
>             <version>5.10.0</version>
>             <type>xml</type>
>             <classifier>features</classifier>
>             <scope>runtime</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.camel.karaf</groupId>
>             <artifactId>apache-camel</artifactId>
>             <version>2.13.2</version>
>             <type>xml</type>
>             <classifier>features</classifier>
>             <scope>runtime</scope>
>         </dependency>
>     </dependencies>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <extensions>true</extensions>
>                 <version>3.0.1</version>
>                 <configuration>
>                     
>                     <bootFeatures>
>                       	  <feature>standard</feature>
> 			  <feature>management</feature>
>                         <feature>webconsole</feature>
>                         <feature>jdbc</feature>
>                         <feature>jndi</feature>
>                         <feature>camel-spring</feature>
>                         <feature>camel-jetty</feature>
>                         <feature>camel-xmljson</feature>
>                         <feature>camel-xstream</feature>
>                         <feature>camel-websocket</feature>
>                         <feature>camel-twitter</feature>
>                         <feature>camel-script</feature>
>                         <feature>camel-script-javascript</feature>
>                         <feature>camel-http</feature>
>                         <feature>camel-jdbc</feature>
>                         <feature>camel-sql</feature>
> 			<feature>camel-soap</feature>
> 			<feature>camel-jpa</feature>
> 			<feature>camel-base64</feature>
>                         <feature>activemq-broker</feature>
>                         <feature>activemq-camel</feature>
>                         <feature>activemq-blueprint</feature>
>                     </bootFeatures>
>                     
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>
> Now I want to add my own features provided via a my-features.xml on the
> local filesystem. 
> Is it possible to do this with the new maven-karaf-plugin? If yes, how would
> i go about it?
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-Distribution-version-3-0-1-with-own-features-xml-tp4034789.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541