Quick maven tip for you. If you want to generate a META-INF/LICNSE.txt and META-INF/DEPENDENCIES.txt for your jars (very useful for libraries so users can quickly build an understanding of any licensing implications), here's how.

Create a licensing bundle, a bit like this one. The magic happens in src/main/resources/META-INFDEPENDENCIES.txt.vm; we explore the transitive dependencies of the project, and for each one, print out the project name and it's license.

You can then use the licensing bundle in your parent pom, with a snippet a bit like this:

         <plugin>
            <artifactId>maven-remote-resources-plugin</artifactId>
            <version>1.1</version>
            <executions>
               <execution>
                  <id>attach-license</id>
                  <goals>
                     <goal>process</goal>
                  </goals>
                  <inherited>true</inherited>
                  <configuration>
                     <resourceBundles>
                        <resourceBundle>org.infinispan:infinispan-license:1</resourceBundle>
                     </resourceBundles>
                  </configuration>
               </execution>
            </executions>
         </plugin>

Back to top