Re: Troubles to upgrade from 3.0.5 to 4.0.5 (karaf maven plugin behavior changes)

2016-06-12 Thread Oliver Lietz
On Sunday 12 June 2016 16:29:21 Richard Kosegi wrote:
> Hi Karaf folks,

Hello Richard,

> I have a question about changed behaviour of karaf-maven-plugin between
> versions 3.0.5 and 4.0.5.
> 
> While using 3.0.5 my feature is correctly recognized in "assembly"  goal,
> where in 4.0.5 it is not due to this error:
> 
> Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build
> assembly
> at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:234)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPl
> uginManager.java:134) at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:2
> 08) ... 20 more
> Caused by: java.lang.IllegalStateException: Could not find matching feature
> for myfeature-thirdparty/0.2.4-SNAPSHOT
> at
> org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1079)
> at
> org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1072)
> at
> org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1072)
> at org.apache.karaf.profile.assembly.Builder.bootStage(Builder.java:811)
> at
> org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:61
> 1) at
> org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)
> at
> org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392)
> at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228)
> ... 22 more
> 
> Problem seems to be somehow connected to how OSGi versions artifacts versus
> how maven versions snapshots.
> I'm assuming that this only affects SNAPSHOT versions.
> 
> Here is my feature:
> 
>  description="My all features" version="${project.version}">
> myfeature-thirdparty
> myfeature-core 
> 
> 
> I was able to workaround this problem by ugly hack below, but I guess I'm
> missing something very elemenary.

no. This is a known issue: https://issues.apache.org/jira/browse/KARAF-4105

I hope Jean-Baptiste finds some time to look into this.
In the meantime you could use the patch from Markus Rathgeb.

> Please suggest.
> 
> Here is ugly hack:
> 
> 
> git diff -- ./src/main/java/org/apache/karaf/profile/assembly/Builder.java
> diff --git
> a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
> b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
> index b4daa50..de47483 100644
> --- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
> +++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
> @@ -1094,7 +1094,7 @@ public class Builder {
>   * @return
>   */
>  private boolean matches(Feature f, Dependency featureRef) {
> -String version = featureRef.getVersion();
> +String version = featureRef.getVersion().replace("-SNAPSHOT",
> ".SNAPSHOT");
>  return f.getName().equals(featureRef.getName())
>  && (version == null || version.equals("0.0.0")||
> version.startsWith("[") || f.getVersion().equals(version));
>  }
> 

Regards,
O.

> Thanks!
> 
> Richard.



Re: Board report June 2016

2016-06-12 Thread Achim Nierbeck
Hi,

looks good to me.

regards, Achim


2016-06-13 8:01 GMT+02:00 Andrea Cosentino :

> Looks good to me :-)
>
> Thanks JB :-)
>  --
> Andrea Cosentino
> --
> Apache Camel PMC Member
> Apache Karaf Committer
> Apache Servicemix Committer
> Email: ancosen1...@yahoo.com
> Twitter: @oscerd2
> Github: oscerd
>
>
>
> On Monday, June 13, 2016 7:52 AM, Jean-Baptiste Onofré 
> wrote:
> Hi all,
>
> I prepared the board report for June 2016:
>
> https://cwiki.apache.org/confluence/display/KARAF/Board+Reports
>
> Please take a look and let me know if I forgot something.
>
> I would like to submit asap.
>
> Thanks,
> Regards
> JB
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


[GitHub] karaf pull request #196: KARAF-4564 Can't start karaf using symbolic link

2016-06-12 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/karaf/pull/196


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: ActiveMQ and Camel 2.17.x on Karaf

2016-06-12 Thread Jean-Baptiste Onofré

Hi Krzysztof

I will resume my work on it.

I will keep you posted soon.

Regards
JB

On 06/12/2016 09:34 PM, Krzysztof Sobkowiak wrote:

Hi

Any news about this problem?

Regards
Krzysztof

On 28.04.2016 21:21, Krzysztof Sobkowiak wrote:

It looks like it's again the problem with installing of multiple Spring 
versions while ActiveMQ bundles are already present in Karaf. Spring 
3.2.14.RELEASE_1 was already installed with the broker and now all other Spring 
versions are installed with activemq-camel feature.

karaf@root()> feature:install -v activemq-camel
Adding features: activemq-camel/[5.13.3,5.13.3]
Changes to perform:
   Region: root
 Bundles to update:
   org.apache.servicemix.bundles.jaxb-impl/2.2.11.1 with 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.6_1
 Bundles to install:
   mvn:org.apache.activemq/activemq-camel/5.13.3
   mvn:org.apache.camel/camel-blueprint/2.17.0
   mvn:org.apache.camel/camel-catalog/2.17.0
   mvn:org.apache.camel/camel-commands-core/2.17.0
   mvn:org.apache.camel/camel-core/2.17.0
   mvn:org.apache.camel/camel-jms/2.17.0
   mvn:org.apache.camel.karaf/camel-karaf-commands/2.17.0
   mvn:commons-codec/commons-codec/1.9
   mvn:commons-pool/commons-pool/1.6
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.2.5.RELEASE_1
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.1.7.RELEASE_2
   
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.2.5.RELEASE_1
   mvn:org.springframework/spring-aop/3.1.4.RELEASE
   mvn:org.springframework/spring-asm/3.1.4.RELEASE
   mvn:org.springframework/spring-beans/3.1.4.RELEASE
   mvn:org.springframework/spring-context/3.1.4.RELEASE
   mvn:org.springframework/spring-context-support/3.1.4.RELEASE
   mvn:org.springframework/spring-core/3.1.4.RELEASE
   mvn:org.springframework/spring-expression/3.1.4.RELEASE
   mvn:org.codehaus.woodstox/stax2-api/3.1.4
   mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1
   ...

I have described something similar here 
http://karaf.922171.n3.nabble.com/Feature-spring-4-2-3-RELEASE-1-also-installs-bundles-from-Spring-version-3-1-4-when-activemq-is-instd-td4046213.html.

Regards
Krzysztof



On 28.04.2016 00:27, Krzysztof Sobkowiak wrote:

Hi

I have tried to install activemq-broker-noweb and activemq-camel features 
(5.13.2, 5.13.3 and current master) with Camel 2.17.0 on Karaf 4.0.5 but with 
no success:

karaf@root()> feature:repo-add camel 2.17.0
Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.17.0/xml/features
karaf@root()> feature:repo-add activemq 5.13.2
Adding feature url mvn:org.apache.activemq/activemq-karaf/5.13.2/xml/features
karaf@root()> feature:install activemq-broker-noweb
karaf@root()> activemq:list
brokerName = amq-broker

karaf@root()> feature:install activemq-camel
karaf@root()> activemq:list
karaf@root()>

The activemq-osgi bundle is refreshed and and cannot be resolved anymore

There is following entry in log

Caused by: java.lang.ClassNotFoundException: 
org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found by 
org.apache.activemq.activemq-osgi [61]
 at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
 at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
 at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apac

Re: Board report June 2016

2016-06-12 Thread Andrea Cosentino
Looks good to me :-)

Thanks JB :-)
 --
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix Committer
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd



On Monday, June 13, 2016 7:52 AM, Jean-Baptiste Onofré  
wrote:
Hi all,

I prepared the board report for June 2016:

https://cwiki.apache.org/confluence/display/KARAF/Board+Reports

Please take a look and let me know if I forgot something.

I would like to submit asap.

Thanks,
Regards
JB
-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Board report June 2016

2016-06-12 Thread Jean-Baptiste Onofré

Hi all,

I prepared the board report for June 2016:

https://cwiki.apache.org/confluence/display/KARAF/Board+Reports

Please take a look and let me know if I forgot something.

I would like to submit asap.

Thanks,
Regards
JB
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: ActiveMQ and Camel 2.17.x on Karaf

2016-06-12 Thread Krzysztof Sobkowiak
Hi

Any news about this problem?

Regards
Krzysztof

On 28.04.2016 21:21, Krzysztof Sobkowiak wrote:
> It looks like it's again the problem with installing of multiple Spring 
> versions while ActiveMQ bundles are already present in Karaf. Spring 
> 3.2.14.RELEASE_1 was already installed with the broker and now all other 
> Spring versions are installed with activemq-camel feature.
>
> karaf@root()> feature:install -v activemq-camel
> Adding features: activemq-camel/[5.13.3,5.13.3]
> Changes to perform:
>   Region: root
> Bundles to update:
>   org.apache.servicemix.bundles.jaxb-impl/2.2.11.1 with 
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.6_1
> Bundles to install:
>   mvn:org.apache.activemq/activemq-camel/5.13.3
>   mvn:org.apache.camel/camel-blueprint/2.17.0
>   mvn:org.apache.camel/camel-catalog/2.17.0
>   mvn:org.apache.camel/camel-commands-core/2.17.0
>   mvn:org.apache.camel/camel-core/2.17.0
>   mvn:org.apache.camel/camel-jms/2.17.0
>   mvn:org.apache.camel.karaf/camel-karaf-commands/2.17.0
>   mvn:commons-codec/commons-codec/1.9
>   mvn:commons-pool/commons-pool/1.6
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.2.5.RELEASE_1
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.1.7.RELEASE_2
>   
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.2.5.RELEASE_1
>   mvn:org.springframework/spring-aop/3.1.4.RELEASE
>   mvn:org.springframework/spring-asm/3.1.4.RELEASE
>   mvn:org.springframework/spring-beans/3.1.4.RELEASE
>   mvn:org.springframework/spring-context/3.1.4.RELEASE
>   mvn:org.springframework/spring-context-support/3.1.4.RELEASE
>   mvn:org.springframework/spring-core/3.1.4.RELEASE
>   mvn:org.springframework/spring-expression/3.1.4.RELEASE
>   mvn:org.codehaus.woodstox/stax2-api/3.1.4
>   mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1
>   ...
>
> I have described something similar here 
> http://karaf.922171.n3.nabble.com/Feature-spring-4-2-3-RELEASE-1-also-installs-bundles-from-Spring-version-3-1-4-when-activemq-is-instd-td4046213.html.
>
> Regards
> Krzysztof
>
>
>
> On 28.04.2016 00:27, Krzysztof Sobkowiak wrote:
>> Hi
>>
>> I have tried to install activemq-broker-noweb and activemq-camel features 
>> (5.13.2, 5.13.3 and current master) with Camel 2.17.0 on Karaf 4.0.5 but 
>> with no success:
>>
>> karaf@root()> feature:repo-add camel 2.17.0
>> Adding feature url 
>> mvn:org.apache.camel.karaf/apache-camel/2.17.0/xml/features
>> karaf@root()> feature:repo-add activemq 5.13.2
>> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.13.2/xml/features
>> karaf@root()> feature:install activemq-broker-noweb
>> karaf@root()> activemq:list
>> brokerName = amq-broker
>>
>> karaf@root()> feature:install activemq-camel
>> karaf@root()> activemq:list
>> karaf@root()>
>>
>> The activemq-osgi bundle is refreshed and and cannot be resolved anymore
>>
>> There is following entry in log
>>
>> Caused by: java.lang.ClassNotFoundException: 
>> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found by 
>> org.apache.activemq.activemq-osgi [61]
>> at 
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
>> at 
>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
>> at 
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoa

Troubles to upgrade from 3.0.5 to 4.0.5 (karaf maven plugin behavior changes)

2016-06-12 Thread Richard Kosegi
Hi Karaf folks,

I have a question about changed behaviour of karaf-maven-plugin between
versions 3.0.5 and 4.0.5.

While using 3.0.5 my feature is correctly recognized in "assembly"  goal,
where in 4.0.5 it is not due to this error:

Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build
assembly
at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:234)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.IllegalStateException: Could not find matching feature
for myfeature-thirdparty/0.2.4-SNAPSHOT
at
org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1079)
at
org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1072)
at
org.apache.karaf.profile.assembly.Builder.addFeatures(Builder.java:1072)
at org.apache.karaf.profile.assembly.Builder.bootStage(Builder.java:811)
at
org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:611)
at
org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)
at
org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392)
at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228)
... 22 more

Problem seems to be somehow connected to how OSGi versions artifacts versus
how maven versions snapshots.
I'm assuming that this only affects SNAPSHOT versions.

Here is my feature:


myfeature-thirdparty
myfeature-core



I was able to workaround this problem by ugly hack below, but I guess I'm
missing something very elemenary.

Please suggest.

Here is ugly hack:


git diff -- ./src/main/java/org/apache/karaf/profile/assembly/Builder.java
diff --git
a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
index b4daa50..de47483 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
@@ -1094,7 +1094,7 @@ public class Builder {
  * @return
  */
 private boolean matches(Feature f, Dependency featureRef) {
-String version = featureRef.getVersion();
+String version = featureRef.getVersion().replace("-SNAPSHOT",
".SNAPSHOT");
 return f.getName().equals(featureRef.getName())
 && (version == null || version.equals("0.0.0")||
version.startsWith("[") || f.getVersion().equals(version));
 }


Thanks!

Richard.