Re: karaf-maven-plugin:verify and sun internal requirements

2022-04-28 Thread Jean-Baptiste Onofré
Hi Ben,

What features repos/features are you using in the karaf-maven-plugin
configuration ?

Regards
JB

On Thu, Apr 28, 2022 at 4:56 PM ran...@opennms.org 
wrote:

> I’m attempting to use karaf-maven-plugin:verify to verify our features
> files.
>
>
>
> They load just fine at runtime, but the verify plugin fails on:
>
> *missing requirement [de.ruedigermoeller.fst/2.57.0] osgi.wiring.package;
> filter:="(osgi.wiring.package=sun.nio.ch )"*
>
> The sun.nio package doesn’t even appear to be defined in jre.properties,
> so I’m not sure if it’s just something that’s normally inferred from the
> runtime environment without any configuration, but I can’t seem to figure
> out how to make verify accept it without forking fst and making my own
> fixes to their manifest.
>
> Any ideas how to deal with this without doing something hacky like
> shading? I tried wrap: on the fst bundle to override the Import-Package,
> but I guess wrap must not do anything if there’s already valid bundle
> metadata.
>
>
>
> Thanks,
>
> Ben
>
>
>
>
>
> --
>
> *Benjamin Reed* *(he/him)*
> *Principal Software Engineer* *|* Raleigh, NC
> [image: signature_598361874]
>
>
>


Re: Experimenting with Karaf 5

2022-04-28 Thread Jean-Baptiste Onofré
Hi Matteo,

You have two approaches to implement what you propose:
- Karaf 4 style deployed in Karaf5: K5 OSGi application manager will
deploy the Karaf4 features service, and so you can use the same thing
as in K4. You will see K4 distribution in K5 doing that.
- Karaf 5 style, you implement your own K5 SPI
- you use another approach like CDI, Spring Boot

I'm going to push K5 as a branch on the main Karaf repo. Anyway, you
can submit your example directly on https://github.com/jbonofre/karaf5
(in an example module for instance)

If you want, we can have a chat together about that.

Thanks for your help anyway !

Regards
JB

On Thu, Apr 28, 2022 at 6:59 PM Matteo Rulli  wrote:
>
> Hello,
>
> I would like to start playing with Karaf5, waiting for the official RC... 
> With the final goal of migrating a few OSGi 3-tier projects (Hibernate, 
> Declarative Services, Apache CXF REST) to Karaf-5 my idea is:
> - Put together a very trivial JPA+CXF project using "Karaf-JPA-example" and 
> "Karaf-rest-example" in Karaf's examples module
> - Create a feature for the complete "demo application"
> - Run this application in Karaf-5, deploying the application feature.
>
> The lesson learned will be used in the actual migration process. Before I 
> start working head-down on this, I would like your advice: is this approach 
> going to work with Karaf 5? Or is there any evident show-stopper I should be 
> aware?
>
> Many thanks for your help.
>
> Best regards,
> Matteo


Experimenting with Karaf 5

2022-04-28 Thread Matteo Rulli
Hello,

I would like to start playing with Karaf5, waiting for the official RC... With 
the final goal of migrating a few OSGi 3-tier projects (Hibernate, Declarative 
Services, Apache CXF REST) to Karaf-5 my idea is:
- Put together a very trivial JPA+CXF project using "Karaf-JPA-example" and 
"Karaf-rest-example" in Karaf's examples module
- Create a feature for the complete "demo application"
- Run this application in Karaf-5, deploying the application feature.

The lesson learned will be used in the actual migration process. Before I start 
working head-down on this, I would like your advice: is this approach going to 
work with Karaf 5? Or is there any evident show-stopper I should be aware?

Many thanks for your help.

Best regards,
Matteo

karaf-maven-plugin:verify and sun internal requirements

2022-04-28 Thread ran...@opennms.org
I’m attempting to use karaf-maven-plugin:verify to verify our features files.

They load just fine at runtime, but the verify plugin fails on:

missing requirement [de.ruedigermoeller.fst/2.57.0] osgi.wiring.package; 
filter:="(osgi.wiring.package=sun.nio.ch)"

The sun.nio package doesn’t even appear to be defined in jre.properties, so I’m 
not sure if it’s just something that’s normally inferred from the runtime 
environment without any configuration, but I can’t seem to figure out how to 
make verify accept it without forking fst and making my own fixes to their 
manifest.

Any ideas how to deal with this without doing something hacky like shading? I 
tried wrap: on the fst bundle to override the Import-Package, but I guess wrap 
must not do anything if there’s already valid bundle metadata.

Thanks,
Ben


--
Benjamin Reed (he/him)
Principal Software Engineer | Raleigh, NC
[signature_598361874]



Re: karaf-maven-plugin and version ranges

2022-04-28 Thread Jean-Baptiste Onofré
Hi Bengt,

Thanks, I saw the Jira. Thanks ! I will work on it asap.

Regards
JB

On Thu, Apr 28, 2022 at 3:33 PM Bengt Rodehav  wrote:
>
> I created this issue:
>
> https://issues.apache.org/jira/browse/KARAF-7428
>
> /Bengt
>
> Den mån 25 apr. 2022 kl 10:47 skrev Jean-Baptiste Onofré :
>>
>> Hi Bengt,
>>
>> Unfortunately, I missed this one. Can you please create a Jira like
>> "version range on Windows" quickly describing the problem ? I won't
>> miss this time like this, I promise ;)
>>
>> Regards
>> JB
>>
>> On Mon, Apr 25, 2022 at 10:22 AM Bengt Rodehav  wrote:
>> >
>> > Hello JB,
>> >
>> > I noticed that you have now released Karaf 4.4.0. Did you get a chance to 
>> > look at this issue?
>> >
>> > /Bengt
>> >
>> > Den tors 24 mars 2022 kl 13:32 skrev Bengt Rodehav :
>> >>
>> >> OK - thanks,
>> >>
>> >> /Bengt
>> >>
>> >> Den ons 23 mars 2022 kl 07:19 skrev Jean-Baptiste Onofré 
>> >> :
>> >>>
>> >>> Hi
>> >>>
>> >>> Not yet, I will as part of 4.4.0 release preparation.
>> >>> I will keep you posted soon.
>> >>>
>> >>> Regards
>> >>> JB
>> >>>
>> >>> On Tue, Mar 22, 2022 at 5:30 PM Bengt Rodehav  wrote:
>> >>> >
>> >>> > Did you have a chance to test this on Windows JB?
>> >>> >
>> >>> > /Bengt
>> >>> >
>> >>> > Den fre 11 mars 2022 kl 17:17 skrev Bengt Rodehav :
>> >>> >>
>> >>> >> OK - thanks.
>> >>> >>
>> >>> >> /Bengt
>> >>> >>
>> >>> >> Den fre 11 mars 2022 kl 15:53 skrev Jean-Baptiste Onofré 
>> >>> >> :
>> >>> >>>
>> >>> >>> Hi
>> >>> >>>
>> >>> >>> I think it’s more Karaf-maven-plugin issue/use on windows.
>> >>> >>>
>> >>> >>> We don’t have such issue on Unix. Let me try on Windows vm.
>> >>> >>>
>> >>> >>> Regards
>> >>> >>> JB
>> >>> >>>
>> >>> >>> Le ven. 11 mars 2022 à 15:38, Bengt Rodehav  a 
>> >>> >>> écrit :
>> >>> 
>> >>>  Do you think this is a Camel problem? The more I think about it I 
>> >>>  wonder how it could ever work having a version range in the 
>> >>>  repository tag like that. Doesn't it have to be a specific version 
>> >>>  since it identifies a repository to be searched for artifacts?
>> >>> 
>> >>>  /Bengt
>> >>> 
>> >>>  Den fre 11 mars 2022 kl 09:23 skrev Bengt Rodehav 
>> >>>  :
>> >>> >
>> >>> > Yes, that's correct.
>> >>> >
>> >>> > /Bengt
>> >>> >
>> >>> > Den tors 10 mars 2022 kl 18:55 skrev Jean-Baptiste Onofré 
>> >>> > :
>> >>> >>
>> >>> >> Hi Bengt,
>> >>> >>
>> >>> >> I guess you are on Windows right ?
>> >>> >>
>> >>> >> Regards
>> >>> >> JB
>> >>> >>
>> >>> >> On Thu, Mar 10, 2022 at 3:56 PM Bengt Rodehav  
>> >>> >> wrote:
>> >>> >>>
>> >>> >>> I use Karaf 4.3.6 and I'm trying to upgrade our Camel version to 
>> >>> >>> the latest (2.14.2). It turns out I get a problem with 
>> >>> >>> karaf-maven-plugin, goal features-add-to-repository.
>> >>> >>>
>> >>> >>> The new Karaf feature descriptor for Camel now starts with the 
>> >>> >>> following three lines:
>> >>> >>>
>> >>> >>>   
>> >>> >>> mvn:org.apache.cxf.karaf/apache-cxf/[3.4,3.4]/xml/features
>> >>> >>>   
>> >>> >>> mvn:org.ops4j.pax.cdi/pax-cdi-features/[1,2)/xml/features
>> >>> >>>   
>> >>> >>> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/[6.2,6.3)/xml/features
>> >>> >>>
>> >>> >>> But this causes the karaf-maven-plugin to try to download a file 
>> >>> >>> called 
>> >>> >>> "org/apache/cxf/karaf/apache-cxf/%5B3.4,3.4%5D/apache-cxf-%5B3.4,3.4%5D-features.xml"
>> >>> >>>  which of course fails.
>> >>> >>>
>> >>> >>> Is this a problem with the karaf-maven-plugin or with Camel's 
>> >>> >>> karaf feature descriptor?
>> >>> >>>
>> >>> >>> If I comment out the above three lines it seems to work (it 
>> >>> >>> builds anyway - haven't actually tested it yet).
>> >>> >>>
>> >>> >>> /Bengt


Re: karaf-maven-plugin and version ranges

2022-04-28 Thread Bengt Rodehav
I created this issue:

https://issues.apache.org/jira/browse/KARAF-7428

/Bengt

Den mån 25 apr. 2022 kl 10:47 skrev Jean-Baptiste Onofré :

> Hi Bengt,
>
> Unfortunately, I missed this one. Can you please create a Jira like
> "version range on Windows" quickly describing the problem ? I won't
> miss this time like this, I promise ;)
>
> Regards
> JB
>
> On Mon, Apr 25, 2022 at 10:22 AM Bengt Rodehav  wrote:
> >
> > Hello JB,
> >
> > I noticed that you have now released Karaf 4.4.0. Did you get a chance
> to look at this issue?
> >
> > /Bengt
> >
> > Den tors 24 mars 2022 kl 13:32 skrev Bengt Rodehav :
> >>
> >> OK - thanks,
> >>
> >> /Bengt
> >>
> >> Den ons 23 mars 2022 kl 07:19 skrev Jean-Baptiste Onofré <
> j...@nanthrax.net>:
> >>>
> >>> Hi
> >>>
> >>> Not yet, I will as part of 4.4.0 release preparation.
> >>> I will keep you posted soon.
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On Tue, Mar 22, 2022 at 5:30 PM Bengt Rodehav 
> wrote:
> >>> >
> >>> > Did you have a chance to test this on Windows JB?
> >>> >
> >>> > /Bengt
> >>> >
> >>> > Den fre 11 mars 2022 kl 17:17 skrev Bengt Rodehav  >:
> >>> >>
> >>> >> OK - thanks.
> >>> >>
> >>> >> /Bengt
> >>> >>
> >>> >> Den fre 11 mars 2022 kl 15:53 skrev Jean-Baptiste Onofré <
> j...@nanthrax.net>:
> >>> >>>
> >>> >>> Hi
> >>> >>>
> >>> >>> I think it’s more Karaf-maven-plugin issue/use on windows.
> >>> >>>
> >>> >>> We don’t have such issue on Unix. Let me try on Windows vm.
> >>> >>>
> >>> >>> Regards
> >>> >>> JB
> >>> >>>
> >>> >>> Le ven. 11 mars 2022 à 15:38, Bengt Rodehav  a
> écrit :
> >>> 
> >>>  Do you think this is a Camel problem? The more I think about it I
> wonder how it could ever work having a version range in the repository tag
> like that. Doesn't it have to be a specific version since it identifies a
> repository to be searched for artifacts?
> >>> 
> >>>  /Bengt
> >>> 
> >>>  Den fre 11 mars 2022 kl 09:23 skrev Bengt Rodehav <
> be...@rodehav.com>:
> >>> >
> >>> > Yes, that's correct.
> >>> >
> >>> > /Bengt
> >>> >
> >>> > Den tors 10 mars 2022 kl 18:55 skrev Jean-Baptiste Onofré <
> j...@nanthrax.net>:
> >>> >>
> >>> >> Hi Bengt,
> >>> >>
> >>> >> I guess you are on Windows right ?
> >>> >>
> >>> >> Regards
> >>> >> JB
> >>> >>
> >>> >> On Thu, Mar 10, 2022 at 3:56 PM Bengt Rodehav <
> be...@rodehav.com> wrote:
> >>> >>>
> >>> >>> I use Karaf 4.3.6 and I'm trying to upgrade our Camel version
> to the latest (2.14.2). It turns out I get a problem with
> karaf-maven-plugin, goal features-add-to-repository.
> >>> >>>
> >>> >>> The new Karaf feature descriptor for Camel now starts with the
> following three lines:
> >>> >>>
> >>> >>>
>  
> mvn:org.apache.cxf.karaf/apache-cxf/[3.4,3.4]/xml/features
> >>> >>>
>  
> mvn:org.ops4j.pax.cdi/pax-cdi-features/[1,2)/xml/features
> >>> >>>
>  
> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/[6.2,6.3)/xml/features
> >>> >>>
> >>> >>> But this causes the karaf-maven-plugin to try to download a
> file called
> "org/apache/cxf/karaf/apache-cxf/%5B3.4,3.4%5D/apache-cxf-%5B3.4,3.4%5D-features.xml"
> which of course fails.
> >>> >>>
> >>> >>> Is this a problem with the karaf-maven-plugin or with Camel's
> karaf feature descriptor?
> >>> >>>
> >>> >>> If I comment out the above three lines it seems to work (it
> builds anyway - haven't actually tested it yet).
> >>> >>>
> >>> >>> /Bengt
>