• 0.17

Usage

It's easy:

<build>
  <plugins>
    <plugin>
      <groupId>com.qulice</groupId>
      <artifactId>qulice-maven-plugin</artifactId>
      <version>0.17</version>
      <configuration>
        <license>file:${basedir}/LICENSE.txt</license>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

Pay attention to the license configuration parameter. It is mandatory and has to be provided, or else the default value will be used (./LICENSE.txt). You can refer to a file with file: prefix, as in the example above. Or you can refer to a resource from classpath (very useful when you want to keep your license in a dedicated child module.

License text file should contain just text. Qulice converts this file to proper format and compares it with your source code file headers. For example, this is your LICENSE.txt:

Copyright (c) 2011-2014, Qulice.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met: no conditions.

This is what your Java sources should start from:

/**
 * Copyright (c) 2011-2014, Qulice.com
 * All rights reserved.
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met: no conditions.
 */

Multi-Module Setup

In a multi-module setup we recommend you to move all supplementary resource (assemblies, XML configurations, etc) to a separate "tool kit" sub-module. This module is the best place for LICENSE.txt file:

<build>
  <plugins>
    <plugin>
      <groupId>com.qulice</groupId>
      <artifactId>qulice-maven-plugin</artifactId>
      <version>0.17</version>
      <configuration>
        <license>LICENSE.txt</license>
      </configuration>
      <dependencies>
        <dependency>
          <!-- this is your tool kit module -->
          <groupId>com.example</groupId>
          <artifactId>foo</artifactId>
          <version>0.1.2</version>
        </dependency>
      </dependencies>
      <executions>
        <execution>
          <goals>
            <goal>check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

Cutting Edge Version

If you want to use current version of the product, you can do it with this configuration in your pom.xml:

<pluginRepositories>
  <pluginRepository>
    <id>oss.sonatype.org</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  </pluginRepository>
</pluginRepositories>
<build>
  <plugins>
    <plugin>
      <groupId>com.qulice</groupId>
      <artifactId>qulice-maven-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      [...]
    </plugin>
  </plugins>
</build>