Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple formats in Maven plugin #242

Merged
merged 2 commits into from
May 3, 2018

Commits on May 2, 2018

  1. Support multiple formats in Maven plugin

    Format is a configuration element that makes it possible to apply
    generic formatting steps (EndWithNewline, LicenseHeader, etc.) to
    a set of files defined by custom includes and excludes. Example of
    format configuration:
    
    ```
    <configuration>
      <format>
        <includes>
          <include>src/**/txt/**/*.txt</include>
        </includes>
        <excludes>
          <exclude>src/**/txt/**/*Wrong.txt</exclude>
        </excludes>
        <endWithNewline/>
        <trimTrailingWhitespace/>
        <licenseHeader>
          <content>// License Text</content>
          <delimiter>start</delimiter>
        </licenseHeader>
      </format>
    </configuration>
    ```
    
    It is currently possible to only define a single `<format>` element in
    plugin configuration.
    
    This commit makes it possible to define multiple formats. Format
    configuration structure remains the same but all formats should be
    enclosed in `<formats>...</formats>`. Example:
    
    ```
    <configuration>
      <formats>
        <format>...format 1 includes, excludes and steps</format>
        <format>...format 2 includes, excludes and steps</format>
        <format>...format 3 includes, excludes and steps</format>
      </formats>
    </configuration>
    ```
    lutovich committed May 2, 2018
    Configuration menu
    Copy the full SHA
    d15cfce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b70d47 View commit details
    Browse the repository at this point in the history