[jira] [Resolved] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread Guillaume Nodet (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved KARAF-5629.

Resolution: Fixed

Nice idea, thx !

> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374644#comment-16374644
 ] 

ASF GitHub Bot commented on KARAF-5629:
---

gnodet closed pull request #465: [KARAF-5629] Improve syntax of procedural 
functions
URL: https://github.com/apache/karaf/pull/465
 
 
   

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/shell/core/src/main/java/org/apache/karaf/shell/impl/console/SessionFactoryImpl.java
 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/SessionFactoryImpl.java
index 8f69d2a7d1..0e1914e573 100644
--- 
a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/SessionFactoryImpl.java
+++ 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/SessionFactoryImpl.java
@@ -28,7 +28,6 @@
 
 import org.apache.felix.gogo.jline.Builtin;
 import org.apache.felix.gogo.jline.Posix;
-import org.apache.felix.gogo.jline.Procedural;
 import org.apache.felix.gogo.runtime.CommandProcessorImpl;
 import org.apache.felix.gogo.runtime.CommandSessionImpl;
 import org.apache.felix.gogo.runtime.Reflective;
@@ -43,6 +42,7 @@
 import org.apache.karaf.shell.api.console.SessionFactory;
 import org.apache.karaf.shell.api.console.Terminal;
 import org.apache.karaf.shell.impl.console.commands.ExitCommand;
+import org.apache.karaf.shell.impl.console.commands.Procedural;
 import org.apache.karaf.shell.impl.console.commands.SubShellCommand;
 import org.apache.karaf.shell.impl.console.commands.help.HelpCommand;
 
diff --git 
a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/Procedural.java
 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/Procedural.java
new file mode 100644
index 00..c5ca41bb2d
--- /dev/null
+++ 
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/Procedural.java
@@ -0,0 +1,599 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.karaf.shell.impl.console.commands;
+
+import org.apache.felix.service.command.CommandSession;
+import org.apache.felix.service.command.Function;
+import org.apache.felix.service.command.Process;
+import org.jline.builtins.Options;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.util.*;
+
+public class Procedural {
+
+static final String[] functions = {"each", "if", "not", "throw", "try", 
"until", "while", "break", "continue"};
+
+public Object _main(CommandSession session, Object[] argv) throws 
Throwable {
+if (argv == null || argv.length < 1) {
+throw new IllegalArgumentException();
+}
+Process process = Process.Utils.current();
+try {
+return run(session, process, argv);
+} catch (OptionException e) {
+process.err().println(e.getMessage());
+process.error(2);
+} catch (HelpException e) {
+process.err().println(e.getMessage());
+process.error(0);
+} catch (ThrownException e) {
+process.error(1);
+throw e.getCause();
+}
+return null;
+}
+
+protected static class OptionException extends Exception {
+public OptionException(String message, Throwable cause) {
+super(message, cause);
+}
+}
+
+protected static class HelpException extends Exception {
+public HelpException(String message) {
+super(message);
+}
+}
+
+protected static class ThrownException extends Exception {
+public ThrownException(Throwable cause) {
+super(cause);
+}
+}
+
+protected static class BreakException extends Exception {
+}
+
+protected static class ContinueException extends Exception {
+}
+
+protected Options parseOptions(CommandSession session, String[] usage, 
Object[] argv) throws HelpException, OptionException {
+try {
+Options opt = 

[jira] [Commented] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374646#comment-16374646
 ] 

ASF subversion and git services commented on KARAF-5629:


Commit 0b2c77ea69cda18f421090e98b07a9b10333e17a in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=0b2c77e ]

Merge pull request #465 from gnodet/KARAF-5629

[KARAF-5629] Improve syntax of procedural functions

> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374645#comment-16374645
 ] 

ASF subversion and git services commented on KARAF-5629:


Commit 180b0142d1e781024a207bf3a1062e048f95960f in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=180b014 ]

[KARAF-5629] Improve syntax of procedural functions

This is a temporary commit until the real fix is moved into gogo (to provide 
better syntax highlighting of this new syntax).


> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374648#comment-16374648
 ] 

ASF subversion and git services commented on KARAF-5629:


Commit 0b2c77ea69cda18f421090e98b07a9b10333e17a in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=0b2c77e ]

Merge pull request #465 from gnodet/KARAF-5629

[KARAF-5629] Improve syntax of procedural functions

> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5642) karaf:deploy goal broken

2018-02-23 Thread Felix marezki (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374493#comment-16374493
 ] 

Felix marezki commented on KARAF-5642:
--

Pull request on github: [466|https://github.com/apache/karaf/pull/466]

 

> karaf:deploy goal broken
> 
>
> Key: KARAF-5642
> URL: https://issues.apache.org/jira/browse/KARAF-5642
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-tooling
>Affects Versions: 4.2.0.M2
>Reporter: Felix marezki
>Priority: Major
>
> Error message on deploy:
> Command not found: java.io.PrintWriter@6dc1dc69



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KARAF-5642) karaf:deploy goal broken

2018-02-23 Thread Felix marezki (JIRA)
Felix marezki created KARAF-5642:


 Summary: karaf:deploy goal broken
 Key: KARAF-5642
 URL: https://issues.apache.org/jira/browse/KARAF-5642
 Project: Karaf
  Issue Type: Bug
  Components: karaf-tooling
Affects Versions: 4.2.0.M2
Reporter: Felix marezki


Error message on deploy:

Command not found: java.io.PrintWriter@6dc1dc69



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5630) karaf:run goal not working

2018-02-23 Thread Felix marezki (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374430#comment-16374430
 ] 

Felix marezki commented on KARAF-5630:
--

also, the karaf:deploy goal seems to be broken to.

> karaf:run goal not working 
> ---
>
> Key: KARAF-5630
> URL: https://issues.apache.org/jira/browse/KARAF-5630
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4, 4.0.5, 4.0.10, 4.1.5, 4.2.0.M2
>Reporter: Felix marezki
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> The karaf:run goal is supposed to run a bundle.
> This doesn't work as the RunMojo tries to run the artifact that is associated 
> with the Project.
> Even though there is an Artifact available its getFile() function return 
> null, as normally the setFile() function of it is being called by the 
> packaging Mojo which is not present nor executed beforehand.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5630) karaf:run goal not working

2018-02-23 Thread Felix marezki (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374403#comment-16374403
 ] 

Felix marezki commented on KARAF-5630:
--

But the RunMojo doesn't put anything in the deploy folder, does it?

It uses a Karaf instance from within.

I mean if it would put my bundle/feature/artifact into a deploy folder I guess 
that would be fine but it doesn't. So what is it's purpose here if not to run a 
Karaf instance for a project?

> karaf:run goal not working 
> ---
>
> Key: KARAF-5630
> URL: https://issues.apache.org/jira/browse/KARAF-5630
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4, 4.0.5, 4.0.10, 4.1.5, 4.2.0.M2
>Reporter: Felix marezki
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> The karaf:run goal is supposed to run a bundle.
> This doesn't work as the RunMojo tries to run the artifact that is associated 
> with the Project.
> Even though there is an Artifact available its getFile() function return 
> null, as normally the setFile() function of it is being called by the 
> packaging Mojo which is not present nor executed beforehand.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KARAF-5641) Karaf boot scripts need to deal with JDK10 version patterns

2018-02-23 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/KARAF-5641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré updated KARAF-5641:

Component/s: (was: karaf-boot)
 karaf-core

> Karaf boot scripts need to deal with JDK10 version patterns
> ---
>
> Key: KARAF-5641
> URL: https://issues.apache.org/jira/browse/KARAF-5641
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-core
>Affects Versions: 4.2.0.M2
>Reporter: Sanne Grinovero
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>
> The {{checkJvmVersion()}} function in the {{/bin/inc}} script of the 
> distribution is not dealing with the new output of {{java -version}} of JDK10 
> (and later?).
> The {{VERSION}} variable is left undefined, which then has the main 
> bootscript to not set the Jigsaw modules correctly (the various JVM flags 
> which need to be enabled since Java 9).
> This is a blocker to use Karaf on Java 10, which is already in candidate 
> release. I don't think much else is changed compared to Java 9 so it would be 
> great to sort this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (KARAF-5641) Karaf boot scripts need to deal with JDK10 version patterns

2018-02-23 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/KARAF-5641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré reassigned KARAF-5641:
---

Assignee: Jean-Baptiste Onofré

> Karaf boot scripts need to deal with JDK10 version patterns
> ---
>
> Key: KARAF-5641
> URL: https://issues.apache.org/jira/browse/KARAF-5641
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-boot
>Affects Versions: 4.2.0.M2
>Reporter: Sanne Grinovero
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>
> The {{checkJvmVersion()}} function in the {{/bin/inc}} script of the 
> distribution is not dealing with the new output of {{java -version}} of JDK10 
> (and later?).
> The {{VERSION}} variable is left undefined, which then has the main 
> bootscript to not set the Jigsaw modules correctly (the various JVM flags 
> which need to be enabled since Java 9).
> This is a blocker to use Karaf on Java 10, which is already in candidate 
> release. I don't think much else is changed compared to Java 9 so it would be 
> great to sort this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KARAF-5641) Karaf boot scripts need to deal with JDK10 version patterns

2018-02-23 Thread Sanne Grinovero (JIRA)
Sanne Grinovero created KARAF-5641:
--

 Summary: Karaf boot scripts need to deal with JDK10 version 
patterns
 Key: KARAF-5641
 URL: https://issues.apache.org/jira/browse/KARAF-5641
 Project: Karaf
  Issue Type: Bug
  Components: karaf-boot
Affects Versions: 4.2.0.M2
Reporter: Sanne Grinovero
 Fix For: 4.2.0


The {{checkJvmVersion()}} function in the {{/bin/inc}} script of the 
distribution is not dealing with the new output of {{java -version}} of JDK10 
(and later?).

The {{VERSION}} variable is left undefined, which then has the main bootscript 
to not set the Jigsaw modules correctly (the various JVM flags which need to be 
enabled since Java 9).

This is a blocker to use Karaf on Java 10, which is already in candidate 
release. I don't think much else is changed compared to Java 9 so it would be 
great to sort this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374331#comment-16374331
 ] 

ASF GitHub Bot commented on KARAF-5629:
---

gnodet opened a new pull request #465: [KARAF-5629] Improve syntax of 
procedural functions
URL: https://github.com/apache/karaf/pull/465
 
 
   This is a temporary commit until the real fix is moved into gogo (to provide 
better syntax highlighting of this new syntax).


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:
us...@infra.apache.org


> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread Guillaume Nodet (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet reassigned KARAF-5629:
--

Assignee: Guillaume Nodet

> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KARAF-5629) Add new karaf commands shell:elif and shell:else

2018-02-23 Thread Guillaume Nodet (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated KARAF-5629:
---
Fix Version/s: (was: 4.1.6)

> Add new karaf commands shell:elif and shell:else
> 
>
> Key: KARAF-5629
> URL: https://issues.apache.org/jira/browse/KARAF-5629
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Affects Versions: 4.1.5, 4.2.0.M2
>Reporter: Lijun Liao
>Priority: Minor
> Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
> do something b
>   } {
> if {"$v" equals "c"} {
>   do something c
> } {
>   do something others
> }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré updated KARAF-5623:

Fix Version/s: 4.1.6

> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0, 4.1.6
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré resolved KARAF-5623.
-
Resolution: Fixed

> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0, 4.1.6
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374274#comment-16374274
 ] 

ASF subversion and git services commented on KARAF-5623:


Commit 78169b2294078eabd6bc15e1ab3e7c6998cc5cd4 in karaf's branch 
refs/heads/karaf-4.1.x from [~jbonofre]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=78169b2 ]

[KARAF-5623] Upgrade to maven-bundle-plugin 3.5.0


> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374272#comment-16374272
 ] 

ASF subversion and git services commented on KARAF-5623:


Commit 6b53920d9a75130732f3c6e51b1859bcdb4ead6d in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=6b53920 ]

Merge pull request #459 from jbonofre/KARAF-5623

[KARAF-5623] Upgrade to maven-bundle-plugin 3.5.0

> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374273#comment-16374273
 ] 

ASF subversion and git services commented on KARAF-5623:


Commit 6b53920d9a75130732f3c6e51b1859bcdb4ead6d in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=6b53920 ]

Merge pull request #459 from jbonofre/KARAF-5623

[KARAF-5623] Upgrade to maven-bundle-plugin 3.5.0

> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374271#comment-16374271
 ] 

ASF subversion and git services commented on KARAF-5623:


Commit f58efdcc4df796150ecb2191112c8276bf1ea63e in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=f58efdc ]

[KARAF-5623] Upgrade to maven-bundle-plugin 3.5.0


> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5623) Upgrade to maven-bundle-plugin 3.5.0

2018-02-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374270#comment-16374270
 ] 

ASF GitHub Bot commented on KARAF-5623:
---

jbonofre closed pull request #459: [KARAF-5623] Upgrade to maven-bundle-plugin 
3.5.0
URL: https://github.com/apache/karaf/pull/459
 
 
   

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/pom.xml b/pom.xml
index 78dab4a2c6..18a6a4e0a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -196,7 +196,7 @@
 1.0.10
 0.1.6
 1.0.4
-3.3.0
+3.5.0
 1.10.4
 4.3.4
 3.1.2


 


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:
us...@infra.apache.org


> Upgrade to maven-bundle-plugin 3.5.0
> 
>
> Key: KARAF-5623
> URL: https://issues.apache.org/jira/browse/KARAF-5623
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-build
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KARAF-5631) Upgrade to PAX-CDI 1.0.0

2018-02-23 Thread Guillaume Nodet (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved KARAF-5631.

Resolution: Fixed
  Assignee: Guillaume Nodet

> Upgrade to PAX-CDI 1.0.0
> 
>
> Key: KARAF-5631
> URL: https://issues.apache.org/jira/browse/KARAF-5631
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5631) Upgrade to PAX-CDI 1.0.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374264#comment-16374264
 ] 

ASF subversion and git services commented on KARAF-5631:


Commit c3a9a4347f620ac5542190afec46a00915ad6936 in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=c3a9a43 ]

Merge pull request #463 from gnodet/KARAF-5631

[KARAF-5631] Upgrade to PAX-CDI 1.0.0

> Upgrade to PAX-CDI 1.0.0
> 
>
> Key: KARAF-5631
> URL: https://issues.apache.org/jira/browse/KARAF-5631
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5631) Upgrade to PAX-CDI 1.0.0

2018-02-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374261#comment-16374261
 ] 

ASF GitHub Bot commented on KARAF-5631:
---

gnodet closed pull request #463: [KARAF-5631] Upgrade to PAX-CDI 1.0.0
URL: https://github.com/apache/karaf/pull/463
 
 
   

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/pom.xml b/pom.xml
index edd56ce5c3..52f35ba21e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -269,13 +269,13 @@
 6.0.0
 5.0.0
 
-1.0.0.RC2
+1.0.0
 4.11.0
 1.10.1
 1.5.0
 1.8.3
 2.5.4
-6.1.1
+6.1.2
 3.0.0
 1.2.0
 0.1.0


 


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:
us...@infra.apache.org


> Upgrade to PAX-CDI 1.0.0
> 
>
> Key: KARAF-5631
> URL: https://issues.apache.org/jira/browse/KARAF-5631
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5631) Upgrade to PAX-CDI 1.0.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374262#comment-16374262
 ] 

ASF subversion and git services commented on KARAF-5631:


Commit 9b1ca02b08dab4f765d71059cbf6c2144b677707 in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=9b1ca02 ]

[KARAF-5631] Upgrade to PAX-CDI 1.0.0


> Upgrade to PAX-CDI 1.0.0
> 
>
> Key: KARAF-5631
> URL: https://issues.apache.org/jira/browse/KARAF-5631
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5631) Upgrade to PAX-CDI 1.0.0

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374263#comment-16374263
 ] 

ASF subversion and git services commented on KARAF-5631:


Commit c3a9a4347f620ac5542190afec46a00915ad6936 in karaf's branch 
refs/heads/master from [~gnt]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=c3a9a43 ]

Merge pull request #463 from gnodet/KARAF-5631

[KARAF-5631] Upgrade to PAX-CDI 1.0.0

> Upgrade to PAX-CDI 1.0.0
> 
>
> Key: KARAF-5631
> URL: https://issues.apache.org/jira/browse/KARAF-5631
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5630) karaf:run goal not working

2018-02-23 Thread JIRA

[ 
https://issues.apache.org/jira/browse/KARAF-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374248#comment-16374248
 ] 

Jean-Baptiste Onofré commented on KARAF-5630:
-

Unfortunately,  the Karaf documentation doesn't provide any detail  about the 
{{karaf:run}} goal.

Basically,  you can use {{karaf:run}}:

1. to  simply run a karaf instance in your maven build.  It's an execution, 
nothing will be deployed in it, so there's no reason to attach any artifact.
2. to  extend the run by putting the bundle (or artifact, like feature) in the 
Karaf {{deploy}} folder.

If the maven packaging is simple {{pom}}, then there's no artifact attached.

You also have {{karaf:deploy}} for bundle (especially to deploy on remote 
instances).

> karaf:run goal not working 
> ---
>
> Key: KARAF-5630
> URL: https://issues.apache.org/jira/browse/KARAF-5630
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4, 4.0.5, 4.0.10, 4.1.5, 4.2.0.M2
>Reporter: Felix marezki
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> The karaf:run goal is supposed to run a bundle.
> This doesn't work as the RunMojo tries to run the artifact that is associated 
> with the Project.
> Even though there is an Artifact available its getFile() function return 
> null, as normally the setFile() function of it is being called by the 
> packaging Mojo which is not present nor executed beforehand.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5630) karaf:run goal not working

2018-02-23 Thread Felix marezki (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374239#comment-16374239
 ] 

Felix marezki commented on KARAF-5630:
--

Ok, then how would that go in case of a bundle project?

I mean there needs to be a context, no!? Wouldn't that imply that I would have 
to make it an execution goal of a phase? Cause else there would be no artifact 
set on the Project (Well, an artifact would be set but no corresponding File). 
So how am I supposed to run that?

 

Now on the use case where I want to load a Feature on run.

I totally get that you could attach the feature.xml as an artifact to the 
Project, but that would involve using yet another Plugin, doesn't it?

 

So to be honest I thought the Plugin didn't work at all when I first tried it.

> karaf:run goal not working 
> ---
>
> Key: KARAF-5630
> URL: https://issues.apache.org/jira/browse/KARAF-5630
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4, 4.0.5, 4.0.10, 4.1.5, 4.2.0.M2
>Reporter: Felix marezki
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> The karaf:run goal is supposed to run a bundle.
> This doesn't work as the RunMojo tries to run the artifact that is associated 
> with the Project.
> Even though there is an Artifact available its getFile() function return 
> null, as normally the setFile() function of it is being called by the 
> packaging Mojo which is not present nor executed beforehand.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KARAF-5638) Create new WebConsole plugins

2018-02-23 Thread Guillaume Nodet (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated KARAF-5638:
---
Fix Version/s: (was: 4.2.0)

> Create new WebConsole plugins
> -
>
> Key: KARAF-5638
> URL: https://issues.apache.org/jira/browse/KARAF-5638
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-webconsole
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> It would be great to add new plugins in the Karaf WebConsole like scheduler, 
> etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KARAF-5640) Unable to acquire the state change lock for apache.felix.fileinstall

2018-02-23 Thread vijay p (JIRA)
vijay p  created KARAF-5640:
---

 Summary: Unable to acquire the state change lock for 
apache.felix.fileinstall
 Key: KARAF-5640
 URL: https://issues.apache.org/jira/browse/KARAF-5640
 Project: Karaf
  Issue Type: Question
  Components: karaf-osgi
Affects Versions: 4.1.4
Reporter: vijay p 


Hi , 

   I tried to install karaf 4.1.4 and i am getting the following error . 

2018-02-22T14:56:12.912+0100 | ERROR | blisher@6eebc39e | o.a.f.fileinstall | 
ogback.internal.FrameworkHandler 144 | 9 - org.apache.felix.fileinstall - 3.6.4 
| FrameworkEvent ERROR - org.apache.felix.fileinstall
org.osgi.framework.BundleException: Unable to acquire the state change lock for 
the module: osgi.identity; osgi.identity="org.apache.felix.fileinstall"; 
type="osgi.bundle"; version:Version="3.6.4" [id=9] STOPPED [STOPPED]
 at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
 at org.eclipse.osgi.container.Module.stop(Module.java:490)
 at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1661)
 at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1580)
 at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270)
 at 
org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
 at org.eclipse.osgi.container.Module.doStop(Module.java:636)
 at org.eclipse.osgi.container.Module.stop(Module.java:498)
 at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
 at 
org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 
seconds to acquire the lock.
 at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
 ... 10 common frames omitted

May i know where am i wrong and could you give me a solution on how to resolve 
this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KARAF-5639) NPE during instance:start

2018-02-23 Thread Grzegorz Grzybek (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-5639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Grzybek resolved KARAF-5639.
-
Resolution: Fixed

> NPE during instance:start
> -
>
> Key: KARAF-5639
> URL: https://issues.apache.org/jira/browse/KARAF-5639
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-instance
>Affects Versions: 4.2.0.M2
>Reporter: Grzegorz Grzybek
>Assignee: Grzegorz Grzybek
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-5639) NPE during instance:start

2018-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16374065#comment-16374065
 ] 

ASF subversion and git services commented on KARAF-5639:


Commit cca68d3ad272fdbcf1ce84a69d6353c55c541db1 in karaf's branch 
refs/heads/master from [~gzres]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=cca68d3 ]

[KARAF-5639] Include unix/windows resource in instance.core bundle


> NPE during instance:start
> -
>
> Key: KARAF-5639
> URL: https://issues.apache.org/jira/browse/KARAF-5639
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-instance
>Affects Versions: 4.2.0.M2
>Reporter: Grzegorz Grzybek
>Assignee: Grzegorz Grzybek
>Priority: Major
> Fix For: 4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)