Hi JB and Ed,

I thought I had org.ops4j.pax.url.mvn.cfg set correctly however it turns out I still cannot pull the latest snapshot from my Archiva. I will try Ed's suggestion

Thanks
On 16/01/16 13:21, Ed Welch wrote:
JT,

I also always set

org.ops4j.pax.url.mvn.globalUpdatePolicy=always

In org.ops4j.pax.url.mvn.cfg when I'm working with snapshots.

Just like how local maven has an update policy of 24hours for pulling snapshots 
from a remote repo, so does Karaf.

This way, every time I run bundle:update, it checks my remote repo for new 
snapshots.

Take a look at https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol for 
more info.

Regards,
Ed

On Sat, 16 Jan 2016 06:23:42 +0100, Jean-Baptiste Onofré <[email protected]> 
wrote:

Hi JT,

it depends what you want.

By default, Karaf fist looks into the local Maven repository ($HOME/.m2)
and goes to remote repositories if the artifact is not found locally:
it's the regular "Maven" behaviour.

If you want to check first on remote repository, then the local
repository has to be consider as a remote one.

Regards
JB

On 01/15/2016 10:41 PM, JT wrote:
Hi,

I just wanted to clarify how to set-up repositories in
org.ops4j.pax.url.mvn.cfg

I have 3 machines. Machine A runs an instance of Karaf. Machine B
contains my Apache Archiva instance from which I pull bundles. I develop
the bundles on machine C.

I develop snapshot bundles on machine C and I push them to Archiva on
machine B. I then install them in my Karaf instance (machine A) using
the 'install mvn' command and have configured org.ops4j.pax.url.mvn.cfg
to include the URL of the Apache Archiva of machine B. If it is the
first time I have installed a snapshot bundle in the Karaf instance it
retrieves it as expected from Archiva on machine B. However if I update
the snapshot and push to archive, when I update the Karaf instance it
does not refer to Archiva but uses the snapshot held in the local .m2
repository.

If I set org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote=true then it
appears to work as I require i.e. the latest snapshot is retrieved from
Archiva on machine B. Is this the correct way to achieve what I want,
i.e. always force Karaf to look at my remote repositories especially for
snapshots and where does the local repository appear in the order of
remotes if the above config. is set?

Thanks

jt


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com



Reply via email to