nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcgil...@apache.org
Subject [23/43] incubator-nifi git commit: NIFI-173 changed meta-inf/dependencies to meta-inf/bundled-dependencies
Date Fri, 19 Dec 2014 12:33:52 GMT
NIFI-173 changed meta-inf/dependencies to meta-inf/bundled-dependencies


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8fb78d2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8fb78d2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8fb78d2a

Branch: refs/heads/nifi-27
Commit: 8fb78d2a5862c7b147e652c1d69c0ba58b10c226
Parents: 3a4c6ed
Author: joewitt <joewitt@apache.org>
Authored: Tue Dec 16 10:38:59 2014 -0500
Committer: joewitt <joewitt@apache.org>
Committed: Tue Dec 16 10:38:59 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/nar/NarClassLoader.java | 10 +++++-----
 nar-maven-plugin/src/main/java/nifi/NarMojo.java          |  9 ++++++---
 2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8fb78d2a/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
b/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
index b3b7e7f..946c26e 100644
--- a/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
+++ b/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
  *
  * <pre>
  *	+META-INF/
- *	+-- dependencies/
+ *	+-- bundled-dependencies/
  *	    +-- &lt;JAR files&gt;
  *	+-- MANIFEST.MF
  * </pre>
@@ -186,9 +186,9 @@ public class NarClassLoader extends URLClassLoader {
     private void updateClasspath(File root) throws IOException {
         addURL(root.toURI().toURL()); // for compiled classes, META-INF/, etc.
 
-        File dependencies = new File(root, "META-INF/dependencies");
+        File dependencies = new File(root, "META-INF/bundled-dependencies");
         if (!dependencies.isDirectory()) {
-            LOGGER.warn(narWorkingDirectory + " does not contain META-INF/dependencies!");
+            LOGGER.warn(narWorkingDirectory + " does not contain META-INF/bundled-dependencies!");
         }
         addURL(dependencies.toURI().toURL());
         if (dependencies.isDirectory()) {
@@ -200,9 +200,9 @@ public class NarClassLoader extends URLClassLoader {
 
     @Override
     protected String findLibrary(final String libname) {
-        File dependencies = new File(narWorkingDirectory, "META-INF/dependencies");
+        File dependencies = new File(narWorkingDirectory, "META-INF/bundled-dependencies");
         if (!dependencies.isDirectory()) {
-            LOGGER.warn(narWorkingDirectory + " does not contain META-INF/dependencies!");
+            LOGGER.warn(narWorkingDirectory + " does not contain META-INF/bundled-dependencies!");
         }
         
         final File nativeDir = new File(dependencies, "native");

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8fb78d2a/nar-maven-plugin/src/main/java/nifi/NarMojo.java
----------------------------------------------------------------------
diff --git a/nar-maven-plugin/src/main/java/nifi/NarMojo.java b/nar-maven-plugin/src/main/java/nifi/NarMojo.java
index 5196f73..9b70ec0 100644
--- a/nar-maven-plugin/src/main/java/nifi/NarMojo.java
+++ b/nar-maven-plugin/src/main/java/nifi/NarMojo.java
@@ -290,6 +290,9 @@ public class NarMojo extends AbstractMojo {
      */
     @Parameter(property = "overWriteIfNewer", required = false, defaultValue = "true")
     protected boolean overWriteIfNewer;
+    
+    @Parameter( property = "projectBuildDirectory", required = false, defaultValue = "${project.build.directory}")
+    protected File projectBuildDirectory;
 
     /**
      * Used to look up Artifacts in the remote repository.
@@ -499,12 +502,12 @@ public class NarMojo extends AbstractMojo {
     }
 
     private File getClassesDirectory() {
-        final File outputDirectory = new File(project.getBasedir(), "target");
+        final File outputDirectory = projectBuildDirectory;
         return new File(outputDirectory, "classes");
     }
 
     private File getDependenciesDirectory() {
-        return new File(getClassesDirectory(), "META-INF/dependencies");
+        return new File(getClassesDirectory(), "META-INF/bundled-dependencies");
     }
 
     private void makeNar() throws MojoExecutionException {
@@ -518,7 +521,7 @@ public class NarMojo extends AbstractMojo {
     }
 
     public File createArchive() throws MojoExecutionException {
-        final File outputDirectory = new File(project.getBasedir(), "target");
+        final File outputDirectory = projectBuildDirectory;
         File narFile = getNarFile(outputDirectory, finalName, classifier);
         MavenArchiver archiver = new MavenArchiver();
         archiver.setArchiver(jarArchiver);


Mime
View raw message