Karaf
  1. Karaf
  2. KARAF-1227

Cannot build Apache Karaf from Source without adding custom Maven repositories

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.5
    • Fix Version/s: None
    • Component/s: karaf-core
    • Labels:
      None
    • Environment:

      Ubuntu 11.10 64-bit, OpenJDK 6, corporate Nexus repository

      Description

      Some repos are not available from Central, required by org.apache.karaf:org.apache.karaf.main:bundle:2.2.5 :

      1. org.eclipse:osgi:jar:3.6.2.R36x_v20110210 --> This is only available from http://svn.apache.org/repos/asf/servicemix/m2-repo, which needs to be added to <repositories> or documented in the "BUILDING" guide.

      Ironically, this artifact isn't even available in Eclipse Foundation's own http://maven.eclipse.org/nexus !

      2. biz.aQute:bndlib:jar:0.0.313. It is available from http://www.aqute.biz/repo, however newer versions are available from Central.

      To use the latest bndlib, edit src/pom.xml, and add inside dependencyManagement:

      <dependency>
      <groupId>biz.aQute</groupId>
      <artifactId>bndlib</artifactId>
      <version>1.50.0</version>
      </dependency>
      

      Meanwhile, Maven Bundle Plugin is already on version 2.3.7, so it's better to upgrade:

              <felix.plugin.version>2.3.7</felix.plugin.version>
      

        Activity

        Hide
        Jean-Baptiste Onofré added a comment -

        The ServiceMix M2 repository is already define in the Karaf main POM:

        <!-- ServiceMix repo -->
        <repository>
        <id>servicemix</id>
        <name>Apache ServiceMix Repository</name>
        <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
        <releases>
        <enabled>true</enabled>
        </releases>
        <snapshots>
        <enabled>false</enabled>
        </snapshots>
        </repository>

        It works out of the box (I tested it).

        Regarding the bndlib, it's not defined in the Karaf POMs. It's normal, as the bndlib version comes as a transitive dependency of the maven-bundle-plugin and pax-swissbox. The 0.0.313 is only used for test anyway:

        biz.aQute:bndlib:jar:0.0.313:test

        And the latest one 1.50.0 shipped with maven-bundle-plugin is with compile scope:

        [INFO] biz.aQute:bndlib:jar:1.50.0:compile

        Show
        Jean-Baptiste Onofré added a comment - The ServiceMix M2 repository is already define in the Karaf main POM: <!-- ServiceMix repo --> <repository> <id>servicemix</id> <name>Apache ServiceMix Repository</name> <url> http://svn.apache.org/repos/asf/servicemix/m2-repo </url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> It works out of the box (I tested it). Regarding the bndlib, it's not defined in the Karaf POMs. It's normal, as the bndlib version comes as a transitive dependency of the maven-bundle-plugin and pax-swissbox. The 0.0.313 is only used for test anyway: biz.aQute:bndlib:jar:0.0.313:test And the latest one 1.50.0 shipped with maven-bundle-plugin is with compile scope: [INFO] biz.aQute:bndlib:jar:1.50.0:compile
        Hide
        Hendy Irawan added a comment -

        Thank you Jean-Baptiste.

        I think the least is to make the requirements clearer in the "BUILDING" file, and where to get it.
        Because otherwise, the build will fail.

        i.e. something like this will do:

        ...............

        Building Karaf also requires biz.aQute:bndlib:jar:0.0.313 used for testing,
        which is a transitive dependency of the maven-bundle-plugin.

        If you are using a proxy repository like Nexus, you may need to add these Maven repositories
        in order to build Karaf successfully:

        ...............

        Show
        Hendy Irawan added a comment - Thank you Jean-Baptiste. I think the least is to make the requirements clearer in the "BUILDING" file, and where to get it. Because otherwise, the build will fail. i.e. something like this will do: ............... Building Karaf also requires biz.aQute:bndlib:jar:0.0.313 used for testing, which is a transitive dependency of the maven-bundle-plugin. If you are using a proxy repository like Nexus, you may need to add these Maven repositories in order to build Karaf successfully: http://svn.apache.org/repos/asf/servicemix/m2-repo http://www.aqute.biz/repo ...............

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Hendy Irawan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development