Apache Resource Bundles

Maven project provides a set of resources to help you build Java resources compliant with Apache rules.

If you find bugs in the resource bundles please report them in JIRA.

JAR Resource Bundle and Incubator Disclaimer Resource Bundle

To generate following content in your jar:

  • META-INF/DEPENDENCIES
  • META-INF/LICENSE
  • META-INF/NOTICE
  • META-INF/DISCLAIMER
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.4</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.resources:apache-jar-resource-bundle:1.5-SNAPSHOT</resourceBundle>
                <!-- Will generate META-INF/DEPENDENCIES.txt META-INF/LICENSE.txt 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>

Source Release Assembly Descriptor

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.6</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>
                <!--
                  There are 3 descriptors available, choose one of them:
                  * source-release (zip only, this one is used in the ASF parent POM) 
                  * source-release-zip-tar (both zip and tar) 
                  * source-release-tar (tar only) 
                -->
                <descriptorRef>source-release</descriptorRef>
              </descriptorRefs>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
          </execution>
        </executions>
      </plugin>