remote-resources:aggregate

Full name:

org.apache.maven.plugins:maven-remote-resources-plugin:3.2.0:aggregate

Description:

Pull down resourceBundles containing remote resources and process the resources contained inside. When that is done, the resources are injected into the current (in-memory) Maven project, making them available to the process-resources phase.

Resources that end in ".vm" are treated as Velocity templates. For those, the ".vm" is stripped off for the final artifact name and it's fed through Velocity to have properties expanded, conditions processed, etc...

Resources that don't end in ".vm" are copied "as is".

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator goal.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: generate-resources.

Required Parameters

Name Type Since Description
<resourceBundles> List<String> - The resource bundles that will be retrieved and processed, expressed with groupId:artifactId:version[:type[:classifier]] format.

Optional Parameters

Name Type Since Description
<appendedResourcesDirectory> File - The directory containing extra information appended to the generated resources.
Default: ${basedir}/src/main/appended-resources
<attachToMain> boolean 1.5 Attaches the resources to the main build of the project as a resource directory.
Default: true
User Property: attachToMain
<attachToTest> boolean 1.5 Attaches the resources to the test build of the project as a resource directory.
Default: true
User Property: attachToTest
<encoding> String - The character encoding scheme to be applied when filtering resources.
Default: ${project.build.sourceEncoding}
User Property: encoding
<excludeArtifactIds> String 1.0 Comma separated list of Artifact names to exclude.
User Property: excludeArtifactIds
<excludeGroupIds> String 1.0 Comma separated list of GroupId Names to exclude.
User Property: excludeGroupIds
<excludeScope> String 1.0 Scope to exclude. An Empty string indicates no scopes (default).
User Property: excludeScope
<excludeTransitive> boolean 1.0 If we should exclude transitive dependencies
Default: false
User Property: excludeTransitive
<filterDelimiters> List<String> 1.1

In cases where a local resource overrides one from a remote resource bundle, that resource should be filtered if the resource set specifies it. In those cases, this parameter defines the list of delimiters for filterable expressions. These delimiters are specified in the form 'beginToken*endToken'. If no '*' is given, the delimiter is assumed to be the same for start and end.

So, the default filtering delimiters might be specified as:

<delimiters>
  <delimiter>${*}</delimiter>
  <delimiter>@</delimiter>
</delimiters>
Since the '@' delimiter is the same on both ends, we don't need to specify '@*@' (though we can).
<includeArtifactIds> String 1.0 Comma separated list of Artifact names to include.
User Property: includeArtifactIds
<includeGroupIds> String 1.0 Comma separated list of GroupIds to include.
User Property: includeGroupIds
<includeProjectProperties> boolean 1.2 Whether to include properties defined in the project when filtering resources.
Default: false
<includeScope> String 1.0 Scope to include. An Empty string indicates all scopes (default is "runtime").
Default: runtime
User Property: includeScope
<outputDirectory> File - The directory where processed resources will be placed for packaging.
Default: ${project.build.directory}/maven-shared-archive-resources
<outputTimestamp> String - Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
Default: ${project.build.outputTimestamp}
<properties> Map<String,Object> - Additional properties to be passed to Velocity. Several properties are automatically added:
  • project - the current MavenProject
  • projects - the list of dependency projects
  • projectsSortedByOrganization - the list of dependency projects sorted by organization
  • projectTimespan - the timespan of the current project (requires inceptionYear in pom)
  • locator - the ResourceManager that can be used to retrieve additional resources
See the javadoc for MavenProject for information about the properties on the MavenProject.
<resolveScopes> String[] 1.5 When resolving project dependencies, specify the scopes to include. The default is the same as "includeScope" if there are no exclude scopes set. Otherwise, it defaults to "test" to grab all the dependencies so the exclude filters can filter out what is not needed.
<skip> boolean 1.0-alpha-5 Skip remote-resource processing
Default: false
User Property: remoteresources.skip
<supplementalModelArtifacts> List<String> 1.1 List of artifacts that are added to the search path when looking for supplementalModels, expressed with groupId:artifactId:version[:type[:classifier]] format.
<supplementalModels> String[] 1.0-alpha-5 Supplemental model data. Useful when processing artifacts with incomplete POM metadata.

By default, this Mojo looks for supplemental model data in the file "${appendedResourcesDirectory}/supplemental-models.xml".
<useDefaultFilterDelimiters> boolean 1.1 No description.
Default: true
<velocityFilterInMemoryThreshold> int 1.6 Deprecated. When the result of velocity transformation fits in memory, it is compared with the actual contents on disk to eliminate unnecessary destination file overwrite. This improves build times since further build steps typically rely on the modification date.
Default: 5242880

Parameter Details

<appendedResourcesDirectory>

The directory containing extra information appended to the generated resources.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • Default: ${basedir}/src/main/appended-resources

<attachToMain>

Attaches the resources to the main build of the project as a resource directory.
  • Type: boolean
  • Since: 1.5
  • Required: report.plugin.goal.no
  • User Property: attachToMain
  • Default: true

<attachToTest>

Attaches the resources to the test build of the project as a resource directory.
  • Type: boolean
  • Since: 1.5
  • Required: report.plugin.goal.no
  • User Property: attachToTest
  • Default: true

<encoding>

The character encoding scheme to be applied when filtering resources.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

<excludeArtifactIds>

Comma separated list of Artifact names to exclude.
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: excludeArtifactIds

<excludeGroupIds>

Comma separated list of GroupId Names to exclude.
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: excludeGroupIds

<excludeScope>

Scope to exclude. An Empty string indicates no scopes (default).
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: excludeScope

<excludeTransitive>

If we should exclude transitive dependencies
  • Type: boolean
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: excludeTransitive
  • Default: false

<filterDelimiters>

In cases where a local resource overrides one from a remote resource bundle, that resource should be filtered if the resource set specifies it. In those cases, this parameter defines the list of delimiters for filterable expressions. These delimiters are specified in the form 'beginToken*endToken'. If no '*' is given, the delimiter is assumed to be the same for start and end.

So, the default filtering delimiters might be specified as:

<delimiters>
  <delimiter>${*}</delimiter>
  <delimiter>@</delimiter>
</delimiters>
Since the '@' delimiter is the same on both ends, we don't need to specify '@*@' (though we can).
  • Type: java.util.List<java.lang.String>
  • Since: 1.1
  • Required: report.plugin.goal.no

<includeArtifactIds>

Comma separated list of Artifact names to include.
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: includeArtifactIds

<includeGroupIds>

Comma separated list of GroupIds to include.
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: includeGroupIds

<includeProjectProperties>

Whether to include properties defined in the project when filtering resources.
  • Type: boolean
  • Since: 1.2
  • Required: report.plugin.goal.no
  • Default: false

<includeScope>

Scope to include. An Empty string indicates all scopes (default is "runtime").
  • Type: java.lang.String
  • Since: 1.0
  • Required: report.plugin.goal.no
  • User Property: includeScope
  • Default: runtime

<outputDirectory>

The directory where processed resources will be placed for packaging.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • Default: ${project.build.directory}/maven-shared-archive-resources

<outputTimestamp>

Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • Default: ${project.build.outputTimestamp}

<properties>

Additional properties to be passed to Velocity. Several properties are automatically added:
  • project - the current MavenProject
  • projects - the list of dependency projects
  • projectsSortedByOrganization - the list of dependency projects sorted by organization
  • projectTimespan - the timespan of the current project (requires inceptionYear in pom)
  • locator - the ResourceManager that can be used to retrieve additional resources
See the javadoc for MavenProject for information about the properties on the MavenProject.
  • Type: java.util.Map<java.lang.String, java.lang.Object>
  • Required: report.plugin.goal.no

<resolveScopes>

When resolving project dependencies, specify the scopes to include. The default is the same as "includeScope" if there are no exclude scopes set. Otherwise, it defaults to "test" to grab all the dependencies so the exclude filters can filter out what is not needed.
  • Type: java.lang.String[]
  • Since: 1.5
  • Required: report.plugin.goal.no

<resourceBundles>

The resource bundles that will be retrieved and processed, expressed with groupId:artifactId:version[:type[:classifier]] format.
  • Type: java.util.List<java.lang.String>
  • Required: report.plugin.goal.yes

<skip>

Skip remote-resource processing
  • Type: boolean
  • Since: 1.0-alpha-5
  • Required: report.plugin.goal.no
  • User Property: remoteresources.skip
  • Default: false

<supplementalModelArtifacts>

List of artifacts that are added to the search path when looking for supplementalModels, expressed with groupId:artifactId:version[:type[:classifier]] format.
  • Type: java.util.List<java.lang.String>
  • Since: 1.1
  • Required: report.plugin.goal.no

<supplementalModels>

Supplemental model data. Useful when processing artifacts with incomplete POM metadata.

By default, this Mojo looks for supplemental model data in the file "${appendedResourcesDirectory}/supplemental-models.xml".
  • Type: java.lang.String[]
  • Since: 1.0-alpha-5
  • Required: report.plugin.goal.no

<useDefaultFilterDelimiters>

No description.
  • Type: boolean
  • Since: 1.1
  • Required: report.plugin.goal.no
  • Default: true

<velocityFilterInMemoryThreshold>

Deprecated. not used anymore
When the result of velocity transformation fits in memory, it is compared with the actual contents on disk to eliminate unnecessary destination file overwrite. This improves build times since further build steps typically rely on the modification date.
  • Type: int
  • Since: 1.6
  • Required: report.plugin.goal.no
  • Default: 5242880