You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Fallows <jo...@gmail.com> on 2005/06/18 02:01:36 UTC
Re: [m2] Project relative dependencies
Brett,
Thanks for the pointers, see below.
On 5/29/05, Brett Porter <br...@gmail.com> wrote:
> On 5/28/05, John Fallows <jo...@gmail.com> wrote:
> > Perhaps we could also create a custom wagon implementation, similar to
> > the FileWagon, but resolve the dependencies from a project-relative
> > location?
>
> This is the recommended way. However the requests you will get will be
> in the repository layout, so you may need to map those paths. Wagon is
> not aware of any Maven specifics.
>
> > How does one register such a custom wagon implementation with Maven2?
>
> For now - drop it into the lib directory.
I have created a custom wagon implementation that seems to meet our
current repository needs. It uses a custom protocol in the syntax,
eg. "custom://...", and the wagon uses "custom" as the role hint in
the plexus component metadata.
It can successfully deploy using the "custom" protocol, which is great!
I was having difficulty in getting m2-a2 to recognize additional
repository entries other than the default "central" one. I was also
having difficulty overriding the "central" repository definition. Are
these known issues targeted for m2-a3?
So, as a workaround, I have been using a mirror of central in
settings.xml instead.
When I change the central repository mirror url to "custom://..." for
dependency retrieval, I get an error: "custom" unrecognized protocol
during dependency artifact resolution.
This appears to be happening because the lightweight http wagon is
still used for downloads, and it is trying to create a URL object with
protocol "custom". Of course, it fails because Java has no
URLStreamHandler for the "custom" protocol.
So, is it a bug that the "custom" wagon is not being used for
dependency retrieval, or is some additional step required beyond
dropping the "custom" wagon jar into the lib directory?
Perhaps the http wagon is being used because the central repository
url is http protocol, even though the mirror is "custom" protocol?
Kind Regards,
John Fallows.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Project relative dependencies
Posted by Brett Porter <br...@gmail.com>.
> On 5/29/05, Brett Porter <br...@gmail.com> wrote:
> > On 5/28/05, John Fallows <jo...@gmail.com> wrote:
>
> I was having difficulty in getting m2-a2 to recognize additional
> repository entries other than the default "central" one. I was also
> having difficulty overriding the "central" repository definition. Are
> these known issues targeted for m2-a3?
Recognising additional ones from the POM should work just fine - but
it may be related to the other issue you've listed, where overriding
doesn't work. That is in JIRA - if you could post additional details
(what settings you added to the POM) we can look into that as well.
> When I change the central repository mirror url to "custom://..." for
> dependency retrieval, I get an error: "custom" unrecognized protocol
> during dependency artifact resolution.
Ah, that's also a bug then. I can fix that relatively easily. I'll
drop it into JIRA first though.
Thanks,
Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org