You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2017/03/13 18:49:26 UTC

nifi-maven git commit: NIFI-3589 Add MANIFEST entry to allow specifying that resources should be cloned during instance class loading

Repository: nifi-maven
Updated Branches:
  refs/heads/master 33e1ae035 -> 76e0f5449


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>


Project: http://git-wip-us.apache.org/repos/asf/nifi-maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-maven/commit/76e0f544
Tree: http://git-wip-us.apache.org/repos/asf/nifi-maven/tree/76e0f544
Diff: http://git-wip-us.apache.org/repos/asf/nifi-maven/diff/76e0f544

Branch: refs/heads/master
Commit: 76e0f54496c08fa0aaa2d15d45cba2f536b249dc
Parents: 33e1ae0
Author: Bryan Bende <bb...@apache.org>
Authored: Mon Mar 13 11:35:45 2017 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Mar 13 14:18:38 2017 -0400

----------------------------------------------------------------------
 src/main/java/org/apache/nifi/NarMojo.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-maven/blob/76e0f544/src/main/java/org/apache/nifi/NarMojo.java
----------------------------------------------------------------------
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) {