Hi

I cannot get the karaf maven plugin to pull in all jars needed for my app,
it only generates an empty feature.xml..

Normally we are building a full custom Karaf assembly per project, but we
are changing it.

The idea are just to make a kar instead providing all the jars, often the
environment we are installing to do no have any internet connection.

Here are my pom (I get a fully working karaf assembly if I change packaging
to karaf-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>com.netdesign.ccadmin</groupId>
        <artifactId>ccadmin</artifactId>
        <version>3.0.0-SNAPSHOT</version>
    </parent>

    <groupId>com.netdesign.ccadmin</groupId>
    <artifactId>ccadmin-karaf-assembly</artifactId>
    <packaging>kar</packaging>

    <name>ccadmin-karaf-assembly</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <karaf.version>4.2.0</karaf.version>
        <cxf.version>3.2.4</cxf.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <type>kar</type>
            <version>${karaf.version}</version>

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

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

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

    </dependencies>
    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>IS_M2RELEASEBUILD</name>
                    <value>true</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <artifactId>ccadmin-karaf-feature</artifactId>
                    <groupId>com.netdesign.ccadmin</groupId>
                    <classifier>features</classifier>
                    <type>xml</type>
                    <version>${build.parent.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>snapshot</id>
            <activation>
                <property>
                    <name>IS_M2RELEASEBUILD</name>
                    <value>!true</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <artifactId>ccadmin-karaf-feature</artifactId>
                    <groupId>com.netdesign.ccadmin</groupId>
                    <classifier>features</classifier>
                    <type>xml</type>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>

    </profiles>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
                <plugin>
                    <groupId>org.apache.karaf.tooling</groupId>
                    <artifactId>karaf-maven-plugin</artifactId>
                    <extensions>true</extensions>
                    <version>${karaf.version}</version>
                    <configuration>
                        <installedFeatures>
                            <feature>wrapper</feature>
                            <feature>cxf</feature>
                            <feature>cxf-commands</feature>
                            <feature>ccadmin</feature>
                        </installedFeatures>
                        <bootFeatures>
                            <feature>standard</feature>
                            <feature>webconsole</feature>
                        </bootFeatures>
                        <javase>1.8</javase>
                    </configuration>
                </plugin>
            </plugins>
    </build>
</project>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Reply via email to