Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lombok dependency provided scope #165

Merged
merged 1 commit into from
Sep 5, 2020
Merged

lombok dependency provided scope #165

merged 1 commit into from
Sep 5, 2020

Conversation

seregamorph
Copy link
Contributor

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

@@ -173,13 +173,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to parent pom (alternatively could be duplicated in all submodules)

@netwolfuk
Copy link
Member

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
Copy link
Contributor Author

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

@netwolfuk netwolfuk merged commit 478febf into tcplugins:master Sep 5, 2020
@netwolfuk netwolfuk added the available in alpha or beta release item is released in a "pre-release" version ready for testing. label Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available in alpha or beta release item is released in a "pre-release" version ready for testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants