This project a set of resources to help you building Java resources compliant with Apache rules.
To generate in your jar:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-remote-resources-plugin</artifactId> <version>1.3</version> <executions> <execution> <goals> <goal>process</goal> </goals> <configuration> <resourceBundles> <!-- Will generate META-INF/DEPENDENCIES META-INF/LICENSE META-INF/NOTICE --> <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle> <!-- Will generate META-INF/DEPENDENCIES.txt META-INF/LICENSE META-INF/NOTICE.txt --> <resourceBundle>org.apache.apache.resources:apache-jar-txt-resource-bundle:1.5-SNAPSHOT</resourceBundle> <!-- Will generate META-INF/DISCLAIMER --> <resourceBundle>org.apache.apache.resources:apache-incubator-disclaimer-resource-bundle:1.2-SNAPSHOT</resourceBundle> </resourceBundles> </configuration> </execution> </executions> </plugin>
Create a source-release artifact that contains the fully buildable project directory source structure. This is the artifact which is the official subject of any release vote.
<plugin> <artifactId>maven-assembly-plugin</artifactId> <dependencies> <dependency> <groupId>org.apache.apache.resources</groupId> <artifactId>apache-source-release-assembly-descriptor</artifactId> <version>1.0.3</version> </dependency> </dependencies> <executions> <execution> <id>source-release-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <!-- use this flag to generate source release assembly from the top of a multi modules maven project. <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> --> <descriptorRefs> <descriptorRef>source-release</descriptorRef> </descriptorRefs> <tarLongFileFormat>gnu</tarLongFileFormat> </configuration> </execution> </executions> </plugin>