Apache Resource Bundles
程序员文章站
2022-03-11 09:39:22
...
Apache Maven Site
Apache/ Maven/ Apache Resource Bundles [Edit]
| Last Published: 2020-04-22
| Get Sources
Download
Welcome
License
About Maven
What is Maven?
Features
Download
Use
Release Notes
Documentation
Maven Plugins
Index (category)
User Centre
Plugin Developer Centre
Maven Central Repository
Maven Developer Centre
Books and Resources
Security
Community
Community Overview
Project Roles
How to Contribute
Getting Help
Issue Management
Getting Maven Source
The Maven Team
Project Documentation
Project Information
Maven Projects
Archetype
Artifact Resolver
Doxia
JXR
Maven
Parent POMs
Plugins
Plugin Testing
Plugin Tools
Resource Bundles
SCM
Shared Components
Skins
Surefire
Wagon
ASF
How Apache Works
Foundation
Sponsoring Apache
Thanks
Follow ASFMavenProject
Built by Maven
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>
© 2002–2020 The Apache Software Foundation