h1. Populate Cave Repository h2. Upload a single artifact You can upload a single artifact into a Cave Repository: {code} karaf@root> cave:repository-upload-artifact cave-repo file:/home/jbonofre/.m2/repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/3.3_2/org.apache.servicemix.bundles.asm-3.3_2.jar karaf@root> cave:repository-upload-artifact cave-repo http://svn.apache.org/repos/asf/servicemix/m2-repo/org/apache/qpid/qpid-broker/0.8.0/qpid-broker-0.8.0.jar {code} You can also use Maven style URL: {code} karaf@root> cave:repository-upload-artifact cave-repo mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.7.0_5 {code} h3. Populate from an external repository You can also make a kind of "batch" population of your Cave Repository, using an external repository: {code} karaf@root> cave:repository-populate cave-repo file:/home/jbonofre/.m2/repository {code} Cave supports file: but also http: URL. It means that Cave is able to browse a remote repository and copy the artifacts. For instance, you can populate your Cave Repository using all Ant ServiceMix bundles present on the Central Maven repository: {code} karaf@root> cave:repository-populate cave-repo http://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.ant/ {code} You can also populate with the whole Central Maven Repository: {code} karaf@root> cave:repository-populate cave-repo http://repo1.maven.org/maven2 {code} WARNING: the Central Maven Repository is really huge and populating from the whole Maven Central Repository will take very very long time. It's just for demonstration purpose. You can filter the artifacts that you want to pick up to populate the repository. The cave:repository-populate command accepts a regex option for the filter. For instance, to pick up only joda-time version 2 artifact, you can run: {code} karaf@root> cave:repository-populate --filter .*joda-time-2.* cave-repo http://repo2.maven.org/maven2/joda-time/joda-time {code} The cave:repository-populate command doesn't update the OBR metadata. You have to run: {code} karaf@root> cave:repository-scan cave-repo {code} to update the OBR metadata. If you want to update the OBR metadata at population time, you have to use the -u or --update option of the cave:repository-populate command: {code} karaf@root> cave:repository-populate -u cave-repo http://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles/ {code}