Added support for custom JSR-223 based formatters by tisoft · Pull Request #945 · diffplug/spotless

Added support for custom JSR-223 based formatters in Maven.

<jsr223> <!-- specify replacements using JSR223 scripting -->
  <name>Greetings to Mars</name>
  <engine>nashorn</engine>
  <script>source.replace('World','Mars');</script>
</jsr223>

Allows an end user to create arbitrary custom formatters inside the pom. Javascript is supported by the "nashorn" engine provided by the JDK. Other engines can be used, if they are in the classpath.