tcplugins / tcWebHooks

WebHooks plugin for Teamcity. Supports many build states and payload formats.
https://netwolfuk.wordpress.com/category/teamcity/tcplugins/tcwebhooks/
155 stars 30 forks source link

lombok dependency provided scope #165

Closed seregamorph closed 4 years ago

seregamorph commented 4 years ago

Fix lombok dependency scope - it should have provided scope (not compile). It reduces the final build size significantly.

netwolfuk commented 4 years ago

Hi @seregamorph. Thanks for this PR. I'll take a look when I'm back from vacation later in the week.

I need to check this will work all the way back to TeamCity 9.

Also, this SO comment indicates I might need to pass an extra argument to maven.

To clarify further: Lombok is not just a library, it is a processor that modifies the code when compilation takes place. So you need to execute it when compiling, if you switch it to provided scope this will not happen by default (you can force maven to run the lombok processor adding -Dexec.classpathScope="compile"to the command line.) 

https://stackoverflow.com/a/29385971

seregamorph commented 4 years ago

You can check, no additional parameters required, just execute mvn clean install and it will apply lombok compilation processors. Also most rated comment in this thread gives the same advice: use provided scope: https://stackoverflow.com/a/38454162/3468905