#359 Renaming license.txt to LICENSE.txt, include LICENSE.txt in all distributed jars, retain original freemarker LICENSE.txt and NOTICE.txt in META-INF/freemarker

This commit is contained in:
Andreas Gudian 2014-11-26 21:03:48 +01:00
parent 38e8d5a40c
commit 5c323458fc
6 changed files with 95 additions and 15 deletions

View File

@ -111,6 +111,7 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions> <executions>
<execution> <execution>
@ -129,6 +130,23 @@
</resources> </resources>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>copy-mapstruct-license</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>${basedir}/..</directory>
<filtering>false</filtering>
<include>LICENSE.txt</include>
</resource>
</resources>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -102,6 +102,7 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions> <executions>
<execution> <execution>
@ -120,6 +121,23 @@
</resources> </resources>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>copy-mapstruct-license</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>${basedir}/..</directory>
<filtering>false</filtering>
<include>LICENSE.txt</include>
</resource>
</resources>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -36,13 +36,6 @@
<include>org.mapstruct:mapstruct-processor</include> <include>org.mapstruct:mapstruct-processor</include>
</includes> </includes>
</dependencySet> </dependencySet>
<dependencySet>
<outputDirectory>lib/dependencies</outputDirectory>
<includes>
<include>org.freemarker:freemarker</include>
</includes>
</dependencySet>
</dependencySets> </dependencySets>
<files> <files>
@ -55,7 +48,7 @@
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>
</file> </file>
<file> <file>
<source>../license.txt</source> <source>../LICENSE.txt</source>
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>
</file> </file>
<file> <file>
@ -75,7 +68,7 @@
<includes> <includes>
<include>../CONTRIBUTING.md</include> <include>../CONTRIBUTING.md</include>
<include>../copyright.txt</include> <include>../copyright.txt</include>
<include>../license.txt</include> <include>../LICENSE.txt</include>
<include>../pom.xml</include> <include>../pom.xml</include>
<include>../readme.md</include> <include>../readme.md</include>
<include>../etc/license.txt</include> <include>../etc/license.txt</include>

View File

@ -463,7 +463,7 @@
<exclude>**/build-config/checkstyle.xml</exclude> <exclude>**/build-config/checkstyle.xml</exclude>
<exclude>**/build-config/import-control.xml</exclude> <exclude>**/build-config/import-control.xml</exclude>
<exclude>copyright.txt</exclude> <exclude>copyright.txt</exclude>
<exclude>**/license.txt</exclude> <exclude>**/LICENSE.txt</exclude>
<exclude>**/mapstruct.xml</exclude> <exclude>**/mapstruct.xml</exclude>
<exclude>**/toolchains-*.xml</exclude> <exclude>**/toolchains-*.xml</exclude>
<exclude>**/eclipse-formatter-config.xml</exclude> <exclude>**/eclipse-formatter-config.xml</exclude>
@ -471,6 +471,8 @@
<exclude>readme.md</exclude> <exclude>readme.md</exclude>
<exclude>CONTRIBUTING.md</exclude> <exclude>CONTRIBUTING.md</exclude>
<exclude>.gitattributes</exclude> <exclude>.gitattributes</exclude>
<exclude>.gitignore</exclude>
<exclude>.factorypath</exclude>
</excludes> </excludes>
</configuration> </configuration>
<executions> <executions>

View File

@ -99,6 +99,52 @@
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-freemarker-license</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<outputDirectory>${project.build.directory}/classes/META-INF/freemarker</outputDirectory>
<includes>META-INF/LICENSE.txt,META-INF/NOTICE.txt</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-mapstruct-license</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>${basedir}/..</directory>
<filtering>false</filtering>
<include>LICENSE.txt</include>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
@ -111,11 +157,14 @@
</goals> </goals>
<configuration> <configuration>
<minimizeJar>true</minimizeJar> <minimizeJar>true</minimizeJar>
<artifactSet> <filters>
<includes> <filter>
<include>org.freemarker:freemarker</include> <artifact>org.freemarker:freemarker</artifact>
</includes> <excludes>
</artifactSet> <exclude>META-INF/*.*</exclude>
</excludes>
</filter>
</filters>
<relocations> <relocations>
<relocation> <relocation>
<pattern>freemarker</pattern> <pattern>freemarker</pattern>