Wednesday, June 25, 2014

Maven formatter plugin now supports Java 8

Just release maven-formatter-plugin 1.4.0.

This new version uses Eclipse Luna formatter, which mean Java 8 / Lambdas support.

Here a usage example:

<plugin>
  <groupId>com.marvinformatics.formatter</groupId>
  <artifactId>formatter-maven-plugin</artifactId>
  <version>1.4.0</version>
  <executions>
    <execution>
      <goals>
        <goal>validate</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <excludes>
      <exclude>**/target/**</exclude>
    </excludes>
    <aggregator>true</aggregator>
    <lineEnding>LF</lineEnding>
  </configuration>
</plugin>


Go for it!

1 comment:

  1. great plugin, alas: it looks that unlike the original formatter plugin this clone (v1.4.0) isn't capable of loading a formatter configuration from the classpath?

    ReplyDelete