Skip to content

Latest commit

 

History

History
70 lines (63 loc) · 1.9 KB

README.md

File metadata and controls

70 lines (63 loc) · 1.9 KB

Simple Maven plugin aims to remove Byte Order Mark (BOM) from text files. Based upon this project.

Usage

Add to your's pom.xml a link to plugin's repository:

<pluginRepositories>
  <pluginRepository>
    <id>kishlaly</id>
    <url>http://maven.kishlaly.com</url>
  </pluginRepository>
</pluginRepositories>

now you can declare the plugin. Minimal configuration is:

<plugins>
  <plugin>
    <groupId>com.kishlaly.utils.maven</groupId>
    <artifactId>bom-remover</artifactId>
    <version>1.0</version>
    <configuration>
      <folder>${path.to.folder.with.bom.files}</folder>
    </configuration>
    <executions>
      <execution>
        <phase>validate</phase>
        <goals>
          <goal>work</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>

where folder points to folder to start search with, "." if not set. With such config plugin will find all files in specified folder (without subfolders).

Another configuration available:

<plugins>
  <plugin>
    <groupId>com.kishlaly.utils.maven</groupId>
    <artifactId>bom-remover</artifactId>
    <version>1.0</version>
    <configuration>
      <folder>${path.to.folder.with.bom.files}</folder>
      <masks>
        <mask>*.java</mask>
        <mask>*.txt</mask>
      </masks>
      <recursively>yes</recursively>
    </configuration>
    <executions>
      <execution>
        <phase>validate</phase>
        <goals>
          <goal>work</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>

with this config plugin will find all files based upon given masks in provided folder and it's subfolders.

Please pay attention to phase in which you'll plan to use that plugin. It is quite useless to update files after packaging, so if you want to assemble application with corrected files, use plugin in phases prior to package