Building karaf offline version with Karaf Cave

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

Building karaf offline version with Karaf Cave

Koprowski, Mariusz

Hi All

I have a such situation. I need install karaf without internet connection.

I know that I could use Karaf Cave as a repo… but the question is how to populate it with all needed things.

 

E.g. AS a standard, the installation that I need to do, comes with Karaf Standard + Camel Core. But in time I will need to add some of the Camel features (I don’t know which one now). So I would like to have all Camel features and it’s dependencies in Cave.

How can I generate a repo with all Camel features ? is there any automatic way to do that ?

 

I’m using Karaf 4.0.8

 

Best regards

--

Mariusz Koprowski

 

Reply | Threaded
Open this post in threaded view
|

Re: Building karaf offline version with Karaf Cave

João Assunção
Hi Mariusz,

I've been using karaf-maven-plugin, with the goal features-add-to-repository, to generate a maven like repository with the set of features to make available offline.
I then change org.ops4j.pax.url.mvn.localRepository in  org.ops4j.pax.url.mvn.cfg to point to the directory containing the repository produced by the plugin.
In the past this worked quite well, and I ended with a repository just with the dependencies specified in the plugin configuration. With the 4.x version, for some reason I'm still trying to figure out, I end with a repository with all the features, even standard ones.

Best regards,

João Assunção

Mobile: +351 916968984
Phone: +351 211933149



On Mon, Aug 21, 2017 at 11:25 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi All

I have a such situation. I need install karaf without internet connection.

I know that I could use Karaf Cave as a repo… but the question is how to populate it with all needed things.

 

E.g. AS a standard, the installation that I need to do, comes with Karaf Standard + Camel Core. But in time I will need to add some of the Camel features (I don’t know which one now). So I would like to have all Camel features and it’s dependencies in Cave.

How can I generate a repo with all Camel features ? is there any automatic way to do that ?

 

I’m using Karaf 4.0.8

 

Best regards

--

Mariusz Koprowski

 


Reply | Threaded
Open this post in threaded view
|

RE: Building karaf offline version with Karaf Cave

Koprowski, Mariusz

Hi João

Well I’m searching for option to add to repo all features that are in repositories that I have provided e.g.:

I have Camel repo defined. It contains around 200 features. I would like repo to have them all not only the one that I need on boot. So user can add them if needed without internet.

 

 

Best regards

--

Mariusz Koprowski
Enterprise Solutions Engineering Lead

T: +48 42 253 48 28

E: [hidden email]

Hexagon Mining
Wolczanska 128/134

90-441, Lodz, Poland
www.hexagonmining.com | WebEx | <a href="skype:mariusz.koprowski@hexagonmining.com">Skype

 

From: João Assunção [mailto:[hidden email]]
Sent: Monday, August 21, 2017 6:49 PM
To: [hidden email]
Subject: Re: Building karaf offline version with Karaf Cave

 

Hi Mariusz,

 

I've been using karaf-maven-plugin, with the goal features-add-to-repository, to generate a maven like repository with the set of features to make available offline.

I then change org.ops4j.pax.url.mvn.localRepository in  org.ops4j.pax.url.mvn.cfg to point to the directory containing the repository produced by the plugin.

In the past this worked quite well, and I ended with a repository just with the dependencies specified in the plugin configuration. With the 4.x version, for some reason I'm still trying to figure out, I end with a repository with all the features, even standard ones.

 

Best regards,


João Assunção

 

Email: [hidden email]

Mobile: +351 916968984

Phone: +351 211933149

 

 

 

On Mon, Aug 21, 2017 at 11:25 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi All

I have a such situation. I need install karaf without internet connection.

I know that I could use Karaf Cave as a repo… but the question is how to populate it with all needed things.

 

E.g. AS a standard, the installation that I need to do, comes with Karaf Standard + Camel Core. But in time I will need to add some of the Camel features (I don’t know which one now). So I would like to have all Camel features and it’s dependencies in Cave.

How can I generate a repo with all Camel features ? is there any automatic way to do that ?

 

I’m using Karaf 4.0.8

 

Best regards

--

Mariusz Koprowski

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Building karaf offline version with Karaf Cave

João Assunção
Hi Mariusz,

Down I include a possible configuration for the karaf-maven-plugin that should do what you want. It might need some fiddling to work, and you will need to add the name of all the camel features that you want to include. 
I normally use maven-assembly-plugin to zip the resulting repository.

<plugin>
    <groupId>org.apache.karaf.tooling</groupId>
    <artifactId>karaf-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>features-add-to-repo</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>features-add-to-repository</goal>
            </goals>
            <configuration>
                <resolveDefinedRepositoriesRecursively>true</resolveDefinedRepositoriesRecursively>
                <descriptors>
                    <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
                    <descriptor>mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features</descriptor>                                
                    <descriptor>mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features</descriptor>
                </descriptors>
                <includeMvnBasedDescriptors>false</includeMvnBasedDescriptors>
                <addTransitiveFeatures>true</addTransitiveFeatures>
                <features>
                    <feature>camel</feature>
                    <feature>camel-ahc</feature>
                    <feature>camel-ahc-ws</feature>
                    ....
                </features>
                <repository>target/local-repo</repository>
            </configuration>
        </execution>
    </executions>
</plugin>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <executions>
        <execution>
            <id>bin</id>
            <phase>install</phase>
            <goals>
                <goal>single</goal>
            </goals>
            <configuration>
                <descriptors>
                    <descriptor>src/assemble/bin.xml</descriptor>
                </descriptors>
            </configuration>
        </execution>
    </executions>
  </plugin>
</plugins>

João Assunção

Mobile: +351 916968984
Phone: +351 211933149



On Wed, Aug 23, 2017 at 11:56 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi João

Well I’m searching for option to add to repo all features that are in repositories that I have provided e.g.:

I have Camel repo defined. It contains around 200 features. I would like repo to have them all not only the one that I need on boot. So user can add them if needed without internet.

 

 

Best regards

--

Mariusz Koprowski
Enterprise Solutions Engineering Lead

T: <a href="tel:+48%2042%20253%2048%2028" value="+48422534828" target="_blank">+48 42 253 48 28

E: [hidden email]

Hexagon Mining
Wolczanska 128/134

90-441, Lodz, Poland
www.hexagonmining.com | WebEx | Skype

 

From: João Assunção [mailto:[hidden email]]
Sent: Monday, August 21, 2017 6:49 PM
To: [hidden email]
Subject: Re: Building karaf offline version with Karaf Cave

 

Hi Mariusz,

 

I've been using karaf-maven-plugin, with the goal features-add-to-repository, to generate a maven like repository with the set of features to make available offline.

I then change org.ops4j.pax.url.mvn.localRepository in  org.ops4j.pax.url.mvn.cfg to point to the directory containing the repository produced by the plugin.

In the past this worked quite well, and I ended with a repository just with the dependencies specified in the plugin configuration. With the 4.x version, for some reason I'm still trying to figure out, I end with a repository with all the features, even standard ones.

 

Best regards,


João Assunção

 

Email: [hidden email]

Mobile: <a href="tel:+351%20916%20968%20984" value="+351916968984" target="_blank">+351 916968984

Phone: <a href="tel:+351%2021%20193%203149" value="+351211933149" target="_blank">+351 211933149

 

 

 

On Mon, Aug 21, 2017 at 11:25 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi All

I have a such situation. I need install karaf without internet connection.

I know that I could use Karaf Cave as a repo… but the question is how to populate it with all needed things.

 

E.g. AS a standard, the installation that I need to do, comes with Karaf Standard + Camel Core. But in time I will need to add some of the Camel features (I don’t know which one now). So I would like to have all Camel features and it’s dependencies in Cave.

How can I generate a repo with all Camel features ? is there any automatic way to do that ?

 

I’m using Karaf 4.0.8

 

Best regards

--

Mariusz Koprowski

 

 


Reply | Threaded
Open this post in threaded view
|

RE: Building karaf offline version with Karaf Cave

Koprowski, Mariusz

Thanks João

Will try and let know everybody how it went

 

Best regards

--

Mariusz Koprowski
Enterprise Solutions Engineering Lead

T: +48 42 253 48 28

E: [hidden email]

Hexagon Mining
Wolczanska 128/134

90-441, Lodz, Poland
www.hexagonmining.com | WebEx | <a href="skype:mariusz.koprowski@hexagonmining.com">Skype

 

From: João Assunção [mailto:[hidden email]]
Sent: Wednesday, August 23, 2017 7:23 PM
To: [hidden email]
Subject: Re: Building karaf offline version with Karaf Cave

 

Hi Mariusz,

 

Down I include a possible configuration for the karaf-maven-plugin that should do what you want. It might need some fiddling to work, and you will need to add the name of all the camel features that you want to include. 

I normally use maven-assembly-plugin to zip the resulting repository.

 

<plugin>

    <groupId>org.apache.karaf.tooling</groupId>

    <artifactId>karaf-maven-plugin</artifactId>

    <executions>

        <execution>

            <id>features-add-to-repo</id>

            <phase>generate-resources</phase>

            <goals>

                <goal>features-add-to-repository</goal>

            </goals>

            <configuration>

                <resolveDefinedRepositoriesRecursively>true</resolveDefinedRepositoriesRecursively>

                <descriptors>

                    <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>

                    <descriptor>mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features</descriptor>                                

                    <descriptor>mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features</descriptor>

                </descriptors>

                <includeMvnBasedDescriptors>false</includeMvnBasedDescriptors>

                <addTransitiveFeatures>true</addTransitiveFeatures>

                <features>

                    <feature>camel</feature>

                    <feature>camel-ahc</feature>

                    <feature>camel-ahc-ws</feature>

                    ....

                </features>

                <repository>target/local-repo</repository>

            </configuration>

        </execution>

    </executions>

</plugin>

<plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-assembly-plugin</artifactId>

    <executions>

        <execution>

            <id>bin</id>

            <phase>install</phase>

            <goals>

                <goal>single</goal>

            </goals>

            <configuration>

                <descriptors>

                    <descriptor>src/assemble/bin.xml</descriptor>

                </descriptors>

            </configuration>

        </execution>

    </executions>

  </plugin>

</plugins>


João Assunção

 

Email: [hidden email]

Mobile: +351 916968984

Phone: +351 211933149

 

 

 

On Wed, Aug 23, 2017 at 11:56 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi João

Well I’m searching for option to add to repo all features that are in repositories that I have provided e.g.:

I have Camel repo defined. It contains around 200 features. I would like repo to have them all not only the one that I need on boot. So user can add them if needed without internet.

 

 

Best regards

--

Mariusz Koprowski
Enterprise Solutions Engineering Lead

T: <a href="tel:&#43;48%2042%20253%2048%2028" target="_blank">+48 42 253 48 28

E: [hidden email]

Hexagon Mining
Wolczanska 128/134

90-441, Lodz, Poland
www.hexagonmining.com | WebEx | Skype

 

From: João Assunção [mailto:[hidden email]]
Sent: Monday, August 21, 2017 6:49 PM
To: [hidden email]
Subject: Re: Building karaf offline version with Karaf Cave

 

Hi Mariusz,

 

I've been using karaf-maven-plugin, with the goal features-add-to-repository, to generate a maven like repository with the set of features to make available offline.

I then change org.ops4j.pax.url.mvn.localRepository in  org.ops4j.pax.url.mvn.cfg to point to the directory containing the repository produced by the plugin.

In the past this worked quite well, and I ended with a repository just with the dependencies specified in the plugin configuration. With the 4.x version, for some reason I'm still trying to figure out, I end with a repository with all the features, even standard ones.

 

Best regards,


João Assunção

 

Email: [hidden email]

Mobile: <a href="tel:&#43;351%20916%20968%20984" target="_blank">+351 916968984

Phone: <a href="tel:&#43;351%2021%20193%203149" target="_blank">+351 211933149

 

 

 

On Mon, Aug 21, 2017 at 11:25 AM, Mariusz Koprowski <[hidden email]> wrote:

Hi All

I have a such situation. I need install karaf without internet connection.

I know that I could use Karaf Cave as a repo… but the question is how to populate it with all needed things.

 

E.g. AS a standard, the installation that I need to do, comes with Karaf Standard + Camel Core. But in time I will need to add some of the Camel features (I don’t know which one now). So I would like to have all Camel features and it’s dependencies in Cave.

How can I generate a repo with all Camel features ? is there any automatic way to do that ?

 

I’m using Karaf 4.0.8

 

Best regards

--

Mariusz Koprowski