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

Automatically format and sort imports according to the new maven coding style #147

Closed
wants to merge 3 commits into from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Jan 24, 2022

@michael-o
Copy link
Member

What has applied the automagic?

@cstamas
Copy link
Member

cstamas commented Jan 24, 2022

@gnodet what IDE and what style you use?

@cstamas
Copy link
Member

cstamas commented Jan 24, 2022

@gnodet what IDE and what style you use?

nvm, I see this is a plugin...

@gnodet
Copy link
Contributor Author

gnodet commented Jan 24, 2022

@gnodet what IDE and what style you use?

nvm, I see this is a plugin...

The point is that the code is reformatted and the imports automatically organized. It saves a bit of time ... The two plugins are quite fast, especially as they do not process the files if they haven't been changed.
The checkstyle / code formatter have been somewhat aligned to maven codestyle.
Ideally, the configuration files would be shared between all maven repos. I already reused those from https://github.com/apache/maven-build-cache-extension.

@cstamas
Copy link
Member

cstamas commented Jan 28, 2022

I like it, but could we somehow share this setup (at least the huge config)? The amount of added LOC is not trivial, and have it copy-pasted over all reposes seems like a nightmare.....

@gnodet
Copy link
Contributor Author

gnodet commented Jan 28, 2022

I like it, but could we somehow share this setup (at least the huge config)? The amount of added LOC is not trivial, and have it copy-pasted over all reposes seems like a nightmare.....

Agreed. I suppose the best location would be https://github.com/apache/maven-shared-resources/tree/master/src/main/resources/config ?

@gnodet gnodet marked this pull request as draft February 14, 2022 07:52
@gnodet gnodet force-pushed the auto-format branch 3 times, most recently from dd1ba7f to 2454bc7 Compare October 12, 2022 15:47
@gnodet gnodet changed the title Auto formatting Automatically format and sort imports according to the maven coding style Oct 12, 2022
@gnodet gnodet force-pushed the auto-format branch 2 times, most recently from d4a0ce5 to a564f89 Compare October 14, 2022 06:01
@gnodet gnodet changed the title Automatically format and sort imports according to the maven coding style Automatically format and sort imports according to the new maven coding style Oct 22, 2022
@cstamas
Copy link
Member

cstamas commented Nov 10, 2023

Parent POM already provides this

@cstamas cstamas closed this Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants