You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/02/23 08:25:26 UTC

[karaf] branch karaf-4.2.x updated: [KARAF-6167] Add skip option on the client MOJO

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

jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
     new cd07af7  [KARAF-6167] Add skip option on the client MOJO
cd07af7 is described below

commit cd07af744ff0e4443c7f20d4e28b528be93da9ff
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Thu Feb 21 18:45:54 2019 +0100

    [KARAF-6167] Add skip option on the client MOJO
---
 .../src/main/java/org/apache/karaf/tooling/client/ClientMojo.java  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java
index 1a1871a..1d5cc1e 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java
@@ -92,9 +92,16 @@ public class ClientMojo extends AbstractMojo {
     @Parameter
     private File keyFile;
 
+    @Parameter(property = "skip", defaultValue = "false")
+    private boolean skip;
+
     private static final String NEW_LINE = System.getProperty("line.separator");
 
     public void execute() throws MojoExecutionException {
+        if (skip || (System.getProperty("client.skip") != null && System.getProperty("client.skip").equalsIgnoreCase("true"))) {
+            getLog().info("Client execution is skipped");
+            return;
+        }
         // ranking the commands and scripts
         Comparator<CommandDescriptor> comparator = Comparator.comparingInt(CommandDescriptor::getRank);
         SortedSet<CommandDescriptor> sortedCommands = new TreeSet<>(comparator);