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
This commit is contained in:
Nishant 2017-01-04 01:14:35 +05:30 committed by Charles Allen
parent 351d570684
commit 80e2394f94
2 changed files with 7 additions and 1 deletions

View File

@ -39,6 +39,10 @@
<version>${project.parent.version}</version>
</dependency>
</dependencies>
<properties>
<!-- the default value is a repeated flag from the command line, since blank value is not allowed -->
<druid.distribution.pulldeps.opts>--clean</druid.distribution.pulldeps.opts>
</properties>
<build>
<plugins>
@ -100,6 +104,7 @@
<argument>io.druid.extensions:mysql-metadata-storage</argument>
<argument>-c</argument>
<argument>io.druid.extensions:postgresql-metadata-storage</argument>
<argument>${druid.distribution.pulldeps.opts}</argument>
</arguments>
</configuration>
</execution>

View File

@ -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());