[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache-karaf in Debian



>>>>> Steinar Bang <sb@dod.no>:
[snip!]
> Karaf has a concept of "local maven repository" that would fit in nicely
> with debian's maven layout under /usr/share/maven-repo/

> Modifying the setting org.ops4j.pax.url.mvn.localRepository in
> /etc/karaf/org.ops4j.pax.url.mvn.cfg, like this:
>  org.ops4j.pax.url.mvn.localRepository = /usr/share/maven-repo

Please disregard! This was bad advice from me.

The local repository needs to be writable.  The default, if not set, is
~/.m2/repository/ and should be left that way.

However, the debian maven layout could be added to the lists
org.ops4j.pax.url.mvn.defaultRepositories or
org.ops4j.pax.url.mvn.repositories (I don't know which one would be most
appropriate.

Both of these settings are in the /etc/karaf/org.ops4j.pax.url.mvn.cfg
file.

Their current values are:
 # A repository url can be appended with zero or more of the following flags:
 #    @snapshots  : the repository contains snaphots
 #    @noreleases : the repository does not contain any released artifacts
 #
 # The following property value will add the system folder as a repo.
 #
 org.ops4j.pax.url.mvn.defaultRepositories=\
     file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \
     file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
     file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots

 org.ops4j.pax.url.mvn.repositories= \
     http://repo1.maven.org/maven2@id=central, \
     http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases, \
     https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases

Adding the debian maven-repo would look something like this:
 org.ops4j.pax.url.mvn.defaultRepositories=\
     file:/usr/share/maven-repo@id=debian.repository, \
     file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \
     file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
     file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots



Reply to: