You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Achim Nierbeck <bc...@googlemail.com> on 2019/12/21 16:39:12 UTC

Custom Karaf + Pax-Exam + Java11

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 <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Re: Custom Karaf + Pax-Exam + Java11

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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é
> <jb@nanthrax.net <ma...@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 <http://karaf.apache.org/> Committer & PMC
>     > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>     Committer
>     > & Project Lead
>     > blog <http://notizblog.nierbeck.de/>
>     > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>     >
> 
>     -- 
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 

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

Re: Custom Karaf + Pax-Exam + Java11

Posted by Achim Nierbeck <bc...@googlemail.com>.
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é <
jb@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 <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> > & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Re: Custom Karaf + Pax-Exam + Java11

Posted by Serge Huber <sh...@apache.org>.
I knew it : Santa is JB :)

cheers,
  Serge...

On Mon, Dec 23, 2019 at 10:40 AM <jb...@nanthrax.net> wrote:

> Yes, or just wait for 4.2.8 planned this week ;)
>
> Regards
> JB
>
> Le 23 déc. 2019 10:26, Serge Huber <sh...@apache.org> a écrit :
>
>
> Ok but if I understand correctly I need to use Karaf 4.2.8-SNAPSHOT to do
> it ?
>
> How do I setup the support for a custom distribution ?
>
> Regards,
>   Serge...
>
> On Sun, Dec 22, 2019 at 5:39 PM Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
> 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 <tel:+41 22 361 3424>
> >
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE <skype:bhillou?add> | LINKEDIN
> > <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.vcf>
> >
> >
> >> JOIN OUR COMMUNITY <http://www.jahia.com/> 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 <ap...@oliverlietz.de> 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é
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>

Re: Custom Karaf + Pax-Exam + Java11

Posted by jb...@nanthrax.net.
Yes, or just wait for 4.2.8 planned this week ;)

  

Regards

JB

  

Le 23 déc. 2019 10:26, Serge Huber <sh...@apache.org> a écrit :  

>  
>

>

> Ok but if I understand correctly I need to use Karaf 4.2.8-SNAPSHOT to do it
?

>

>  
>

>

> How do I setup the support for a custom distribution ?

>

>  
>

>

> Regards,

>

> Serge...

>

>  
>

>

> On Sun, Dec 22, 2019 at 5:39 PM Jean-Baptiste Onofré
<[jb@nanthrax.net](mailto:jb@nanthrax.net)> wrote:  
>

>

>> 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 <tel:+41 22 361 3424>  
>  >  
>  > 9 route des Jeunes | 1227 Acacias | Switzerland  
>  > [jahia.com](http://jahia.com) <<http://www.jahia.com/>>  
>  > SKYPE <skype:bhillou?add> | LINKEDIN  
>  > <<https://www.linkedin.com/in/sergehuber>> | TWITTER  
>  > <<https://twitter.com/sergehuber>> | VCARD  
>  > <<http://www.jahia.com/vcard/HuberSerge.vcf>>  
>  >  
>  >  
>  >> JOIN OUR COMMUNITY <<http://www.jahia.com/>> 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
<[apache@oliverlietz.de](mailto:apache@oliverlietz.de)> 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é  
>  [jbonofre@apache.org](mailto:jbonofre@apache.org)  
>  <http://blog.nanthrax.net>  
>  Talend - <http://www.talend.com>  
>

  


Re: Custom Karaf + Pax-Exam + Java11

Posted by Serge Huber <sh...@apache.org>.
Ok but if I understand correctly I need to use Karaf 4.2.8-SNAPSHOT to do
it ?

How do I setup the support for a custom distribution ?

Regards,
  Serge...

On Sun, Dec 22, 2019 at 5:39 PM Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> 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 <tel:+41 22 361 3424>
> >
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE <skype:bhillou?add> | LINKEDIN
> > <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.vcf>
> >
> >
> >> JOIN OUR COMMUNITY <http://www.jahia.com/> 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 <ap...@oliverlietz.de> 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é
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Custom Karaf + Pax-Exam + Java11

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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 <tel:+41 22 361 3424>
> 
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE <skype:bhillou?add> | LINKEDIN
> <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.vcf>
>   
> 
>> JOIN OUR COMMUNITY <http://www.jahia.com/> 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 <ap...@oliverlietz.de> 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é
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Custom Karaf + Pax-Exam + Java11

Posted by Achim Nierbeck <bc...@googlemail.com>.
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 <sh...@jahia.com>:

> 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 <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.vcf>
>
>
> > JOIN OUR COMMUNITY <http://www.jahia.com/> 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 <ap...@oliverlietz.de> 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 <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Re: Custom Karaf + Pax-Exam + Java11

Posted by Serge Huber <sh...@jahia.com>.
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 <ap...@oliverlietz.de> 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

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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é
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Custom Karaf + Pax-Exam + Java11

Posted by Oliver Lietz <ap...@oliverlietz.de>.
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

Posted by Jean-Baptiste Onofré <jb...@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 <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 

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