Skip to content

Commit

Permalink
Allow users to specify additional command line args for creating drui…
Browse files Browse the repository at this point in the history
…d package (apache#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
  • Loading branch information
nishantmonu51 authored and drcrallen committed Jan 3, 2017
1 parent 351d570 commit 80e2394
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion services/src/main/java/io/druid/cli/PullDependencies.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public void run()

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());
Expand Down

0 comments on commit 80e2394

Please sign in to comment.