From 80e2394f948562ecff670dbec899694d2671d7ca Mon Sep 17 00:00:00 2001 From: Nishant Date: Wed, 4 Jan 2017 01:14:35 +0530 Subject: [PATCH] Allow users to specify additional command line args for creating druid package (#3812) * Allow users to specify additional command line args for creating tar balls This PR allows users to specify additional command line options to the pull deps command while creating druid distribution. e.g. To also package graphite-emitter in druid tarball one can run - mvn package -Ddruid.distribution.pulldeps.opts='-c io.druid.extensions.contrib:graphite-emitter' * Set default to --clean instead of blank value --- distribution/pom.xml | 5 +++++ services/src/main/java/io/druid/cli/PullDependencies.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/distribution/pom.xml b/distribution/pom.xml index 1c5a20c1ab4..8908e0332a4 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -39,6 +39,10 @@ ${project.parent.version} + + + --clean + @@ -100,6 +104,7 @@ io.druid.extensions:mysql-metadata-storage -c io.druid.extensions:postgresql-metadata-storage + ${druid.distribution.pulldeps.opts} diff --git a/services/src/main/java/io/druid/cli/PullDependencies.java b/services/src/main/java/io/druid/cli/PullDependencies.java index d3dc2025bef..81e11d8920b 100644 --- a/services/src/main/java/io/druid/cli/PullDependencies.java +++ b/services/src/main/java/io/druid/cli/PullDependencies.java @@ -241,7 +241,8 @@ public class PullDependencies implements Runnable try { log.info("Start downloading dependencies for extension coordinates: [%s]", coordinates); - for (final String coordinate : coordinates) { + for (String coordinate : coordinates) { + coordinate = coordinate.trim(); final Artifact versionedArtifact = getArtifact(coordinate); File currExtensionDir = new File(extensionsDir, versionedArtifact.getArtifactId());