-
Notifications
You must be signed in to change notification settings - Fork 30
Formatting
Kostiantyn Shchepanovskyi edited this page Sep 27, 2015
·
2 revisions
Protostuff does not support configurable formatting for generated code. Instead, this responsibility is delegated to external tools. For example, you can use formatter-maven-plugin.
Sample configuration:
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>0.5.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>format</goal>
</goals>
<configuration>
<directories>
<directory>${project.build.directory}/generated-sources/proto</directory>
</directories>
</configuration>
</execution>
</executions>
</plugin>
Please note that formatter-maven-plugin
configuration should be declared after protostuff-maven-plugin
.