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

Fix "Duplicate class file" problems caused by delombok generated sources when releasing #286

Closed
sleberknight opened this issue Feb 4, 2024 · 0 comments · Fixed by #287
Closed
Assignees
Labels
enhancement A request for change or improvement to an existing feature
Milestone

Comments

@sleberknight
Copy link
Member

When we release, we first delombok the code containing Lombok annotations, so that we get javadoc comments on the elements generated by Lombok, such as getters and setters.

However, the delomboked code remains in target/generated-sources/delombok when the build completes. As a result, IDEs see these as duplicate source files because the sources with Lombok annotations are in src/main/java and the delomboked sources are in target/generated-sources/delombok. For example, for a class com.acme.model.User residing in src/main/java with Lombok annotations, the delomboked com.acme.model.User source will reside in target/generated-sources/delombok. These are seen by any IDE as duplicate source files.

This issue adds a step in the release profile to delete the entire target/generated-sources/delombok directory once javadocs have been generated.

@sleberknight sleberknight added the enhancement A request for change or improvement to an existing feature label Feb 4, 2024
@sleberknight sleberknight added this to the 3.0.9 milestone Feb 4, 2024
@sleberknight sleberknight self-assigned this Feb 4, 2024
sleberknight added a commit that referenced this issue Feb 4, 2024
Use the maven-antrun-plugin to delete the delomboked source
code which resides in target/generated-sources/delombok.

Closes #286
sleberknight added a commit that referenced this issue Feb 4, 2024
Use the maven-antrun-plugin to delete the delomboked source
code which resides in target/generated-sources/delombok.

Closes #286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for change or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant