From user-return-18472-apmail-karaf-user-archive=karaf.apache.org@karaf.apache.org Tue Apr 17 09:30:54 2018 Return-Path: X-Original-To: apmail-karaf-user-archive@minotaur.apache.org Delivered-To: apmail-karaf-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BF7D18AF9 for ; Tue, 17 Apr 2018 09:30:54 +0000 (UTC) Received: (qmail 39218 invoked by uid 500); 17 Apr 2018 09:30:54 -0000 Delivered-To: apmail-karaf-user-archive@karaf.apache.org Received: (qmail 39175 invoked by uid 500); 17 Apr 2018 09:30:53 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 39165 invoked by uid 99); 17 Apr 2018 09:30:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2018 09:30:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5F4C51A0187 for ; Tue, 17 Apr 2018 09:30:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_SHORT=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RlEKaNXI65LF for ; Tue, 17 Apr 2018 09:30:49 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C71E45F238 for ; Tue, 17 Apr 2018 09:30:48 +0000 (UTC) Received: from [172.21.145.2] ([193.253.123.100]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MVuae-1exNWQ1l7I-00X4mg for ; Tue, 17 Apr 2018 11:30:47 +0200 Subject: Re: karaf-maven-plugin 4.2.0 "FAT" kar? To: user@karaf.apache.org References: <27babbb1-b834-61d4-0ed6-f27207f65fe5@nanthrax.net> <92f98e6e-1b6b-fb56-189b-0c1423a41c06@nanthrax.net> <037588ca-224b-d753-b99f-df3a00f9afa1@openobject.fr> From: Francois Papon Message-ID: <67824fe6-b31e-dfda-3786-ca96a16c8f43@openobject.fr> Date: Tue, 17 Apr 2018 13:30:43 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------167AFCED43BB86DF3798033B" Content-Language: fr X-Provags-ID: V03:K1:cWriWuIz/JKPGrr62YLeounnk80GoEigKyGJyVR93haKehPgEs1 UyZ8tfQUmK8Kg49gIywrKPP0LQNMhFX6NxHioxTeARGiLtuX9DIzUMj4itRf6DQxVjbPG0y g1tNiLSct9TmNLEQF6ANQEIsUX1jB3INVAqXro8BuBZEnrsl7BO/YXH/tG4v9g1VE/zstqE NzCJrS5a8lUhWfdkqWCiQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:jrqpSQwpFmY=:xZTXuSyBzosLntG5hLtjui c/demqTNp3quXw/xoDCOyF78b6hwCfYd0arVA2IVuVIyFvEejMZzJUCO0FThxSe9f1hgoz66i ERkkweBpuP12o88CuBdVuWQIdzPf8elN+5BO/dm2tD+AUMyHx5BffGEAWbWzWQGkkoJPQZko4 mlgn8k87H/rHfhgGIMrL9bZE4aYae7Yt2QSl22mNR7b7L1sE32mThEHUq/yBkEdgOyYn+MdlP OrGFjobxWDkMGRKkDXEZ/eWpQO5tSzq1HJcHAyKbAfYE/OiWlQXeQO9iifto72ZFi2NoKgMlH MuWdyLo/y1zuiw8ST6nBUtsCfsK3kDlSOuu3j1cXgZrQJKnPhmaMmhgzsSNdD6Hhphwd0y9lZ DmlOIFW20f4AAQhd3SbGKl8HmAdb6apbiQ6g1HQMyxXMBxelZiz35/hmeetNzJGy6qqUSR8Me zbL8anWi4OX+basJ4ANk/bqWulFcJ77ZNYVnOmQ8p6nanwMBIuz7T6E8yEzMFz7bw4DlezEII B+fA3GsTkaMlLX6rAciD13sJtUTyoAX2I611lJlVedNk1jsUG57G4VWReXCmMUWyrN1TFi4y1 dgVn0FaCVnxT6UfTcOM83XRQL49FpA65kBTNo0dJ5yZ6UBpimfASfmnmqv40GmVtl3ExYdgtw Heu40uSMiCbdedAjeZSCbQud+85KFq78+IbyRQ3bbpsNzjFcvEs7KEr81jsyZZ9C2zlTBPT2t d4iJXqK5Nb/2tlWUy6ZFlQP8pZFoW8XSEDlaCveNhn7VDSYil1WAQCfe/0E= This is a multi-part message in MIME format. --------------167AFCED43BB86DF3798033B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Have you tried to create a custom distribution of Karaf ? It's great to use in offline environment. Here an example of pom assembly : --     4.0.0             org.mycustom         distrib         1.0.0-SNAPSHOT         ../pom.xml         org.mycustom.karaf.assembly     karaf-assembly     Mycustom :: Karaf Distribution :: Assembly     Karaf Custom distribution assembly                         org.apache.karaf.features             framework             ${karaf.version}             kar                             org.apache.karaf.features             enterprise             ${karaf.version}             features             xml             runtime                             org.apache.cxf.karaf             apache-cxf             features             ${cxf-core.version}             xml             runtime                             org.ops4j.pax.jdbc             pax-jdbc-features             features             ${pax-jdbc.version}             xml             runtime                             org.apache.karaf.cellar             apache-karaf-cellar             features             ${karaf-cellar.version}             xml             runtime                             io.oxsoftware.kastle             io.oxsoftware.kastle.features             features             ${project.parent.version}             xml             runtime                                                             src/main/resources                 false                                     **/*                                                         src/main/filtered-resources                 true                                     **/*                                                                                     org.apache.maven.plugins                 maven-resources-plugin                 3.0.2                                                             process-resources                                                     resources                                                                                                     org.apache.karaf.tooling                 karaf-maven-plugin                 ${karaf.version}                 true                                                             custom-distrib                         custom-distrib-services                         custom-distrib-rest                                                                 wrapper                         wrap                         aries-blueprint                         shell                         shell-compat                         feature                         jaas                         ssh                         management                         bundle                         config                         deployer                         diagnostic                         instance                         kar                         log                         package                         service                         system                         eventadmin                         scr                         jdbc                         jndi                         transaction                         war                         cxf                         cxf-jaxrs                         cxf-rs-description-swagger2                                                 pax-jdbc                         pax-jdbc-config                         pax-jdbc-pool-hikaricp                         pax-jdbc-pool-aries                         pax-jdbc-postgresql                          cellar                                                                 mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true                         mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true                                         1.8                                                                                                             org.eclipse.m2e                     lifecycle-mapping                     1.0.0                                                                                                                                                                                                                                 org.apache.karaf.tooling                                                                                                                             karaf-maven-plugin                                                                                                                             [4.1.0,)                                                                                                                             assembly                                                                                                                                                                                                                                                                                                                                             Le 17/04/2018 à 10:30, nino martinez wael a écrit : > Yes, I want to include at least first level dependencies for my kar / > application.. But we need to be able todo an offline installation. > With released applications. > > On Sat, Apr 14, 2018 at 6:41 PM, Francois Papon > > > wrote: > > Hi, > > You want to include your repo into a kar ? > > François > > > Le 13/04/2018 à 16:50, nino martinez wael a écrit : >> I have this that does what I want.. BUT I think it's a hardcore >> hack. Is there no way to make a packaged kar containing a repo >> like below, using the resources parameter seems to be a hack? >> >> >> org.apache.karaf.tooling >> karaf-maven-plugin >> true >> ${karaf.version} >> >> >> features-add-to-repo >> >> features-add-to-repository >> >> >> >> mvn:org.apache.karaf.features/standard/4.2.0/xml/features >> mvn:com.netdesign.ccadmin/ccadmin-karaf-feature/3.0.0-SNAPSHOT/xml/features >> >> >> ccadmin >> >> ${project.build.directory}/classes/repository >> >> >> >> kar >> >> kar >> >> >> >> >> > > > > > -- > Best regards / Med venlig hilsen  > Nino Martinez --------------167AFCED43BB86DF3798033B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Have you tried to create a custom distribution of Karaf ? It's great to use in offline environment.

Here an example of pom assembly :

-- <?xml version="1.0" encoding="UTF-8"?>
<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">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.mycustom</groupId>
        <artifactId>distrib</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>org.mycustom.karaf.assembly</artifactId>
    <packaging>karaf-assembly</packaging>

    <name>Mycustom :: Karaf Distribution :: Assembly</name>
    <description>Karaf Custom distribution assembly</description>

    <dependencies>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <type>kar</type>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>enterprise</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf.karaf</groupId>
            <artifactId>apache-cxf</artifactId>
            <classifier>features</classifier>
            <version>${cxf-core.version}</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.jdbc</groupId>
            <artifactId>pax-jdbc-features</artifactId>
            <classifier>features</classifier>
            <version>${pax-jdbc.version}</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.cellar</groupId>
            <artifactId>apache-karaf-cellar</artifactId>
            <classifier>features</classifier>
            <version>${karaf-cellar.version}</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>io.oxsoftware.kastle</groupId>
            <artifactId>io.oxsoftware.kastle.features</artifactId>
            <classifier>features</classifier>
            <version>${project.parent.version}</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

    </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>3.0.2</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>
                <version>${karaf.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <installedFeatures>
                        <feature>custom-distrib</feature>
                        <feature>custom-distrib-services</feature>
                        <feature>custom-distrib-rest</feature>
                    </installedFeatures>
                    <bootFeatures>
                        <feature>wrapper</feature>
                        <feature>wrap</feature>
                        <feature>aries-blueprint</feature>
                        <feature>shell</feature>
                        <feature>shell-compat</feature>
                        <feature>feature</feature>
                        <feature>jaas</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>
                        <feature>eventadmin</feature>
                        <feature>scr</feature>

                        <feature>jdbc</feature>
                        <feature>jndi</feature>
                        <feature>transaction</feature>
                        <feature>war</feature>

                        <feature>cxf</feature>
                        <feature>cxf-jaxrs</feature>
                        <feature>cxf-rs-description-swagger2</feature>
                       

                        <feature>pax-jdbc</feature>
                        <feature>pax-jdbc-config</feature>
                        <feature>pax-jdbc-pool-hikaricp</feature>
                        <feature>pax-jdbc-pool-aries</feature>
                        <feature>pax-jdbc-postgresql</feature>

                         <feature>cellar</feature>
                    </bootFeatures>
                    <libraries>
                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true</library>
                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true</library>
                    </libraries>
                    <javase>1.8</javase>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.karaf.tooling
                                        </groupId>
                                        <artifactId>
                                            karaf-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [4.1.0,)
                                        </versionRange>
                                        <goals>
                                            <goal>assembly</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>


Le 17/04/2018 à 10:30, nino martinez wael a écrit :
Yes, I want to include at least first level dependencies for my kar / application.. But we need to be able todo an offline installation. With released applications.

On Sat, Apr 14, 2018 at 6:41 PM, Francois Papon <francois.papon@openobject.fr> wrote:

Hi,

You want to include your repo into a kar ?

François


Le 13/04/2018 à 16:50, nino martinez wael a écrit :
I have this that does what I want.. BUT I think it's a hardcore hack. Is there no way to make a packaged kar containing a repo like below, using the resources parameter seems to be a hack?

<plugin>
    <groupId>org.apache.karaf.tooling</groupId>
    <artifactId>karaf-maven-plugin</artifactId>
    <extensions>true</extensions>
    <version>${karaf.version}</version>
    <executions>
        <execution>
            <id>features-add-to-repo</id>
            <goals>
                <goal>features-add-to-repository</goal>
            </goals>
            <configuration>
                <descriptors>
                    <descriptor>mvn:org.apache.karaf.features/standard/4.2.0/xml/features</descriptor>
                    <descriptor>mvn:com.netdesign.ccadmin/ccadmin-karaf-feature/3.0.0-SNAPSHOT/xml/features</descriptor>
                </descriptors>
                <features>
                    <feature>ccadmin</feature>
                </features>
                <repository>${project.build.directory}/classes/repository</repository>
            </configuration>
        </execution>
        <execution>
            <id>kar</id>
            <goals>
                <goal>kar</goal>
            </goals>
        </execution>
    </executions>
</plugin>





--
Best regards / Med venlig hilsen 
Nino Martinez

--------------167AFCED43BB86DF3798033B--