0

I created a simple karaf application that just run some calculations. After that I did mvn clean install and then I added the bundle to the local maven repository with install:install-file -Dfile=bundle1-1.0-SNAPSHOT.jar -DgroupId=prg.ogra -DartifactId=bundle1 -Dversion=1.0-SNAPSHOT -Dpackaging=jar

Now I run karaf with ./apache-karaf-4.2.0/bin/karaf debug and when I do install mvn:org.orga/bundle1/0.0.1-SNAPSHOT

I get an error: Error executing command: Error installing bundles: Unable to install bundle mvn:org.orga/bundle1/0.0.1-SNAPSHOT: org.osgi.framework.BundleException: Unable to cache bundle: mvn:org.orga/bundle1/0.0.1-SNAPSHOT

What should I do? Where am I wrong?

1 Answers1

1

In karaf, run the following:

maven:summary

and make sure karaf is actually linked to the correct local repository.

In addition, navigate to your local repository on the file system and verify that the bundle is located at the maven coordinates you are specifying in the install command. Edit as needed.

Michael Peacock
  • 2,011
  • 1
  • 11
  • 14
  • `maven:summary > Command not found: maven:summary ` and when I search to my local repository lib I cannot see my jar even when I follow these steps , https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project –  Nov 05 '20 at 09:15
  • 1
    The maven:xxx commands will be part of your Karaf installation, if you have the Karaf maven feature installed. If not, run this command in Karaf: feature:install maven – Michael Peacock Nov 09 '20 at 14:57
  • when I try to `feature:install maven` I get `Error executing command: Error: Error downloading mvn:org.apache.karaf.maven/org.apache.karaf.maven.core/4.2.0 ` - @MichaelPeacock –  Nov 10 '20 at 11:50