Re: [REMINDER] Avoid SNAPSHOT when possible

2018-07-05 Thread Jean-Baptiste Onofré
Hi Steinar,

you have to change your import package version range as Karaf 4.2.x now
use Pax Web 7.x.

Your import is:

org.ops4j.pax.web.service;version="[6.0,7)"

it should be:

org.ops4j.pax.web.service;version="[6,8)"

Regards
JB

On 05/07/2018 20:44, Steinar Bang wrote:
>> Jean-Baptiste Onofré :
> 
>> just a little reminder: when possible, please avoid to use SNAPSHOT in
>> dependency (or only on PR, not merged on master).
> 
>> SNAPSHOT dependencies breaks the build and so Karaf SNAPSHOTs are not
>> deployed anymore.
>> It also block release as we can't release project containing SNAPSHOT
>> dependencies.
> 
>> For instance, we did a commit on master this morning upgrading to
>> Easymock 3.7-SNAPSHOT (to be able to build with Java 10/11), and Jenkins
>> is broken (also local build).
> 
>> I will fix that, but, please, keep in mind to avoid SNAPSHOT
>> dependencies when possible.
> 
> Ah... I tried my app today for the first time on 4.2.0, specifically
> this branch (where all the current work takes place):
>  https://github.com/steinarb/ukelonn/tree/using-react
> 
> The app was built with karaf-maven-plugin 4.1.2, and pax exam karaf
> 4.1.2 integration tests, and running fine on 4.1.5.
> 
> But one of the bundles refused to load on karaf 4.2.0, complaining about
> a missing dependency that already was satisfied for another bundle.
> 
> I'm building with maven version 1.0.0-SNAPSHOT, so I'm wondering if that
> is the reason for the failure?
> 
> Here are the karaf console commads that led up to the error (requires
> cloning and building the above repo):
> 
> karaf@root()> feature:repo-add 
> mvn:no.priv.bang.ukelonn/karaf/LATEST/xml/features
> Adding feature url mvn:no.priv.bang.ukelonn/karaf/LATEST/xml/features
> karaf@root()> feature:install ukelonn-db-derby-test
> karaf@root()> feature:install ukelonn
> org.osgi.service.resolver.ResolutionException: Unable to resolve root: 
> missing requirement [root] osgi.identity; osgi.identity=ukelonn; 
> type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
> filter:="(&(osgi.identity=ukelonn)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
>  [caused by: Unable to resolve ukelonn/1.0.0.SNAPSHOT: missing requirement 
> [ukelonn/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.ukelonn; 
> type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
> resolution:=mandatory [caused by: Unable to resolve 
> no.priv.bang.ukelonn/1.0.0.SNAPSHOT: missing requirement 
> [no.priv.bang.ukelonn/1.0.0.SNAPSHOT] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=org.ops4j.pax.web.service)(version>=6.0.0)(!(version>=7.0.0)))"]]
> at 
> org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
> at 
> org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
> at 
> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
> at 
> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:331)
> at 
> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:248)
> at 
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
> at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
> at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Error executing command: Unable to resolve root: missing requirement [root] 
> osgi.identity; osgi.identity=ukelonn; type=karaf.feature; 
> version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
> filter:="(&(osgi.identity=ukelonn)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
>  [caused by: Unable to resolve ukelonn/1.0.0.SNAPSHOT: missing requirement 
> [ukelonn/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.ukelonn; 
> type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
> resolution:=mandatory [caused by: Unable to resolve 
> no.priv.bang.ukelonn/1.0.0.SNAPSHOT: missing requirement 
> [no.priv.bang.ukelonn/1.0.0.SNAPSHOT] osgi.wiring.package; 
> filter:="(&(osgi.wiring.package=org.ops4j.pax.web.service)(version>=6.0.0)(!(version>=7.0.0)))"]]
> karaf@root()>
> 
> 
> The no.priv.bang.ukelonn package is exported by this bundle:
>  https://github.com/steinarb/ukelonn/tree/using-react/ukelonn.api
> 
> The package is exported with version 1.0.0, in the bundle's manifest.mf:
> 
> Export-Package: no.priv.bang.ukelonn;uses:="org.osgi.service.log";vers
>  ion="1.0.0"
> 
> 
> This bundle doesn't complain about a missing package
>  

Re: [REMINDER] Avoid SNAPSHOT when possible

2018-07-05 Thread Steinar Bang
> Jean-Baptiste Onofré :

> just a little reminder: when possible, please avoid to use SNAPSHOT in
> dependency (or only on PR, not merged on master).

> SNAPSHOT dependencies breaks the build and so Karaf SNAPSHOTs are not
> deployed anymore.
> It also block release as we can't release project containing SNAPSHOT
> dependencies.

> For instance, we did a commit on master this morning upgrading to
> Easymock 3.7-SNAPSHOT (to be able to build with Java 10/11), and Jenkins
> is broken (also local build).

> I will fix that, but, please, keep in mind to avoid SNAPSHOT
> dependencies when possible.

Ah... I tried my app today for the first time on 4.2.0, specifically
this branch (where all the current work takes place):
 https://github.com/steinarb/ukelonn/tree/using-react

The app was built with karaf-maven-plugin 4.1.2, and pax exam karaf
4.1.2 integration tests, and running fine on 4.1.5.

But one of the bundles refused to load on karaf 4.2.0, complaining about
a missing dependency that already was satisfied for another bundle.

I'm building with maven version 1.0.0-SNAPSHOT, so I'm wondering if that
is the reason for the failure?

Here are the karaf console commads that led up to the error (requires
cloning and building the above repo):

karaf@root()> feature:repo-add 
mvn:no.priv.bang.ukelonn/karaf/LATEST/xml/features
Adding feature url mvn:no.priv.bang.ukelonn/karaf/LATEST/xml/features
karaf@root()> feature:install ukelonn-db-derby-test
karaf@root()> feature:install ukelonn
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing 
requirement [root] osgi.identity; osgi.identity=ukelonn; type=karaf.feature; 
version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
filter:="(&(osgi.identity=ukelonn)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
 [caused by: Unable to resolve ukelonn/1.0.0.SNAPSHOT: missing requirement 
[ukelonn/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.ukelonn; 
type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
resolution:=mandatory [caused by: Unable to resolve 
no.priv.bang.ukelonn/1.0.0.SNAPSHOT: missing requirement 
[no.priv.bang.ukelonn/1.0.0.SNAPSHOT] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.ops4j.pax.web.service)(version>=6.0.0)(!(version>=7.0.0)))"]]
at 
org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
at 
org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:331)
at 
org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:248)
at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Error executing command: Unable to resolve root: missing requirement [root] 
osgi.identity; osgi.identity=ukelonn; type=karaf.feature; 
version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
filter:="(&(osgi.identity=ukelonn)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
 [caused by: Unable to resolve ukelonn/1.0.0.SNAPSHOT: missing requirement 
[ukelonn/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.ukelonn; 
type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
resolution:=mandatory [caused by: Unable to resolve 
no.priv.bang.ukelonn/1.0.0.SNAPSHOT: missing requirement 
[no.priv.bang.ukelonn/1.0.0.SNAPSHOT] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.ops4j.pax.web.service)(version>=6.0.0)(!(version>=7.0.0)))"]]
karaf@root()>


The no.priv.bang.ukelonn package is exported by this bundle:
 https://github.com/steinarb/ukelonn/tree/using-react/ukelonn.api

The package is exported with version 1.0.0, in the bundle's manifest.mf:

Export-Package: no.priv.bang.ukelonn;uses:="org.osgi.service.log";vers
 ion="1.0.0"


This bundle doesn't complain about a missing package
 https://github.com/steinarb/ukelonn/tree/using-react/ukelonn.bundle.db.test

Here's the import in the bundle's manifest.mf:

Import-Package: javax.sql,liquibase;version="[3.5,4)",liquibase.change
 log;version="[3.5,4)",liquibase.database;version="[3.5,4)",liquibase.
 database.jvm;version="[3.5,4)",liquibase.resource;version="[3.5,4)",n
 o.priv.bang.ukelonn;version="[1.0,2)",no.priv.bang.ukelonn.bundle.db.
 liquibase;version="[1.0,2)",org.osgi.service.jdbc;version="[1.0,2)",o
 

Re: [REMINDER] Avoid SNAPSHOT when possible

2018-07-05 Thread Jean-Baptiste Onofré
Thanks Freeman and not a problem at all !

I downgraded to Easymock 3.6 and created the Jira to track the update
when available.

Regards
JB

On 05/07/2018 13:44, Freeman Fang wrote:
> Hi JB,
> 
> Sorry I introduced the easy mock SNAPSHOT. Per the discussion here[1], 
> easymock 3.7 release which can work with JDK11 should not be far.
> 
> Anyway, we can downgrade to easymock 3.6 so far while waiting for easymock 
> 3.7 release. Though this will cause VerifyMojoTest failed with JDK11, I will 
> add a profile to disable this test with JDK11 until we have easymock 3.7 
> available.
> 
> Btw, could we also have CI build for master using JDK10 and JDK11; therefore 
> we can catch any test failure in the first time.
> [1]https://github.com/easymock/easymock/issues/218 
> 
> 
> Cheers
> -
> Freeman(Yue) Fang
> 
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
> 
> 
> 
>> On Jul 5, 2018, at 4:50 PM, Jean-Baptiste Onofré  wrote:
>>
>> Hi guys,
>>
>> just a little reminder: when possible, please avoid to use SNAPSHOT in
>> dependency (or only on PR, not merged on master).
>>
>> SNAPSHOT dependencies breaks the build and so Karaf SNAPSHOTs are not
>> deployed anymore.
>> It also block release as we can't release project containing SNAPSHOT
>> dependencies.
>>
>> For instance, we did a commit on master this morning upgrading to
>> Easymock 3.7-SNAPSHOT (to be able to build with Java 10/11), and Jenkins
>> is broken (also local build).
>>
>> I will fix that, but, please, keep in mind to avoid SNAPSHOT
>> dependencies when possible.
>>
>> Thanks !
>> Regards
>> JB
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 
> 

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


Re: [REMINDER] Avoid SNAPSHOT when possible

2018-07-05 Thread Freeman Fang
Hi JB,

Sorry I introduced the easy mock SNAPSHOT. Per the discussion here[1], easymock 
3.7 release which can work with JDK11 should not be far.

Anyway, we can downgrade to easymock 3.6 so far while waiting for easymock 3.7 
release. Though this will cause VerifyMojoTest failed with JDK11, I will add a 
profile to disable this test with JDK11 until we have easymock 3.7 available.

Btw, could we also have CI build for master using JDK10 and JDK11; therefore we 
can catch any test failure in the first time.
[1]https://github.com/easymock/easymock/issues/218 


Cheers
-
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



> On Jul 5, 2018, at 4:50 PM, Jean-Baptiste Onofré  wrote:
> 
> Hi guys,
> 
> just a little reminder: when possible, please avoid to use SNAPSHOT in
> dependency (or only on PR, not merged on master).
> 
> SNAPSHOT dependencies breaks the build and so Karaf SNAPSHOTs are not
> deployed anymore.
> It also block release as we can't release project containing SNAPSHOT
> dependencies.
> 
> For instance, we did a commit on master this morning upgrading to
> Easymock 3.7-SNAPSHOT (to be able to build with Java 10/11), and Jenkins
> is broken (also local build).
> 
> I will fix that, but, please, keep in mind to avoid SNAPSHOT
> dependencies when possible.
> 
> Thanks !
> Regards
> JB
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com