This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 63711eb SLING-9444 Allow the specification of metadata for included
artifacts
new cc2653a Merge pull request #51 from bosschaert/SLING-9444
63711eb is described below
commit 63711ebf9548862a6c38ea5728dea31306d39c93
Author: David Bosschaert <[email protected]>
AuthorDate: Fri May 8 15:17:54 2020 +0100
SLING-9444 Allow the specification of metadata for included artifacts
---
.../apache/sling/feature/maven/mojos/IncludeArtifactMojo.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/src/main/java/org/apache/sling/feature/maven/mojos/IncludeArtifactMojo.java
b/src/main/java/org/apache/sling/feature/maven/mojos/IncludeArtifactMojo.java
index 22d2bfa..fffb748 100644
---
a/src/main/java/org/apache/sling/feature/maven/mojos/IncludeArtifactMojo.java
+++
b/src/main/java/org/apache/sling/feature/maven/mojos/IncludeArtifactMojo.java
@@ -120,6 +120,12 @@ public class IncludeArtifactMojo extends
AbstractIncludingFeatureMojo {
@Parameter
private String includeType;
+ /**
+ * Metadata for the included artifact.
+ */
+ @Parameter
+ private Map<String, String> metadata;
+
@Component
protected ArtifactInstaller installer;
@@ -153,6 +159,9 @@ public class IncludeArtifactMojo extends
AbstractIncludingFeatureMojo {
final Artifact art = new Artifact(new
ArtifactId(this.project.getGroupId(), this.project.getArtifactId(),
this.project.getVersion(), includeClassifier, includeType !=
null ? includeType : this.project.getArtifact().getType()));
+ if (metadata != null && metadata.size() > 0) {
+ art.getMetadata().putAll(metadata);
+ }
includeArtifact(found, includeArtifactExtension, art);
includeArtifact(ProjectHelper.getAssembledFeatures(this.project).get(key),
includeArtifactExtension,