You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by niels <st...@gmail.com> on 2014/01/14 10:06:08 UTC

Custom Karaf with Apache Camel

Hey,

I'm trying to create a custom distribution of Karaf with Apache Camel. 
I tried building a distribution with several different version of Apache
Camel without any luck.

I first tried the version used by ServiceMix: Camel - 2.10.7 without any
luck. 
Maven was complaining:  

[WARNING] could not resolve wrap:mvn:bsf/bsf/2.4.0
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find
artifact wrap:mvn:jar:bsf/bsf/2.4.0 in servicemix
(http://svn.apache.org/repos/asf/servicemix/m2-repo)

When I tried Camel - 2.11.3 I got the same result. Finally I tried to use
the latest Camel version 2.12.2.
This one didn't complain about BSF missing (could be it didn't got that far)
but complained on facebook4j-core  being missing. 

[WARNING] could not resolve wrap:mvn:org.facebook4j/facebook4j-core/1.1.12
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find
artifact wrap:mvn:jar:org.facebook4j/facebook4j-core/1.1.12 in servicemix
(http://svn.apache.org/repos/asf/servicemix/m2-repo)

I assume BSF is needed for scripting in Camel and facebook4j-core for the
facebook component both which I don't need. So could it be I could better
create a custom feature file only including camel-core bundle and the
components that I need? If so could somebody give a small hint how I could
accomplish it?

Still I find it strange I couldn't build a version with Camel 2.10.7.

btw: I'm using Java version "1.7.0_25" with Apache Maven 3.0.5 on Ubuntu
13.04 

This is the pom I defined:

<?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.apache.karaf.assemblies</groupId>
        <artifactId>assemblies</artifactId>
        <version>3.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>nl.kabisa.esb</groupId>
    <artifactId>flux</artifactId>
    <packaging>pom</packaging>
    <name>Kabisa Flux Distribution</name>

    <properties>
       
<appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <type>kar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>spring</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.karaf</groupId>
            <artifactId>apache-camel</artifactId>
            <version>2.12.2</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/../..</directory>
                <filtering>false</filtering>
                <includes>
                    <include>README</include>
                    <include>RELEASE*</include>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>install-kars</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package</id>
                        <goals>
                            <goal>instance-create-archive</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <bootFeatures>
                        <feature>framework</feature>
                    </bootFeatures>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>





--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-Karaf-with-Apache-Camel-tp4030997.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom Karaf with Apache Camel

Posted by Achim Nierbeck <bc...@googlemail.com>.
+1 for that, don't use wrap in production ;)


2014/1/17 Ryan Moquin <fr...@gmail.com>

> Thanks, JB.  As a result of that issue, I just bundlize everything.  I see
> other's using wrap, so I initially just thought it was something with me,
> but maybe it's just broken all together.  I view Wrap as more as ROP (Rapid
> OSGI Prototyping) :)  I don't think any project should be using wrap for
> anything other than for temporary use.
>
> Ryan
>
>
> On Fri, Jan 17, 2014 at 9:47 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> Good catch Ryan.
>>
>> Generally speaking, we should avoid the usage of wrap (that's why we have
>> a bunch of ServiceMix bundles).
>>
>> I double check and gonna enhance it.
>>
>> Regards
>> JB
>>
>>
>> On 01/17/2014 03:41 PM, Ryan Moquin wrote:
>>
>>> I just noticed this thread.  I have hit this problem before and worked
>>> around it.. The reason that the artifact can't be resolved is because
>>> maven is asked to resolve it with "wrap:" as part of the artifact's mvn
>>> url.  It needs to be stripped off first, but isn't, this is why maven
>>> can't find it.
>>>
>>> If you were able to take something like bnd-tools and convert those
>>> libraries to bundles or find an already bundlized one, you won't have
>>> the problem anymore.
>>>
>>> This is definitely a bug, I think it's with the aether library, but I
>>> hadn't had time to look into it further.
>>>
>>> Ryan
>>>
>>> On Fri, Jan 17, 2014 at 7:45 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> <ma...@nanthrax.net>> wrote:
>>>
>>>     Hi Niels,
>>>
>>>     sorry I forgot your issue. I take a look this afternoon.
>>>
>>>     Sorry about that.
>>>
>>>     Regards
>>>     JB
>>>
>>>
>>>     On 01/17/2014 01:41 PM, niels wrote:
>>>
>>>         Hey JB,
>>>
>>>         did you find out something?
>>>
>>>         Regards,
>>>
>>>         Niels
>>>
>>>
>>>
>>>         --
>>>         View this message in context:
>>>         http://karaf.922171.n3.nabble.__com/Custom-Karaf-with-
>>> Apache-__Camel-tp4030997p4031132.html
>>>
>>>         <http://karaf.922171.n3.nabble.com/Custom-Karaf-with-
>>> Apache-Camel-tp4030997p4031132.html>
>>>         Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>>
>>>     --
>>>     Jean-Baptiste Onofré
>>>     jbonofre@apache.org <ma...@apache.org>
>>>
>>>     http://blog.nanthrax.net
>>>     Talend - http://www.talend.com
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Re: Custom Karaf with Apache Camel

Posted by Ryan Moquin <fr...@gmail.com>.
Thanks, JB.  As a result of that issue, I just bundlize everything.  I see
other's using wrap, so I initially just thought it was something with me,
but maybe it's just broken all together.  I view Wrap as more as ROP (Rapid
OSGI Prototyping) :)  I don't think any project should be using wrap for
anything other than for temporary use.

Ryan


On Fri, Jan 17, 2014 at 9:47 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Good catch Ryan.
>
> Generally speaking, we should avoid the usage of wrap (that's why we have
> a bunch of ServiceMix bundles).
>
> I double check and gonna enhance it.
>
> Regards
> JB
>
>
> On 01/17/2014 03:41 PM, Ryan Moquin wrote:
>
>> I just noticed this thread.  I have hit this problem before and worked
>> around it.. The reason that the artifact can't be resolved is because
>> maven is asked to resolve it with "wrap:" as part of the artifact's mvn
>> url.  It needs to be stripped off first, but isn't, this is why maven
>> can't find it.
>>
>> If you were able to take something like bnd-tools and convert those
>> libraries to bundles or find an already bundlized one, you won't have
>> the problem anymore.
>>
>> This is definitely a bug, I think it's with the aether library, but I
>> hadn't had time to look into it further.
>>
>> Ryan
>>
>> On Fri, Jan 17, 2014 at 7:45 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>>     Hi Niels,
>>
>>     sorry I forgot your issue. I take a look this afternoon.
>>
>>     Sorry about that.
>>
>>     Regards
>>     JB
>>
>>
>>     On 01/17/2014 01:41 PM, niels wrote:
>>
>>         Hey JB,
>>
>>         did you find out something?
>>
>>         Regards,
>>
>>         Niels
>>
>>
>>
>>         --
>>         View this message in context:
>>         http://karaf.922171.n3.nabble.__com/Custom-Karaf-with-
>> Apache-__Camel-tp4030997p4031132.html
>>
>>         <http://karaf.922171.n3.nabble.com/Custom-Karaf-with-
>> Apache-Camel-tp4030997p4031132.html>
>>         Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbonofre@apache.org <ma...@apache.org>
>>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Custom Karaf with Apache Camel

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Good catch Ryan.

Generally speaking, we should avoid the usage of wrap (that's why we 
have a bunch of ServiceMix bundles).

I double check and gonna enhance it.

Regards
JB

On 01/17/2014 03:41 PM, Ryan Moquin wrote:
> I just noticed this thread.  I have hit this problem before and worked
> around it.. The reason that the artifact can't be resolved is because
> maven is asked to resolve it with "wrap:" as part of the artifact's mvn
> url.  It needs to be stripped off first, but isn't, this is why maven
> can't find it.
>
> If you were able to take something like bnd-tools and convert those
> libraries to bundles or find an already bundlized one, you won't have
> the problem anymore.
>
> This is definitely a bug, I think it's with the aether library, but I
> hadn't had time to look into it further.
>
> Ryan
>
> On Fri, Jan 17, 2014 at 7:45 AM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi Niels,
>
>     sorry I forgot your issue. I take a look this afternoon.
>
>     Sorry about that.
>
>     Regards
>     JB
>
>
>     On 01/17/2014 01:41 PM, niels wrote:
>
>         Hey JB,
>
>         did you find out something?
>
>         Regards,
>
>         Niels
>
>
>
>         --
>         View this message in context:
>         http://karaf.922171.n3.nabble.__com/Custom-Karaf-with-Apache-__Camel-tp4030997p4031132.html
>         <http://karaf.922171.n3.nabble.com/Custom-Karaf-with-Apache-Camel-tp4030997p4031132.html>
>         Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

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

Re: Custom Karaf with Apache Camel

Posted by Ryan Moquin <fr...@gmail.com>.
I just noticed this thread.  I have hit this problem before and worked
around it.. The reason that the artifact can't be resolved is because maven
is asked to resolve it with "wrap:" as part of the artifact's mvn url.  It
needs to be stripped off first, but isn't, this is why maven can't find it.

If you were able to take something like bnd-tools and convert those
libraries to bundles or find an already bundlized one, you won't have the
problem anymore.

This is definitely a bug, I think it's with the aether library, but I
hadn't had time to look into it further.
Ryan

On Fri, Jan 17, 2014 at 7:45 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Niels,
>
> sorry I forgot your issue. I take a look this afternoon.
>
> Sorry about that.
>
> Regards
> JB
>
>
> On 01/17/2014 01:41 PM, niels wrote:
>
>> Hey JB,
>>
>> did you find out something?
>>
>> Regards,
>>
>> Niels
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/Custom-Karaf-with-Apache-Camel-tp4030997p4031132.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 Karaf with Apache Camel

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

sorry I forgot your issue. I take a look this afternoon.

Sorry about that.

Regards
JB

On 01/17/2014 01:41 PM, niels wrote:
> Hey JB,
>
> did you find out something?
>
> Regards,
>
> Niels
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-Karaf-with-Apache-Camel-tp4030997p4031132.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 Karaf with Apache Camel

Posted by niels <st...@gmail.com>.
Hey JB,

did you find out something? 

Regards,

Niels



--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-Karaf-with-Apache-Camel-tp4030997p4031132.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom Karaf with Apache Camel

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

I gonna take a look but it sounds like missing artifacts. We got an 
issue on Central with some artifacts in ActiveMQ. Let me check if it's 
not something similar.

Regards
JB

On 01/14/2014 10:06 AM, niels wrote:
> Hey,
>
> I'm trying to create a custom distribution of Karaf with Apache Camel.
> I tried building a distribution with several different version of Apache
> Camel without any luck.
>
> I first tried the version used by ServiceMix: Camel - 2.10.7 without any
> luck.
> Maven was complaining:
>
> [WARNING] could not resolve wrap:mvn:bsf/bsf/2.4.0
> org.sonatype.aether.resolution.ArtifactResolutionException: Could not find
> artifact wrap:mvn:jar:bsf/bsf/2.4.0 in servicemix
> (http://svn.apache.org/repos/asf/servicemix/m2-repo)
>
> When I tried Camel - 2.11.3 I got the same result. Finally I tried to use
> the latest Camel version 2.12.2.
> This one didn't complain about BSF missing (could be it didn't got that far)
> but complained on facebook4j-core  being missing.
>
> [WARNING] could not resolve wrap:mvn:org.facebook4j/facebook4j-core/1.1.12
> org.sonatype.aether.resolution.ArtifactResolutionException: Could not find
> artifact wrap:mvn:jar:org.facebook4j/facebook4j-core/1.1.12 in servicemix
> (http://svn.apache.org/repos/asf/servicemix/m2-repo)
>
> I assume BSF is needed for scripting in Camel and facebook4j-core for the
> facebook component both which I don't need. So could it be I could better
> create a custom feature file only including camel-core bundle and the
> components that I need? If so could somebody give a small hint how I could
> accomplish it?
>
> Still I find it strange I couldn't build a version with Camel 2.10.7.
>
> btw: I'm using Java version "1.7.0_25" with Apache Maven 3.0.5 on Ubuntu
> 13.04
>
> This is the pom I defined:
>
> <?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.apache.karaf.assemblies</groupId>
>          <artifactId>assemblies</artifactId>
>          <version>3.0.0</version>
>          <relativePath>../pom.xml</relativePath>
>      </parent>
>
>      <groupId>nl.kabisa.esb</groupId>
>      <artifactId>flux</artifactId>
>      <packaging>pom</packaging>
>      <name>Kabisa Flux Distribution</name>
>
>      <properties>
>
> <appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
>      </properties>
>
>      <dependencies>
>          <dependency>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>framework</artifactId>
>              <type>kar</type>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>standard</artifactId>
>              <classifier>features</classifier>
>              <type>xml</type>
>              <scope>runtime</scope>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.karaf.features</groupId>
>              <artifactId>spring</artifactId>
>              <classifier>features</classifier>
>              <type>xml</type>
>              <scope>runtime</scope>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.camel.karaf</groupId>
>              <artifactId>apache-camel</artifactId>
>              <version>2.12.2</version>
>              <classifier>features</classifier>
>              <type>xml</type>
>          </dependency>
>      </dependencies>
>
>      <build>
>          <resources>
>              <resource>
>                  <directory>${project.basedir}/../..</directory>
>                  <filtering>false</filtering>
>                  <includes>
>                      <include>README</include>
>                      <include>RELEASE*</include>
>                      <include>LICENSE</include>
>                      <include>NOTICE</include>
>                  </includes>
>              </resource>
>          </resources>
>          <plugins>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-resources-plugin</artifactId>
>                  <executions>
>                      <execution>
>                          <id>process-resources</id>
>                          <goals>
>                              <goal>resources</goal>
>                          </goals>
>                      </execution>
>                  </executions>
>              </plugin>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-remote-resources-plugin</artifactId>
>                  <configuration>
>                      <skip>true</skip>
>                  </configuration>
>              </plugin>
>              <plugin>
>                  <groupId>org.apache.karaf.tooling</groupId>
>                  <artifactId>karaf-maven-plugin</artifactId>
>                  <executions>
>                      <execution>
>                          <id>process-resources</id>
>                          <phase>process-resources</phase>
>                          <goals>
>                              <goal>install-kars</goal>
>                          </goals>
>                      </execution>
>                      <execution>
>                          <id>package</id>
>                          <goals>
>                              <goal>instance-create-archive</goal>
>                          </goals>
>                      </execution>
>                  </executions>
>                  <configuration>
>                      <installedFeatures>
>                          <feature>wrapper</feature>
>                      </installedFeatures>
>                      <bootFeatures>
>                          <feature>framework</feature>
>                      </bootFeatures>
>                  </configuration>
>              </plugin>
>          </plugins>
>      </build>
> </project>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-Karaf-with-Apache-Camel-tp4030997.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