format openapi/swagger generated java source using maven plugin

226 Views Asked by At

I've openapi plugin to autogenerate some java source code using mustache files as template.

I wish to format this code using google java style. I followed example at this link: https://shankulk.com/format-your-java-code-with-google-java-format-5bf4de8756f5

This works but it formats the entire source code at src/main/java and src/main/test

I wish to format only generated code which is in target/ I tried using path as highlighted but it still formats the entire source code including auto generated code in target/

is there other standard maven plugin that can be used for this purpose or how can i set this up?

enter image description here

0

There are 0 best solutions below