I would try using the MS-DOS command "subst" to set up a fake M: drive
or something that is actually pointing at your current project. Then
tell settings.xml that your repo is at M:\repository which will
actually be c:\your-projects\project1\repository.

If this works, make a set.bat file to automate the process, and copy
the batch file into each of your projects.

Wayne

On 8/15/07, Vihung Marathe <[EMAIL PROTECTED]> wrote:
> I agree that the normal Maven way of doing things is to have a
> settings.xml per seat *(i.e. a user on a machine) that will apply to
> all projects.
>
> I am working on a project where, for reasons out of my control for
> now, we would like to have a repository per project, and hence a
> settings file per project too.
>
> I understand that I am working 'against' Maven in doing so, however,
> most of maven's functionality works fine with this arrangement. The
> only issue I am having is with the surefire plugin.
>
> To summarise, almost all of Maven's core functionality works with a
> relative repository location. The surefire plugin does not.
>
> Perhaps working with a relative repository location is not part of the
> 'spec', and therefore a failure to do so is not a bug.
>
> However,
> a) Maven has not prevented me from specifying a relative location for
> the repository, and
> b) the other plugins seem to work with it fine,
>
> so following the principle of least surprises, I would expect the
> surefire plugin to work with it too
>
> -- Vihung
>
> -----Original Message-----
> From: Wayne Fay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 08, 2007 7:57 PM
> To: Maven Users List
> Subject: Re: Tests fail (class not found) when running against
> non-standard local repository location
>
>
> I don't consider it to be a bug. Settings.xml is supposed to have
> values that apply to "all" projects, so by definition, relative paths
> should not be acceptable.
>
> Wayne
>
> On 8/8/07, Vihung Marathe <[EMAIL PROTECTED]>
> wrote:
> > The problem appears to be when the custom location is a relative
> path.
> >
> > As soon as I change the localRepository value in my settings.xml to
> an
> > absolute path - in any form* - it seems to work.
> >
> > Any ideas? Is this a bug - possibly with Surefire? All the other
> goals
> > work fine with a relative repository location.
> >
> > -- Vihung
> >
> > * I am on Windows, and all of the following values seem to work
> > - C:\workspace\myproject\repository
> > - \workspace\myproject\repository
> > - C:/workspace/myproject/repository
> > - /workspace/myproject/repository
> >
> > However, assuming I am running maven from C:\workspace\myproject,
> none
> > of the following values work
> > - .\repository
> > - ./repository
> > - repository
> >
> >
> > -----Original Message-----
> > From: Vihung Marathe
> > Sent: Wednesday, August 01, 2007 5:56 PM
> > To: 'Maven Users List'
> > Subject: RE: Tests fail (class not found) when running against
> > non-standard local repository location
> >
> >
> > No.
> >
> > Actually in the case that works, the command line is longer (because
> > the default repository location includes the "Documents and
> Settings"
> > directory on Windows).
> >
> > -- Vihung
> >
> > -----Original Message-----
> > From: Wayne Fay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 01, 2007 4:47 PM
> > To: Maven Users List
> > Subject: Re: Tests fail (class not found) when running against
> > non-standard local repository location
> >
> >
> > Off the top of my head, the only thing I could think would be if, by
> > redirecting the localRepo, you're running into max lengths of paths
> on
> > Windows, or maxing out the -classpath argument length.
> >
> > It is certainly an odd problem, and I've never seen it myself, nor
> > seen it reported on this list. In fact, I know many people are using
> > localRepo setting to utilize a different location very successfully.
> > So I'd expect the problem is specific to your environment somehow.
> >
> > Wayne
> > _________________________________________________________________
> >
> > This e-mail may contain confidential information and/or copyright
> material. This e-mail is intended for the use of the addressee only.
> Any unauthorised use may be unlawful.
> >
> > If you receive this e-mail by mistake please advise the sender
> immediately by using the reply facility in your e-mail software.
> >
> > The Friends Provident group of companies includes these Friends
> Provident plc subsidiary companies:
> >
> > Friends Provident Life and Pensions Limited. Registered number
> 4096141.
> > Friends Provident Life Assurance Limited. Registered number 782698.
> > Friends Provident Pensions Limited. Registered number 475201.
> > Friends Provident Marketing Limited. Registered number 5059179.
> >
> > Each of the above subsidiary companies is authorised and regulated
> by the Financial Services Authority.
> >
> > Friends Provident Management Services Limited. Registered number
> 983330
> >
> > The ultimate holding company is Friends Provident plc. Registered
> number 4113107.
> >
> > All are incorporated companies limited by shares and registered in
> England.
> > Registered and Head Office: Pixham End, Dorking, Surrey RH4 1QA.
> >
> > www.friendsprovident.com
> >
> > _________________________________________________________________
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to