karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From niels <steni...@gmail.com>
Subject Custom Karaf with Apache Camel
Date Tue, 14 Jan 2014 09:06:08 GMT
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.

Mime
View raw message