leftbit
leftbit

Reputation: 838

How to deploy a karaf feature from a local maven repository?

I've created by first project for karaf (4.0.1). So far I've got the following:

So I'm ready to deliver to the customer - but I'm stuck over the development process. This question answered almost all my remaining questions save one:

After having built my project by running maven install I think I should be able to to get my feature running on a local karaf instance using something like the command feature:install.

I can install my application bundle from local maven by using bundle:install but then I'm down to managing dependencies myself.

Really can't figure out while bundle:install works against my local maven repository and feature:install doesn't.

Upvotes: 6

Views: 17038

Answers (2)

ravthiru
ravthiru

Reputation: 9663

Before installing a feature, you have to register the features repository that provides the feature using feature:repo-add

using feature:repo-add mvn:<groupId>/<artifactId>/<version>/xml

Upvotes: 0

leftbit
leftbit

Reputation: 838

Found the soloution here. I knew I'd need feature:repo-add - but the name of this command and the official documentation sent me thinking in entirely the wrong direction.

This command does not add a (maven) repository, but adds the location of a feature in the maven repository chain (so I'm thinking the old name addUrl was probably easier to understand).

Anyway - using feature:repo-add mvn:<groupId>/<artifactId>/<version>/xml/features works.

Upvotes: 11

Related Questions