Did some experiment :
For some reason -Dmaven.repo.remote=file:/// doesnt have any effect at all (
in maven 3.0 )
However the same can be given in settings.xml

However, it wont result in a read-only local repository, as the artifact
gets copied from teh file:/// location to teh location designated as local
repository ( But since it is a file to file copy, it is fast )


But thats fine, since the real problem is about the local repository being
unsafe for concurrent access. So thanks for that.


--sony



On Fri, Apr 15, 2011 at 4:06 PM, Sony Antony <sony.ant...@gmail.com> wrote:

> Thanks a real lot James :
> I was not aware of maven.repo.local ( although I was aware of teh
> setting.xml optio to specify the local repository ). We have decided to use
> this.
>
> 1. "which gives other benefits other than just its safe"
> Do you mind explaining some of the other benefits we might reap with
> seperate local repo.
>
> 2. While looking up the maven.repo.local, you mentioned, I came across
> maven.repo.remote, which takes multiple comma seperated URLs. I was
> wondering if I could use a file:/// style URL on this. So that we can have
> a single read-only secondary local repository, hosting all teh third party
> software and plugins ( without having to host them in a internal corporate
> web server )
>
> ( different maven.repo.local for each instances will require teh same
> thirdparty software/plugins to be duplicated in multiple places )
>
>
> --sony
>
>
>
>
> On Fri, Apr 15, 2011 at 3:44 PM, Nord, James <jn...@nds.com> wrote:
>
>> Hi Sony,
>>
>> You can just configure a separate local repo for each CI job (which gives
>> other benefits other than just its safe).
>>
>> Hudson/Jenkins can do this for you (use private repository option)
>>
>> Otherwise use "mvn  -Dmaven.repo.local=/path/to/job/specific/repo
>> <other_options>"
>> Or set it in your settings file (which you can then specify also per job
>> with -s)
>>
>> /james
>>
>>
>> -----Original Message-----
>> From: Sony Antony [mailto:sony.ant...@gmail.com]
>> Sent: 15 April 2011 20:31
>> To: Maven Users List
>> Subject: Re: Is maven3 repository safe for concurrent access
>>
>> You are correct. My interest is in knowing if I can use maven under a
>> CI/hudson  environment ( with multiple seperate instances of maven running
>> ).
>> If there is a patch for this, can somebody please post its reference here
>>
>> --sony
>>
>> On Fri, Apr 15, 2011 at 3:23 PM, Mirko Friedenhagen <
>> mfriedenha...@gmail.com
>> > wrote:
>>
>> > On Fri, Apr 15, 2011 at 19:39, Kristian Rosenvold
>> > <kristian.rosenv...@gmail.com> wrote:
>> > >
>> > > fr., 15.04.2011 kl. 11.54 -0400, skrev Sony Antony:
>> > >> Thank you Jason :
>> > >> If 3.x local repository is not safe for concurrent access, how does
>> > maven3
>> > >>  implement parallel builds ( -T switch ) ( maybe they decide on teh
>> > >> parallelism by making sure that there is no concurrent read/write
>> > >> access on teh repository *for the same* artifacts
>> > ? )
>> > >>
>> > >
>> > > The first half you got right, there is no concurrent writes of the
>> > > each individual artifact "by design".
>> > >
>> > > When it comes to downloading from remote repositories it's all
>> > > handled by a common (singleton) service anyway.
>> >
>> > This is only correct for one single instance of maven running, where
>> > multiple threads are downloading artifacts, isn't it? I guess the OP
>> > wanted to know wether it is safe to use Maven3 in a CI, where multiple
>> > processes download dependencies. To my understanding it is not safe,
>> > there was a patch for Maven2, if I remember right.
>> >
>> > Regards
>> > Mirko
>> > --
>> > http://illegalstateexception.blogspot.com/
>> > https://github.com/mfriedenhagen/
>> > https://bitbucket.org/mfriedenhagen/
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: users-h...@maven.apache.org
>> >
>> >
>>
>>
>>
>> **************************************************************************************
>> This message is confidential and intended only for the addressee. If you
>> have received this message in error, please immediately notify the
>> postmas...@nds.com and delete it from your system as well as any copies.
>> The content of e-mails as well as traffic data may be monitored by NDS for
>> employment and security purposes. To protect the environment please do not
>> print this e-mail unless necessary.
>>
>> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18
>> 4EX, United Kingdom. A company registered in England and Wales. Registered
>> no. 3080780. VAT no. GB 603 8808 40-00
>>
>> **************************************************************************************
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>

Reply via email to