git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] lburgazzoli closed pull request #225: runtime: small improvement to the dependency lister plugin


lburgazzoli closed pull request #225: runtime: small improvement to the dependency lister plugin
URL: https://github.com/apache/camel-k/pull/225
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 1afe9df5..dcad45a0 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 @@
     @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 @@ private boolean isCompileOrRuntime(Artifact artifact) {
         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());
         }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services