Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Jean-Baptiste Onofré
That's the easiest way !

That's exactly why I created KarafTestSupport !

Regards
JB

On 22/12/2019 12:40, Serge Huber wrote:
> Yes indeed this is exactly the problem I’m seeing. I guess we really
> need to use the KarafTestSupport finally :)
> 
> Cheers,
>   Serge
> 
> 
>   T +41 22 361 3424 
> 
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com 
> SKYPE  | LINKEDIN
>  | TWITTER
>  | VCARD
> 
>   
> 
>> JOIN OUR COMMUNITY  to evaluate, get trained and to 
>> discover why
> Jahia is a leading User Experience Platform (UXP) for Digital
> Transformation.
> 
>> Le 22 déc. 2019 à 12:34, Oliver Lietz  a écrit :
>>
>> On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
>>> Hi Achim,
>>
>> Hi,
>>
>>> Serge reported the same on Unomi.
>>>
>>> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
>>> are working fine.
>>>
>>> The think I did for JDK9+ is:
>>>
>>> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
>>> apache/karaf/itests/KarafTestSupport.java#L184
>>>
>>> So, if your tests extend KarafTestSupport, it should be straight forward.
>>> If you don't extend KarafTestsSupport, you have to mimic the
>>> configuration.
>>
>> We have done it similar for Sling:
>>
>> https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
>> master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151
>>
>> And it reminds me to open a PR because the duplication of options in
>> Karaf's
>> KarafTestSupport is really ugly.
>>
>> Regards,
>> O.
>>
>>> Regards
>>> JB
>>>
>>> On 21/12/2019 17:39, Achim Nierbeck wrote:
 Hi,

 it's one of those days where it's better to just stop for now.
 Though I've spent quite some time on figuring out, without real success
 though.
 Maybe one on the list does have a bright moment to point me into the
 right direction :)
 I was working on upgrading the latest dependencies for my karaf+vertx
 project. [1]
 And while on it I was trying to build with Java 11. Now what really
 puzzled me, the Pax-Exam tests all failed because the test container
 never really started. When trying to start the container alone,
 everything runs smoothly. Therefore it's something I'm missing with the
 pax-exam setup.
 I'd be grateful for any input on where I'm wrong :)

 Thanks, Achim


 [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
>>
>>
>>
>>

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


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Jean-Baptiste Onofré
Hi,

I already did cleanup and improvement as I'm now using KarafTestSupport
in Cellar or Decanter for instance.

Let me improve further with more fine grained config.

Regards
JB

On 22/12/2019 12:40, Achim Nierbeck wrote:
> Hi,
> 
> ok, that didn't work out, cause a customized Karaf can't be tested with
> the KarafTestSupport class.
> Nevertheless it does work now, cause I was missing a couple of those
> VMOptions needed. Therefore I needed to add that.
> 
> If I now look at the usability for the KarafTestSupport class, in case
> we want to make it more usable for anybody having his own custom Karaf,
> it needs to be made more modular regarding the configuration.
> 
> Thanks, Achim
> 
> P.S. a working example can be found here now:
> https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Exampl-ITest/src/test/java/de/nierbeck/example/vertx/test/CustomVertxKarafTest.java#L91
> 
> Am So., 22. Dez. 2019 um 05:34 Uhr schrieb Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>>:
> 
> Hi Achim,
> 
> Serge reported the same on Unomi.
> 
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
> are working fine.
> 
> The think I did for JDK9+ is:
> 
> 
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java#L184
> 
> So, if your tests extend KarafTestSupport, it should be straight
> forward.
> If you don't extend KarafTestsSupport, you have to mimic the
> configuration.
> 
> Regards
> JB
> 
> On 21/12/2019 17:39, Achim Nierbeck wrote:
> > Hi,
> >
> > it's one of those days where it's better to just stop for now.
> > Though I've spent quite some time on figuring out, without real
> success
> > though.
> > Maybe one on the list does have a bright moment to point me into the
> > right direction :)
> > I was working on upgrading the latest dependencies for my karaf+vertx
> > project. [1]
> > And while on it I was trying to build with Java 11. Now what really
> > puzzled me, the Pax-Exam tests all failed because the test container
> > never really started. When trying to start the container alone,
> > everything runs smoothly. Therefore it's something I'm missing
> with the
> > pax-exam setup.
> > I'd be grateful for any input on where I'm wrong :)
> >
> > Thanks, Achim
> >
> >
> > [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
> >
> > --
> >
> > Apache Member
> > Apache Karaf  Committer & PMC
> > OPS4J Pax Web 
> Committer
> > & Project Lead
> > blog 
> > Co-Author of Apache Karaf Cookbook 
> >
> 
> -- 
> 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 
> 

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


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Jean-Baptiste Onofré
Hi,

if you take a look on 4.2.8-SNAPSHOT, you will see cleanup on
KarafTestSupport, allowing easier extend now.

Regards
JB

On 22/12/2019 12:34, Oliver Lietz wrote:
> On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
>> Hi Achim,
> 
> Hi,
> 
>> Serge reported the same on Unomi.
>>
>> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
>> are working fine.
>>
>> The think I did for JDK9+ is:
>>
>> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
>> apache/karaf/itests/KarafTestSupport.java#L184
>>
>> So, if your tests extend KarafTestSupport, it should be straight forward.
>> If you don't extend KarafTestsSupport, you have to mimic the configuration.
> 
> We have done it similar for Sling:
> 
> https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
> master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151
> 
> And it reminds me to open a PR because the duplication of options in Karaf's 
> KarafTestSupport is really ugly.
> 
> Regards,
> O.
> 
>> Regards
>> JB
>>
>> On 21/12/2019 17:39, Achim Nierbeck wrote:
>>> Hi,
>>>
>>> it's one of those days where it's better to just stop for now.
>>> Though I've spent quite some time on figuring out, without real success
>>> though.
>>> Maybe one on the list does have a bright moment to point me into the
>>> right direction :)
>>> I was working on upgrading the latest dependencies for my karaf+vertx
>>> project. [1]
>>> And while on it I was trying to build with Java 11. Now what really
>>> puzzled me, the Pax-Exam tests all failed because the test container
>>> never really started. When trying to start the container alone,
>>> everything runs smoothly. Therefore it's something I'm missing with the
>>> pax-exam setup.
>>> I'd be grateful for any input on where I'm wrong :)
>>>
>>> Thanks, Achim
>>>
>>>
>>> [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
> 
> 
> 
> 

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


Re: org.osgi.service.log.Logger

2019-12-22 Thread Markus Rathgeb
At least for me it would be really great of the log service 1.4 could
be used in 4.2.8 ;)

Am Fr., 20. Dez. 2019 um 15:52 Uhr schrieb Jean-Baptiste Onofré
:
>
> Hi,
>
> I think we can backport this in Karaf 4.2.x. Originally, I planned to
> focus this only on Karaf 4.3.x, but it makes sense to backport
> "compendium/extra" package on 4.2.x, even if the framework is still R6.
>
> I'm not sure I will have time to do that for 4.2.8, but let me try.
>
> Regards
> JB
>
> On 20/12/2019 14:59, Markus Rathgeb wrote:
> > Hi JB,
> > me again. ;)
> >
> > In Karaf 4.2.7 the scr feature already implements the Declarative
> > Services Specification 1.4.
> > Would it be possible that Pax Logging provides an implementation of
> > the Log Service Specification 1.4 in Karaf 4.2.8?
> > Or will the Log Service Specification 1.4 rely on some Core R7 feature?
> >
> > Best regards,
> > Markus
> >
> > Am Fr., 20. Dez. 2019 um 14:29 Uhr schrieb Markus Rathgeb 
> > :
> >>
> >> The "Equinox Common" can be used on Felix Framework using the "Equinox
> >> Supplement" package that provides e.g. "org.eclipse.equinox.log".
> >>
> >> The Equinox Logger implements the Logger interface of the OSGi Log
> >> Service specification 1.4
> >> https://github.com/eclipse/rt.equinox.framework/blob/63a9e1075ab029c5090a3d50cf52b82f052c62f6/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java#L23
> >>
> >> The "Equinox Supplement" does not usage version constraints at all on
> >> its imports:
> >> https://github.com/eclipse/rt.equinox.framework/blob/63a9e1075ab029c5090a3d50cf52b82f052c62f6/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF#L25
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Achim Nierbeck
Thanks for the hints from Serge and Oliver.
I had an email prepared and wanted to wait till everything runs smoother :)
The KarafTestSupport needs some rework if you want to use it as basis for
custom Karaf containers.
So actually I just made sure I have all the required VM Options needed.

Thanks for the hints :)

regards, Achim


Am So., 22. Dez. 2019 um 12:40 Uhr schrieb Serge Huber :

> Yes indeed this is exactly the problem I’m seeing. I guess we really need
> to use the KarafTestSupport finally :)
>
> Cheers,
>   Serge
>
> T +41 22 361 3424 <+41%2022%20361%203424>
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com 
> SKYPE | LINKEDIN  | TWITTER
>  | VCARD
> 
>
>
> > JOIN OUR COMMUNITY  to evaluate, get trained and
> to discover why Jahia is a leading User Experience Platform (UXP) for
> Digital Transformation.
>
> Le 22 déc. 2019 à 12:34, Oliver Lietz  a écrit :
>
> On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
>
> Hi Achim,
>
>
> Hi,
>
> Serge reported the same on Unomi.
>
>
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
>
> are working fine.
>
>
> The think I did for JDK9+ is:
>
>
>
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
>
> apache/karaf/itests/KarafTestSupport.java#L184
>
>
> So, if your tests extend KarafTestSupport, it should be straight forward.
>
> If you don't extend KarafTestsSupport, you have to mimic the configuration.
>
>
> We have done it similar for Sling:
>
>
> https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
>
> master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151
>
> And it reminds me to open a PR because the duplication of options in
> Karaf's
> KarafTestSupport is really ugly.
>
> Regards,
> O.
>
> Regards
>
> JB
>
>
> On 21/12/2019 17:39, Achim Nierbeck wrote:
>
> Hi,
>
>
> it's one of those days where it's better to just stop for now.
>
> Though I've spent quite some time on figuring out, without real success
>
> though.
>
> Maybe one on the list does have a bright moment to point me into the
>
> right direction :)
>
> I was working on upgrading the latest dependencies for my karaf+vertx
>
> project. [1]
>
> And while on it I was trying to build with Java 11. Now what really
>
> puzzled me, the Pax-Exam tests all failed because the test container
>
> never really started. When trying to start the container alone,
>
> everything runs smoothly. Therefore it's something I'm missing with the
>
> pax-exam setup.
>
> I'd be grateful for any input on where I'm wrong :)
>
>
> Thanks, Achim
>
>
>
> [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
>
>
>
>
>
>

-- 

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


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Serge Huber
Yes indeed this is exactly the problem I’m seeing. I guess we really need to 
use the KarafTestSupport finally :)

Cheers,
  Serge

T +41 22 361 3424

9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com
SKYPE | LINKEDIN | TWITTER | VCARD
  

> JOIN OUR COMMUNITY to evaluate, get trained and to discover why Jahia is a 
> leading User Experience Platform (UXP) for Digital Transformation.

> Le 22 déc. 2019 à 12:34, Oliver Lietz  a écrit :
> 
> On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
>> Hi Achim,
> 
> Hi,
> 
>> Serge reported the same on Unomi.
>> 
>> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
>> are working fine.
>> 
>> The think I did for JDK9+ is:
>> 
>> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
>> apache/karaf/itests/KarafTestSupport.java#L184
>> 
>> So, if your tests extend KarafTestSupport, it should be straight forward.
>> If you don't extend KarafTestsSupport, you have to mimic the configuration.
> 
> We have done it similar for Sling:
> 
> https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
> master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151
> 
> And it reminds me to open a PR because the duplication of options in Karaf's 
> KarafTestSupport is really ugly.
> 
> Regards,
> O.
> 
>> Regards
>> JB
>> 
>>> On 21/12/2019 17:39, Achim Nierbeck wrote:
>>> Hi,
>>> 
>>> it's one of those days where it's better to just stop for now.
>>> Though I've spent quite some time on figuring out, without real success
>>> though.
>>> Maybe one on the list does have a bright moment to point me into the
>>> right direction :)
>>> I was working on upgrading the latest dependencies for my karaf+vertx
>>> project. [1]
>>> And while on it I was trying to build with Java 11. Now what really
>>> puzzled me, the Pax-Exam tests all failed because the test container
>>> never really started. When trying to start the container alone,
>>> everything runs smoothly. Therefore it's something I'm missing with the
>>> pax-exam setup.
>>> I'd be grateful for any input on where I'm wrong :)
>>> 
>>> Thanks, Achim
>>> 
>>> 
>>> [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
> 
> 
> 
> 


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Achim Nierbeck
Hi,

ok, that didn't work out, cause a customized Karaf can't be tested with the
KarafTestSupport class.
Nevertheless it does work now, cause I was missing a couple of those
VMOptions needed. Therefore I needed to add that.

If I now look at the usability for the KarafTestSupport class, in case we
want to make it more usable for anybody having his own custom Karaf,
it needs to be made more modular regarding the configuration.

Thanks, Achim

P.S. a working example can be found here now:
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Exampl-ITest/src/test/java/de/nierbeck/example/vertx/test/CustomVertxKarafTest.java#L91

Am So., 22. Dez. 2019 um 05:34 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi Achim,
>
> Serge reported the same on Unomi.
>
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
> are working fine.
>
> The think I did for JDK9+ is:
>
>
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java#L184
>
> So, if your tests extend KarafTestSupport, it should be straight forward.
> If you don't extend KarafTestsSupport, you have to mimic the configuration.
>
> Regards
> JB
>
> On 21/12/2019 17:39, Achim Nierbeck wrote:
> > Hi,
> >
> > it's one of those days where it's better to just stop for now.
> > Though I've spent quite some time on figuring out, without real success
> > though.
> > Maybe one on the list does have a bright moment to point me into the
> > right direction :)
> > I was working on upgrading the latest dependencies for my karaf+vertx
> > project. [1]
> > And while on it I was trying to build with Java 11. Now what really
> > puzzled me, the Pax-Exam tests all failed because the test container
> > never really started. When trying to start the container alone,
> > everything runs smoothly. Therefore it's something I'm missing with the
> > pax-exam setup.
> > I'd be grateful for any input on where I'm wrong :)
> >
> > Thanks, Achim
> >
> >
> > [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
> >
> > --
> >
> > Apache Member
> > Apache Karaf  Committer & PMC
> > OPS4J Pax Web  Committer
> > & Project Lead
> > blog 
> > Co-Author of Apache Karaf Cookbook 
> >
>
> --
> 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 


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Oliver Lietz
On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
> Hi Achim,

Hi,

> Serge reported the same on Unomi.
> 
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
> are working fine.
> 
> The think I did for JDK9+ is:
> 
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
> apache/karaf/itests/KarafTestSupport.java#L184
> 
> So, if your tests extend KarafTestSupport, it should be straight forward.
> If you don't extend KarafTestsSupport, you have to mimic the configuration.

We have done it similar for Sling:

https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151

And it reminds me to open a PR because the duplication of options in Karaf's 
KarafTestSupport is really ugly.

Regards,
O.

> Regards
> JB
> 
> On 21/12/2019 17:39, Achim Nierbeck wrote:
> > Hi,
> > 
> > it's one of those days where it's better to just stop for now.
> > Though I've spent quite some time on figuring out, without real success
> > though.
> > Maybe one on the list does have a bright moment to point me into the
> > right direction :)
> > I was working on upgrading the latest dependencies for my karaf+vertx
> > project. [1]
> > And while on it I was trying to build with Java 11. Now what really
> > puzzled me, the Pax-Exam tests all failed because the test container
> > never really started. When trying to start the container alone,
> > everything runs smoothly. Therefore it's something I'm missing with the
> > pax-exam setup.
> > I'd be grateful for any input on where I'm wrong :)
> > 
> > Thanks, Achim
> > 
> > 
> > [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11






Re: Problem with features and signatures

2019-12-22 Thread Mike Hummel
Hello JB,

thx for the hint. Yes I'm using features packaging. I will fix it and try again.

Regards
Mike

> On 17. Dec 2019, at 06:35, j...@nanthrax.net wrote:
> 
> Ah I guess you are using features as packaging right ?
> We don't do that, we use pom packaging and karaf-maven-plugin is part of the 
> execution.
> I'm thinking about removing features packaging and change generation to avoid 
> confusion.
> 
> Regards
> JB
> 
> Le 17 déc. 2019 06:32, j...@nanthrax.net a écrit :
> Hi
> 
> As part of release process we do features xml signing so the issue you 
> describe surprises me.
> If you take a look on Central you will see the asc for karaf features and 
> other projects like decanter, camel or cxf (using classifier).
> Do you have a simple pom.xml ? It's maybe a mistake in the configuration.
> 
> Regards
> JB
> 
> Le 16 déc. 2019 23:13, Mike  a écrit :
> Hello,
> 
> if I create a signature on a feature. The sign plugin will create a signature 
> with the wrong name - a xml is missing.
> 
> I created a fix - in the maven signer plugin - and reported it as ticket and 
> pull request. But the people from the plugin told me it's a bug in the karaf 
> maven plugin creating features.
> 
> I'm confused.
> 
> --- quote:
> 
> It could be that you found a bug in Maven, because it is not allowed that 
> main artifacts have classifiers. There might need to be a fix in Maven, but 
> also a fix in ther karaf-maven-plugin. Once that is fixed, this plugin works 
> as expected.
> 
> ---
> 
> Here is the ticket
> 
> https://issues.apache.org/jira/browse/MGPG-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>  
> 
> 
> and more details in the pull request
> 
> https://github.com/apache/maven-gpg-plugin/pull/2#event-2847163553 
> 
> 
> --- description:
> 
> With the current (1.6) version it's not possible to deploy karaf features to 
> the central repository. The following error occurs:
> 
> [ERROR] * Missing Signature: 
> '/de/mhus/osgi/mhu-karaf-feature/1.6.2/mhu-karaf-feature-1.6.2-features.xml.asc'
>  does not exist for 'mhu-karaf-feature-1.6.2-features.xml'.
> 
> The reason is a wrong naming of the signature:
> 
> /de/mhus/osgi/mhu-karaf-feature/1.6.2/mhu-karaf-feature-1.6.2.xml.asc
> 
> The name of the classifier is missing in the name. The fix solve the problem.
> 
> ---
> 
> Any idea what to do now? 
> 
> Thx,
> 
> Mike
> 
> 
> 
> 
>