Thanks everyone for your replies. Just like to document what I did to get a
standalone version of karaf 3.0.1 working.

1. Add Spring EBR repositories to maven:  external
<http://repository.springsource.com/maven/bundles/external/>   and  release
<http://repository.springsource.com/maven/bundles/release/>  

2. Add Apache Service mix repository to maven:  ASF ServiceMix
<http://svn.apache.org/repos/asf/servicemix/m2-repo/>  

3. Create a separate maven project to install any custom features.xml to
repo (if required)

4. Set project packaging to karaf-assembly

5. There will be 2 plugins in the build, maven-resources-plugin &
karaf-maven-plugin

6. Use maven-resources-plugin (goal: copy-resources, phase: package) to
override any configuration files needed. I had to override
org.ops4j.pax.url.mvn.cfg (more details later)

7. From the karaf-maven-plugin, calls to install-kars &
instance-create-archive are implicit for the packaging we chose, so no need
to include these

8. Add an execution for features-add-to-repository (phase prepare-package)
to copy the required dependencies to the system repo. Setting the feature
dependency scope to compile and marking the individual feature as
bootFeature, didn't work for me.

9. In the org.ops4j.pax.url.mvn.cfg, I had to make the following changes:
/org.ops4j.pax.url.mvn.localRepository=file:${karaf.home}/${karaf.default.repository}@id=system.repository
org.ops4j.pax.url.mvn.repositories= \
    file:${karaf.home}/${karaf.default.repository}@id=system.repository, \
    file:${karaf.data}/kar@id=kar.repository@multi/

Now when I start the karaf with a blank maven repo (under .m2) and no
internet connection, everything seems to work.

Seems like a lot of work to me  or maybe I am doing something wrong 




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-3-Standalone-Distribution-tp4034233p4034358.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to