2009/6/25 TheWinch <[email protected]>:
> One more question: how can I get a local copy of a maven repository (I don't
> know Maven very well too :-( ) ? From my experiments on another system that
> has a network access, I've seen that SMX4 stores the downloaded bundles in
> <smx4_home>/data/cache/bundle<xyz>, which makes it quite difficult to
> reconstruct the maven repository.
This is the Felix bundle cache, into which installed bundles are
copied so that they are available on restart (note that Felix is
simply the default OSGi runtime underpinning ServiceMix).
Unfortunately AFAIK pax-url doesn't first copy the downloaded bundles
into the local maven repo, or the <smx_home>/system dir, before
installing these bundles into the OSGi runtime.
One slightly messy approach to reconstruct the required maven repo,
would be to look at the feature definition in
<smx_home>/system/org/apache/servicemix/apache-servicemix/<version>/apache-servicemix-<version>-features.xml
and then for each bundle specified in the feature definition (and in
any embedded features) take the elements of form:
<bundle>mvn:org.apache.cxf:cxf-bundle/2.2.1<bundle>
and create a corresponding maven style dependency in a skeletal
pom.xml[1] of form:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>2.2.1</version>
</dependency>
Then run "mvn install" over this pom.xml with an empty local maven
repo ($HOME/.m2/repository by default).
Then you could simply copy over the populated local maven repo to the
isolated server via a USB stick or whatever.
Its a bit awkward really, and there may be better suggestions
forthcoming on this list.
Cheers,
Eoghan
[1] http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
> It seems that the jars are stored directly
> into the cache and are not copied into the pre-existing maven repository
> located in <smx4_home/system (is this really a maven repo ? Because it
> furiously looks like).
>
> I think the best option for me would be to make a mirror of the maven
> repositories referenced in <smx_home>/etc/org.ops4j.pax.url.mvn.cfg, as I
> intend to have several nodes running SMX4 on my private network.
> --
> View this message in context:
> http://www.nabble.com/SMX4---installing-features-without-internet-access---tp24200345p24202233.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>