You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by kd...@apache.org on 2019/02/13 20:06:58 UTC
[nifi-maven] 11/20: NIFI-3589 Add MANIFEST entry to allow
specifying that resources should be cloned during instance class loading
This is an automated email from the ASF dual-hosted git repository.
kdoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-maven.git
commit 76e0f54496c08fa0aaa2d15d45cba2f536b249dc
Author: Bryan Bende <bb...@apache.org>
AuthorDate: Mon Mar 13 11:35:45 2017 -0400
NIFI-3589 Add MANIFEST entry to allow specifying that resources should be cloned during instance class loading
Signed-off-by: Matt Gilman <ma...@gmail.com>
---
src/main/java/org/apache/nifi/NarMojo.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/main/java/org/apache/nifi/NarMojo.java b/src/main/java/org/apache/nifi/NarMojo.java
index 351c23d..809eff4 100644
--- a/src/main/java/org/apache/nifi/NarMojo.java
+++ b/src/main/java/org/apache/nifi/NarMojo.java
@@ -418,6 +418,14 @@ public class NarMojo extends AbstractMojo {
@Parameter(property = "buildRevision", defaultValue = "${buildRevision}", required = false)
protected String buildRevision;
+ /**
+ * Allows a NAR to specify if it's resources should be cloned when a component that depends on this NAR
+ * is performing class loader isolation.
+ */
+ @Parameter(property = "cloneDuringInstanceClassLoading", defaultValue = "false", required = false)
+ protected boolean cloneDuringInstanceClassLoading;
+
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
copyDependencies();
@@ -633,6 +641,8 @@ public class NarMojo extends AbstractMojo {
SimpleDateFormat dateFormat = new SimpleDateFormat(BUILD_TIMESTAMP_FORMAT);
archive.addManifestEntry("Build-Timestamp", dateFormat.format(new Date()));
+ archive.addManifestEntry("Clone-During-Instance-Class-Loading", String.valueOf(cloneDuringInstanceClassLoading));
+
archiver.createArchive(session, project, archive);
return narFile;
} catch (ArchiverException | MojoExecutionException | ManifestException | IOException | DependencyResolutionRequiredException e) {