Fork me on GitHub
What is the difference between this plugin (the Codehaus license-maven-plugin) and the maven-license-plugin hosted at Google Code?

The Codehaus plugin and the Google Code plugin were developed separately but with similar goals. The two plugins have several overlapping features including verifying and updating license information in source files. The Codehaus plugin also provides the ability to download the licenses of third party dependencies and create and XML report listing each project dependency and its license. If you are not sure which one to use you should try both to see which one best fits your needs.

[top]


What is the difference between this plugin (the Codehaus license-maven-plugin) and the maven-license-plugin hosted at Code Lutin?

The Code Lutin maven-license-plugin is an older version of the Codehaus license-maven-plugin. The source code of the Code Lutin plugin was donated to Codehaus and merged with some existing license plugin code. The original creator joined then the Codehaus team to continue the project development.

[top]


Why sql style should not be used with mysql sql files ?

Mysql does not accept --- as comment (which is used to mark license header for normal sql files). You should use the mysql header style instead, with with configuration:

              <extraExtensions>
                <sql>mysql</sql>
              </extraExtensions>
             
Bug detail.

[top]


How to deal with hardcoded encoding ISO-8859-1 for properties files when updating file headers?

Even if in modern JDK (since 1.6), there is a support for UTF-8 encoding on properties files, encoding ISO-8859-1 is still used on thoses files.

To keep this encoding for thoses files, you need then to execute twice the update-file-header plugin like this:
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>update-file-header-UTF-8</id>
            <goals><goal>update-file-header</goal></goals>
            <configuration>
              <excludes>
                <exclude>**/*.properties</exclude>
              </excludes>
              <encoding>UTF-8</encoding>
            </configuration>
          </execution>
          <execution>
            <id>update-file-header-ISO-8859-1</id>
            <goals><goal>update-file-header</goal></goals>
            <configuration>
              <includes>
                <include>**/*.properties</include>
              </includes>
              <encoding>ISO-8859-1</encoding>
            </configuration>
          </execution>
        </executions>
      </plugin>
   

[top]