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

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 1131b37  runtime: small improvement to the dependency lister plugin
1131b37 is described below

commit 1131b378f5537f4dcd65e9fd2ebc6a6a30039142
Author: lburgazzoli <[email protected]>
AuthorDate: Fri Nov 16 09:30:48 2018 +0100

    runtime: small improvement to the dependency lister plugin
---
 .../k/tooling/maven/dependency/DependencyListerMojo.java      | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/runtime/dependency-lister/src/main/java/org/apache/camel/k/tooling/maven/dependency/DependencyListerMojo.java
 
b/runtime/dependency-lister/src/main/java/org/apache/camel/k/tooling/maven/dependency/DependencyListerMojo.java
index 1afe9df..dcad45a 100644
--- 
a/runtime/dependency-lister/src/main/java/org/apache/camel/k/tooling/maven/dependency/DependencyListerMojo.java
+++ 
b/runtime/dependency-lister/src/main/java/org/apache/camel/k/tooling/maven/dependency/DependencyListerMojo.java
@@ -52,12 +52,15 @@ public class DependencyListerMojo extends AbstractMojo {
     @Parameter(readonly = true, defaultValue = "${project}")
     private MavenProject project;
 
-    @Parameter(readonly = true, defaultValue = 
"${project.build.directory}/dependencies.yaml")
-    private String destination;
+    @Parameter(defaultValue = "${project.build.directory}/dependencies.yaml")
+    private String outputFile;
+
+    @Parameter(defaultValue = "true")
+    private boolean includeLocation;
 
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
-        final Path output = Paths.get(this.destination);
+        final Path output = Paths.get(this.outputFile);
 
         try {
             if (Files.notExists(output.getParent())) {
@@ -92,7 +95,7 @@ public class DependencyListerMojo extends AbstractMojo {
         Map<String, String> dep = new HashMap<>();
         dep.put("id", artifact.getId());
 
-        if (artifact.getFile() != null) {
+        if (includeLocation && artifact.getFile() != null) {
             dep.put("location", artifact.getFile().getAbsolutePath());
         }
 

Reply via email to