Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get org.mangosdk.spi.ProviderFor dependency for writing a custom Lombok transformation?

Tags:

java

maven

lombok

I am writing a Lombok custom transformation, but I am stuck because Lombok handlers require using org.mangosdk.spi.ProviderFor annotation, and I can't find it in the Maven repositories. How are you supposed to get that dependency when making a custom Lombok transformation?

I tried looking at how that dependency is retrieved in https://github.com/rzwitserloot/lombok, but they just seem to have their own copy of the library in lib directory, which I think is a very inflexible way to manage your dependencies, so I wouldn't consider it for my own project.

So if I have a Maven project for a Lombok extension, how should I get that org.mangosdk.spi.ProviderFor class?

like image 505
gvlasov Avatar asked May 13 '15 14:05

gvlasov


2 Answers

Lombok uses Ant+Ivy and not Maven. Lombok does not require the usage of the ProviderFor annotation. All that annotation does is automatically generate the META-INF/services file, which is past of the standard java set of APIs. You can also maintain such a file by hand.

For more information about the Service Provider Interface, you can also have a look at the documentation of the SPI project.

There is a similar project that currently has better maven support.

NB. Since Google Code is going down soon, this project is in the process of being migrated to Github

Disclosure: I am a Lombok developer

like image 157
Roel Spilker Avatar answered Oct 12 '22 21:10

Roel Spilker


use the unofficial maven repository 'http://www.ebi.ac.uk/~maven/m2repo'

like image 23
Viktor Alenkov Avatar answered Oct 12 '22 22:10

Viktor Alenkov