You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hari shankar <ha...@gmail.com> on 2011/01/25 09:19:50 UTC

Suggest a good workaround for MNG-4809

I have hit this bug

http://jira.codehaus.org/browse/MNG-4809

Quoting it,

We cannot specify variables to define a system path. Maven complains about
absolute path. This is a pain which forces us to either hard code the path
or use -DlocalRepository flag.

Is there a way to use settings from settings.xml to refer to this property?

<systemPath>${settings.localRepository}/my.jar</systemPath>
Am using,

Apache Maven 3.0-beta-2 (r983206; 2010-08-07 16:30:51+0530)

Can anyone please suggest a good workaround other than specifying a hard
coded path or passing -DlocalRepository flag, if one exists.

Thanks much,
Hari

Re: Suggest a good workaround for MNG-4809

Posted by Hari shankar <ha...@gmail.com>.
Thanks guys. That's really a neat solution.

To give the real context, the problem is we do it for one of google
appengine (test) jar that's not pushed to repository by them for some
reasons. We use a maven appengine plugin that unpacks automatically the
appengine SDK to local repository and that particular jar gets extracted to
some fixed location in local repo and it's been resolved via system scope
path.

We don't have a repo that's been set up, but will see to set one up, however
whenever new version comes up, i need to manually push that particular jar
to repo. Will see whether that also can be automated. Meanwhile if you have
any other points, pls share.

Hari



On Tue, Jan 25, 2011 at 10:43 PM, Wayne Fay <wa...@gmail.com> wrote:

> >> Can anyone please suggest a good workaround other than specifying a hard
> >> coded path or passing -DlocalRepository flag, if one exists.
>
> > The solution is then to get a repository manager and upload the "missing"
> > artifact to it (making it available to all your developers). Then you
> just
> > declare your dependency the normal Maven way.
>
> I agree with Anders. IMO system scope is a (buggy) hack and should not
> be used except in very few circumstances, and this is most likely not
> one of them.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Suggest a good workaround for MNG-4809

Posted by Wayne Fay <wa...@gmail.com>.
>> Can anyone please suggest a good workaround other than specifying a hard
>> coded path or passing -DlocalRepository flag, if one exists.

> The solution is then to get a repository manager and upload the "missing"
> artifact to it (making it available to all your developers). Then you just
> declare your dependency the normal Maven way.

I agree with Anders. IMO system scope is a (buggy) hack and should not
be used except in very few circumstances, and this is most likely not
one of them.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Suggest a good workaround for MNG-4809

Posted by Anders Hammar <an...@hammar.net>.
I'm guessing that there is some jar missing in remote (Internet)
repositories, which you're adding to your local repo to solve this. And then
using system scope for your dependency. Right?
The solution is then to get a repository manager and upload the "missing"
artifact to it (making it available to all your developers). Then you just
declare your dependency the normal Maven way.

/Anders

On Tue, Jan 25, 2011 at 09:19, Hari shankar <ha...@gmail.com> wrote:

> I have hit this bug
>
> http://jira.codehaus.org/browse/MNG-4809
>
> Quoting it,
>
> We cannot specify variables to define a system path. Maven complains about
> absolute path. This is a pain which forces us to either hard code the path
> or use -DlocalRepository flag.
>
> Is there a way to use settings from settings.xml to refer to this property?
>
> <systemPath>${settings.localRepository}/my.jar</systemPath>
> Am using,
>
> Apache Maven 3.0-beta-2 (r983206; 2010-08-07 16:30:51+0530)
>
> Can anyone please suggest a good workaround other than specifying a hard
> coded path or passing -DlocalRepository flag, if one exists.
>
> Thanks much,
> Hari
>