Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Guide to writing an aether provider

Bk Lau wrote:

Is there any guide/pointers on how to write a custom aether provider and
how to enable it to be picked and located?
Basically, i have a legacy artifact repo that I want to wrap using Aether.

What exactly is a "legacy artifact repo"? A Maven repository using the legacy layout? If so, you want to implement a RepositoryLayoutFactory [0]. There's no special guide other than the open source of the existing impl for the Maven2 default layout which serves as inspiration.

The specifics of how to ensure your new impls gets loaded depend on the way you boot Aether. E.g. if using the Sisu, the @Named annotation would be sufficient, if using the DefaultServiceLocator, a call to its addService(RepositoryLayout.class, YourImpl.class) would do.


Benjamin


[0] http://download.eclipse.org/aether/aether-core/0.9.0.M3/apidocs/org/eclipse/aether/spi/connector/layout/RepositoryLayoutFactory.html


Back to the top