karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nino martinez wael <nino.martinez.w...@gmail.com>
Subject Re: karaf-maven-plugin 4.2.0 "FAT" kar?
Date Fri, 04 May 2018 17:41:34 GMT
No need to apologise 😁

On Thu, 3 May 2018, 20:23 Jean-Baptiste Onofré, <jb@nanthrax.net> wrote:

> Hi Nino,
>
> As I'm now back from vacation, I gonna take a look.
>
> Sorry for the delay.
>
> Regards
> JB
>
> On 05/03/2018 08:19 PM, nino martinez wael wrote:
> > Any chance someone has an idea?
> >
> > On Wed, 18 Apr 2018, 08:02 nino martinez wael, <
> nino.martinez.wael@gmail.com
> > <mailto:nino.martinez.wael@gmail.com>> wrote:
> >
> >     Actually if I read this part, it does seem that the kar goal should
> do what
> >     I want. But I am missing the part where the kar plugin add the
> bundles to
> >     the kar repo..
> >
> >
> https://github.com/apache/karaf/blob/master/manual/src/main/asciidoc/user-guide/kar.adoc
> >
> >
> >             Maven
> >
> >     Apache Karaf provides a Maven plugin: |karaf-maven-plugin|.
> >
> >     The Apache Karaf Maven plugin provides the |kar| goal.
> >
> >     The |kar| goal does: . Reads all features specified in the features
> XML. .
> >     For each feature described in the features XML, the goal resolves the
> >     bundles described in the feature. . The goal finally packages the
> features
> >     XML, *_/and the resolved bundles in a zip file./_*
> >
> >     For instance, the following Maven POM create |my-kar.kar|
> >
> >     For instance, you can use the following POM to create a kar:
> >
> >
> >
> >     On Wed, Apr 18, 2018 at 7:54 AM, nino martinez wael
> >     <nino.martinez.wael@gmail.com <mailto:nino.martinez.wael@gmail.com>>
> wrote:
> >
> >         if I check the documentation the spring kar "example" are pretty
> much
> >         what we want todo..
> >
> >         https://karaf.apache.org/manual/latest/kar
> >
> >         On Wed, Apr 18, 2018 at 7:52 AM, nino martinez wael
> >         <nino.martinez.wael@gmail.com <mailto:
> nino.martinez.wael@gmail.com>> wrote:
> >
> >             Yes but, the problem arises when we want to mix our products
> but
> >             only want / just need one karaf instance.. Plus each release
> does
> >             actually require a significant amount of space on our
> artifact
> >             servers.. around 150mb per release / snapshot.. Using the kar
> >             approach and one common custom karaf for our products
> lightents this
> >             a lot.
> >
> >             So today we are doing one karaf assembly per project but
> want to
> >             move away from it.
> >
> >             -regards Nino
> >
> >             On Tue, Apr 17, 2018 at 11:30 AM, Francois Papon
> >             <francois.papon@openobject.fr <mailto:
> francois.papon@openobject.fr>>
> >             wrote:
> >
> >                 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"
> >                 <http://maven.apache.org/POM/4.0.0>
> >                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >                 <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"
> >                 <
> http://maven.apache.org/POM/4.0.0http://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
> >>                 <mailto: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
> >
> >
> >
> >
> >             --
> >             Best regards / Med venlig hilsen
> >             Nino Martinez
> >
> >
> >
> >
> >         --
> >         Best regards / Med venlig hilsen
> >         Nino Martinez
> >
> >
> >
> >
> >     --
> >     Best regards / Med venlig hilsen
> >     Nino Martinez
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Mime
View raw message