Dependency errors while installing from distribution-karaf.zip (created under distribution/karaf/target directory )

asked 2015-05-06 04:11:12 -0700

I have created a SB plugin that is dependent on a few features (like L2 switch , OpenflowPlugin, mdsal etc). The project compiles fine and runs fine on any x-86 Ubuntu machine and creates a local m2 repository while compiling.

Now, While I compile the code a zip file (distribution-karaf-v-SNAPSHOT.zip) is created under distribution/karaf/target directory. As per my understanding if I want to run my plugin on any machine this zip file should be sufficient. But when I extract the contents of this zip file and run ./bin/karaf, on a fresh machine which doesnt have a local m2 repository, I get a list of dependency errors which otherwise (when code is compiled on a machine) works absolutely fine.

I wanted to know how this can be made functional just like Helium SR1,SR2 or SR3 releases which have no dependency on local m2 repository to run. Please suggest in case specific configuration needs to be done for the same.

I have attached distribution/karaf/pom.xml for reference.

Thanks in advance.

Below is my pom.xml

====================================================== <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.opendaylight.aricentAdapter</groupid> <artifactid>aricentAdapter-parent</artifactid> <version>0.2.0-SNAPSHOT</version> <relativepath>../parent</relativepath> </parent></project>

<artifactId>distribution-karaf</artifactId>

<packaging>pom</packaging>
<prerequisites>
    <maven>3.1.1</maven>
</prerequisites>

<dependencies>
    <!-- Basic Karaf 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>standard</artifactId>
        <version>${karaf.version}</version>
        <classifier>features</classifier>
        <type>xml</type>
        <scope>runtime</scope>
    </dependency>

    <!-- ODL Branding -->
    <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>karaf.branding</artifactId>
        <version>${branding.version}</version>
        <scope>compile</scope>
    </dependency>

    <!-- ODL Resources needed for karaf -->
    <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>opendaylight-karaf-resources</artifactId>
        <version>${karaf.resources.version}</version>
    </dependency>

    <!-- Project local feautures -->

    <dependency>
        <groupId>org.opendaylight.aricentAdapter</groupId>
        <artifactId>features-aricentAdapter</artifactId>
        <version>${project.version}</version>
        <classifier>features</classifier>
        <type>xml</type>
        <scope>runtime</scope>
    </dependency>
</dependencies>

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.felix</groupId>
                                    <artifactId>maven-bundle-plugin</artifactId>
                                    <versionRange>[0,)</versionRange>
                                    <goals>
                                        <goal>cleanVersions</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[0,)</versionRange>
                                    <goals>
                                        <goal>copy</goal>
                                        <goal>unpack</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.karaf.tooling</groupId>
                                    <artifactId>karaf-maven-plugin</artifactId>
                                    <versionRange>[0,)</versionRange>
                                    <goals>
                                        <goal>commands-generate-help</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.fusesource.scalate</groupId>
                                    <artifactId>maven-scalate-plugin</artifactId>
                                    <versionRange>[0,)</versionRange>
                                    <goals>
                                        <goal>sitegen</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.servicemix.tooling</groupId>
                                    <artifactId>depends-maven-plugin</artifactId>
                                    <versionRange>[0 ...
(more)
edit retag flag offensive close merge delete