You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sajith Kariyawasam <sa...@gmail.com> on 2013/08/06 21:22:56 UTC

Re: [Maven 2.2.1] localRepository to be defined as a relative path?

I was able to tackle the issue finally, please find my observations..

-Dmaven.repo.local="path" option is supported in both Maven 2.2.1  and
3.0.x , but in a different way ..

In maven 2.2.1 if you give the value as
-Dmaven.repo.local=../../../repository,
it can't find the mentioned path, so it assumes the repo at the root
location (in Windows its C:\ and in Linux its "/" )

But it was not the case with 3.x, where if you have
-Dmaven.repo.local=../../../repository,
it successfully able to find the repository available in that location.

So in order to get that working with 2.2.1, I had to modify it as follows..
                             -Dmaven.repo.local=${basedir}../../../repository
(or if you give the full path there, it works..but in my case the full path
is dynamic, and depends on the project location)

Thanks
Sajith





On Wed, Jul 31, 2013 at 11:53 AM, Sajith Kariyawasam <sa...@gmail.com>wrote:

>
> Hi all,
>
> Is Maven 2.2.1 support localRepository to be defined as a relative path?
>
> say for eg, <localRepository>repository</localRepository>, so that for
> each project I build, there will be a separate repository being created.. ?
>
> Also, is -Dmaven.repo.local="path" option supported?
>
> I was able to get it working in Maven 3, but couldn't get it in Maven 2.
>
> Any help please?
>
> Thanks
> Sajith
>
> --
> Best Regards
> Sajith
>



-- 
Best Regards
Sajith