Hi

I added a profile to run the karaf 4 validator.

davsclaus:~/workspace/camel/platforms/karaf/features (master)/$ mvn
-Pvalidate-karaf4

But then it does not do anything, it just runs quick.

[INFO] --- karaf-maven-plugin:4.0.4:verify (validate) @ apache-camel ---
[INFO] Using repositories:
http://repository.springsource.com/maven/bundles/release@id=com.springsource.repository.bundles.release@snapshots,http://repository.springsource.com/maven/bundles/external@id=com.springsource.repository.bundles.external@snapshots,http://repository.apache.org/snapshots/@id=apache.snapshots@noreleases@snapshots,https://repo.maven.apache.org/maven2@id=central
[INFO]
[INFO] --- maven-site-plugin:3.4:attach-descriptor (attach-descriptor)
@ apache-camel ---



But if you run the karaf 2.x version, eg just with

mvn -Pvalidate

it does all the full validation. But it currently fails due a pax-cdi
JAR is not released and there is a mistake in their feature xml file.
There is a JIRA logged
https://issues.apache.org/jira/browse/CAMEL-9701

You can remove the pax-cdi bits from the camel features xml file and
then the validator can continue and hit other issues.


I wonder if gnodet you can look at how to get the karaf 4 validator to work?



On Mon, Mar 14, 2016 at 11:30 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> On Mon, Mar 14, 2016 at 11:25 AM, Guillaume Nodet <gno...@apache.org> wrote:
>> 2016-03-14 11:10 GMT+01:00 Claus Ibsen <claus.ib...@gmail.com>:
>>
>>> On Mon, Mar 14, 2016 at 11:01 AM, Guillaume Nodet <gno...@apache.org>
>>> wrote:
>>> > 2016-03-14 10:53 GMT+01:00 Claus Ibsen <claus.ib...@gmail.com>:
>>> >
>>> >> Hi
>>> >>
>>> >> Unfortunately pax-exam seems a bit unstable. What I have noticed is
>>> >> that if you run the tests
>>> >>
>>> >> cd tests/camel-itest-karaf
>>> >> mvn clean install -Pkaraf4
>>> >>
>>> >> then it cannot test camel features that install bundles using the
>>> >> "wrap" protocol. You get a protocol not supported exception. But it
>>> >> install the wrap feature when it runs the tests. And it does not help
>>> >> adding "wrap" as a feature yourself.
>>> >>
>>> >> So skipping those 20 or so camel features with wrap should allow to
>>> >> run the others tests. But after testing 20+ or so then it just fails
>>> >> without any good error why, and leave 5+ or JVMs hanging. So you need
>>> >> to manually kill those karaf jvms. That is why I added that
>>> >> kill-karaf.sh script.
>>> >>
>>> >> So if you find out the test it was doing last, and manually start
>>> >> karaf and install the feature it works fine. So there is no "hint" why
>>> >> it failed/crashed the tests.
>>> >>
>>> >>
>>> >> Also the feature validation plugin of karaf is buggy. In Karaf 4.x the
>>> >> plugin goal is missing. It was there on 2.x and 3.x. I have logged a
>>> >> KARAF ticket. But it may be that the feature validation plugin is also
>>> >> buggy and cannot run to completion either.
>>> >>
>>> >
>>> > Which ticket ?
>>> >
>>>
>>> https://issues.apache.org/jira/browse/KARAF-4415
>>
>>
>> Yeah, this goal does not exist anymore.  It has been superseded by the
>> verify goal in Karaf 4.x
>> I can do a migration to Karaf 4, but do you still to support older karaf
>> versions ?
>> There's multiple options:
>>   * keep camel compatible with karaf 2.x, 3.x, 4.x (the way it is, i.e. you
>> can't benefit from karaf 4 new features)
>>   * upgrade to 4.x and loose compatibility with 2.x and 3.x
>>   * duplicate the integration code to support 2.x and 3.x with the current
>> code, and a new integration for 4.x
>>
>> I raised a JIRA some time ago (CAMEL-9622
>> <https://issues.apache.org/jira/browse/CAMEL-9622>) which I can work on at
>> the same time for option #2 or #3.
>>
>
> Camel 2.17 is the last release to support karaf 2.x. So lets keep this
> as is. Maybe add a -Pvalidate-karaf4 as profile to run validation with
> the karaf 4 plugin and goal.
>
> For Camel 2.18 we can fully migrate to karaf. So maybe its worth just
> wait for 2.17 to be released as-is, and just do a bit of manually
> testing in karaf 2.4 / 3.x and 4.x containers to see if the features
> can install and work well enough.
>
>
>>
>>>
>>>
>>>
>>> >
>>> >>
>>> >> So people who are using osgi and karaf, step up to the plate and test
>>> >> the Camel master branch source code.
>>> >> And get the pax-exam and karaf guys to help fix pax-exam so it can run
>>> >> those tests reliable.
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> On Sat, Mar 12, 2016 at 1:53 PM, Claus Ibsen <claus.ib...@gmail.com>
>>> >> wrote:
>>> >> > Hi
>>> >> >
>>> >> > I have worked on improving the installation of Camel on Karaf to make
>>> >> > it rely on newer versions of Spring. It could install and use the old
>>> >> > spring 3.x libraries which was annoying when the entire world is using
>>> >> > Spring 4.2 or 4.1 etc.
>>> >> >
>>> >> > So what I have done
>>> >> >
>>> >> > a)
>>> >> > feature:install camel
>>> >> >
>>> >> > will only install camel-core and camel-blueprint. camel-spring is not
>>> >> > longer installed by default as camel-spring uses spring-dm which loads
>>> >> > in Spring 3.2.x.
>>> >> > spring-dm is deprecated, and we want in Camel 2.18 to move spring-dm
>>> >> > out of camel-spring into a new camel-spring-dm module. Then the
>>> >> > camel-spring module can be a spring 4.x only.
>>> >> >
>>> >> > b)
>>> >> > other features that uses spring libraries are not installing
>>> >> > camel-spring but instead using the spring features from karaf. That
>>> >> > helps to use the current spring version and not install spring 3.x due
>>> >> > to camel-spring bring that in due dm (see a)
>>> >> >
>>> >> > c)
>>> >> > make some of the camel-spring-xxx modules that requires spring 4.x to
>>> >> > have proper version range in the osgi manifest so they can be
>>> >> > installed reliable and use spring 4.x as intended.
>>> >> >
>>> >> > d)
>>> >> > The used spring-range is [4.1,5) which mean it supports the default
>>> >> > spring version that karaf install in karaf 2.4 / 3.x and 4.x all
>>> >> > together. However in Camel 2.18 we change this to [4.2,5) as we drop
>>> >> > support for both spring 4.0 and 4.1 all together.
>>> >> >
>>> >> > e)
>>> >> > I got the tests/camel-itest-karaf to work again - after much hard
>>> work.
>>> >> > You can run the tests against 3 different karaf containers
>>> >> >
>>> >> > mvn clean install
>>> >> > mvn clean install -Pkaraf3
>>> >> > mvn clean install -Pkaraf4
>>> >> >
>>> >> > We will in Camel 2.18 drop support for karaf 2.4.x and (maybe 3.x
>>> >> > also) and make those tests use karaf 4 by default.
>>> >> >
>>> >> >
>>> >> >
>>> >> > Any Karaf users with Camel. Its your chance to help testing and
>>> >> > provide feedback.
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Claus Ibsen
>>> >> > -----------------
>>> >> > http://davsclaus.com @davsclaus
>>> >> > Camel in Action 2: https://www.manning.com/ibsen2
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Claus Ibsen
>>> >> -----------------
>>> >> http://davsclaus.com @davsclaus
>>> >> Camel in Action 2: https://www.manning.com/ibsen2
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > ------------------------
>>> > Guillaume Nodet
>>> > ------------------------
>>> > Red Hat, Open Source Integration
>>> >
>>> > Email: gno...@redhat.com
>>> > Web: http://fusesource.com
>>> > Blog: http://gnodet.blogspot.com/
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2: https://www.manning.com/ibsen2
>>>
>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gno...@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to