remote-resources:process

Full name:

org.apache.maven.plugins:maven-remote-resources-plugin:1.2.1:process

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.
  • 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 - The resource bundles that will be retrieved and processed.

Optional Parameters

Name Type Since Description
appendedResourcesDirectory File - The directory containing extra information appended to the generated resources.
attached boolean 1.0-beta-1 Attaches the resource to the project as a resource directory
Default value is: true.
encoding String - The character encoding scheme to be applied when filtering resources.
Default value is: ${project.build.sourceEncoding}.
excludeArtifactIds String 1.0 Comma separated list of Artifact names too exclude.
excludeGroupIds String 1.0 Comma separated list of GroupId Names to exclude.
excludeScope String 1.0 Scope to exclude. An Empty string indicates no scopes (default).
excludeTransitive boolean 1.0 If we should exclude transitive dependencies
Default value is: false.
filterDelimiters List 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.
includeGroupIds String 1.0 Comma separated list of GroupIds to include.
includeProjectProperties boolean 1.2 Whether to include properties defined in the project when filtering resources.
Default value is: false.
includeScope String 1.0 Scope to include. An Empty string indicates all scopes (default).
Default value is: runtime.
outputDirectory File - The directory where processed resources will be placed for packaging.
properties Map - Additional properties to be passed to velocity.

Several properties are automatically added:
project - the current MavenProject
projects - the list of dependency projects
projectTimespan - the timespan of the current project (requires inceptionYear in pom)

See the javadoc for MavenProject for information about the properties on the MavenProject.
runOnlyAtExecutionRoot boolean 1.1 If true, only generate resources in the directory of the root project in a multimodule build. Dependencies from all modules will be aggregated before resource-generation takes place.
Default value is: false.
skip boolean 1.0-alpha-5 Skip remote-resource processing
Default value is: false.
supplementalModelArtifacts List 1.1 List of artifacts that are added to the search path when looking for supplementalModels
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 value is: true.

Parameter Details

appendedResourcesDirectory:

The directory containing extra information appended to the generated resources.
  • Type: java.io.File
  • Required: No
  • Expression: ${basedir}/src/main/appended-resources

attached:

Attaches the resource to the project as a resource directory
  • Type: boolean
  • Since: 1.0-beta-1
  • Required: No
  • Default: true

encoding:

The character encoding scheme to be applied when filtering resources.
  • Type: java.lang.String
  • Required: No
  • Expression: ${encoding}
  • Default: ${project.build.sourceEncoding}

excludeArtifactIds:

Comma separated list of Artifact names too exclude.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${excludeArtifactIds}

excludeGroupIds:

Comma separated list of GroupId Names to exclude.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${excludeGroupIds}

excludeScope:

Scope to exclude. An Empty string indicates no scopes (default).
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${excludeScope}

excludeTransitive:

If we should exclude transitive dependencies
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${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
  • Since: 1.1
  • Required: No

includeArtifactIds:

Comma separated list of Artifact names to include.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${includeArtifactIds}

includeGroupIds:

Comma separated list of GroupIds to include.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${includeGroupIds}

includeProjectProperties:

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

includeScope:

Scope to include. An Empty string indicates all scopes (default).
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Expression: ${includeScope}
  • Default: runtime

outputDirectory:

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

properties:

Additional properties to be passed to velocity.

Several properties are automatically added:
project - the current MavenProject
projects - the list of dependency projects
projectTimespan - the timespan of the current project (requires inceptionYear in pom)

See the javadoc for MavenProject for information about the properties on the MavenProject.
  • Type: java.util.Map
  • Required: No

resourceBundles:

The resource bundles that will be retrieved and processed.
  • Type: java.util.List
  • Required: Yes

runOnlyAtExecutionRoot:

If true, only generate resources in the directory of the root project in a multimodule build. Dependencies from all modules will be aggregated before resource-generation takes place.
  • Type: boolean
  • Since: 1.1
  • Required: No
  • Default: false

skip:

Skip remote-resource processing
  • Type: boolean
  • Since: 1.0-alpha-5
  • Required: No
  • Expression: ${remoteresources.skip}
  • Default: false

supplementalModelArtifacts:

List of artifacts that are added to the search path when looking for supplementalModels
  • Type: java.util.List
  • Since: 1.1
  • Required: 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: No

useDefaultFilterDelimiters:

(no description)
  • Type: boolean
  • Since: 1.1
  • Required: No
  • Default: true