You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2018/03/26 17:09:52 UTC

[karaf] branch karaf-4.1.x updated: [KARAF-5677] Avoid NPE when artifactLocations is not provided to karaf-maven-plugin:deploy

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.1.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.1.x by this push:
     new 4a3fb60  [KARAF-5677] Avoid NPE when artifactLocations is not provided to karaf-maven-plugin:deploy
4a3fb60 is described below

commit 4a3fb60b16f2bb85939e8b52517024016ded8379
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Mon Mar 26 18:57:45 2018 +0200

    [KARAF-5677] Avoid NPE when artifactLocations is not provided to karaf-maven-plugin:deploy
---
 .../src/main/java/org/apache/karaf/tooling/client/DeployMojo.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/DeployMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/DeployMojo.java
index 1c04563..cc49834 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/DeployMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/DeployMojo.java
@@ -109,7 +109,9 @@ public class DeployMojo extends MojoSupport {
             Artifact projectArtifact = project.getArtifact();
             artifacts.add("mvn:" + projectArtifact.getGroupId() + "/" + projectArtifact.getArtifactId() + "/" + projectArtifact.getVersion());
         }
-        artifacts.addAll(artifactLocations);
+        if (artifactLocations != null) {
+            artifacts.addAll(artifactLocations);
+        }
         if (useSsh)
             deployWithSsh(artifactLocations);
         else deployWithJmx(artifactLocations);

-- 
To stop receiving notification emails like this one, please contact
jbonofre@apache.org.