maven-resolver icon indicating copy to clipboard operation
maven-resolver copied to clipboard

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

Open gnodet opened this issue 2 years ago • 6 comments

See https://github.com/apache/maven-parent/pull/82

gnodet avatar Jan 24 '22 17:01 gnodet

What has applied the automagic?

michael-o avatar Jan 24 '22 17:01 michael-o

@gnodet what IDE and what style you use?

cstamas avatar Jan 24 '22 19:01 cstamas

@gnodet what IDE and what style you use?

nvm, I see this is a plugin...

cstamas avatar Jan 24 '22 19:01 cstamas

@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.

gnodet avatar Jan 24 '22 19:01 gnodet

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.....

cstamas avatar Jan 28 '22 14:01 cstamas

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 avatar Jan 28 '22 14:01 gnodet

Parent POM already provides this

cstamas avatar Nov 10 '23 12:11 cstamas