Re: [osgi-dev] Building a "profile" system with declarative services and configuration admin?

2017-03-13 Thread Daghan ACAY
Thanks for your comments. I agree the last one was an edge case and not very 
useful in practical scenarios. It was only question to understand life cycle in 
a better way and not abuse it unnecessarily.

Regards
- Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Monday, March 13, 2017 07:25 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Building a "profile" system with declarative services 
and configuration admin?

On 13 Mar 2017, at 12:57, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi peter,

As a clarification, i can see this design allows multiple ProfileRunner 
instances (actually as  many as IRCProfile configurations) at runtime where 
each ProfileRunner has zero or more IRFfilters whose properties obeys the LDAP 
filter defined by the filters_target value. Now for each ProfileRunner instance 
filters_target value can be configured at runtime through web console or 
@ConfigurerExtender using filters.target in json. Am i right?

Yes

My second clarification is about life cycle of ProfileRunner. If i change the 
IRCProfile configuration of an existing ProfileRunner instance then that 
instance will be recreated and IRFFilters will be injected to the newly created 
instance. Am i right?

Yes

Now two tricky ones.

1- if we had defined configuration for IRFFilter as you have suggested and 
assume we have for a single IRFFilter component e.g "filter=log". Again assume 
this IRFFilter instance  is already injected to one of the existing 
ProfileRunner instance. If i change the IRFFilter component’s property to 
"filter=uppercase", is this IRFFilter removed from the List without 
destroying the existing ProfileRunner instance?

Yes because it is a volatile list. This makes the reference dynamic


2- If you had @updated method defined for ProfileRunner and changed the 
filters_target value for an existing ProfileRunner instance from 
(filter=uppercase) to (filter=log), what happens to the List member, 
are they refreshed according to the new filters_target value, without 
destroying the existing ProfileRunner instance?

I expect they should be updated dynamically but I am not a 100% sure about it. 
And if I felt this was an important distinction I might read through the spec, 
but to be honest, who cares? I would never optimize a system to prevent an 
object from being recreated until I had a real problem. Recreating an object 
works very nice and imho has hardly any consequences in a well designed OSGi 
system.

Kind regards,

Peter Kriens



Thanks in advance.

-daghan


Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: list+org.o...@io7m.com<mailto:list+org.o...@io7m.com>
Sent: Monday, March 13, 2017 03:05 PM
To: Peter Kriens mailto:peter.kri...@aqute.biz>>
Subject: Re: [osgi-dev] Building a "profile" system with declarative services 
and configuration admin?
CC: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>

On 2017-03-13T09:03:49 +0100
Peter Kriens mailto:peter.kri...@aqute.biz>> wrote:

> Just use configuration admin. So first define your profile configuration:
>
>@ObjectClassDefinition
>@interface IRCProfile {
>String username();
>String password();
>String host();
>String filters_target() default “(filter=uppercase)“;
>}
>
> You then create a a runner that does the work:
>
>@Designate( ocd= IRCProfile.class, factory=true )
>@Component(service=ProfileRunner.class)
>public class ProfileRunner {
>
>@Reference
>volatile List filters;
>
>@Activate
>void activate( IRCProfile profile ) {
>…
>// start a thread?
>}
>
>}
>
> This runner can now be created as many times as you want with WebConsole. 
> Each configuration you create is automatically cause a ProfileRunner to be 
> instantiated when its filters are registered. The filters are coupled to the 
> component via the `filters.target` configuration field. The default currently 
> shows that it needs the ‘uppercase’ filter. However, with the or (|) operator 
> you can make it any number of filters: (|(filter=uppercase)(filter=log)). If 
> you need ordering in the filters, use the service.ranking property on the 
> filter components.
>
> You can now make any number of filters that look like:
>
>@Component( property={“filter=uppercase”, “service.ranking=-100”})
>public class UpperCaseFilter implements IRCFilterType {
>
>String 

Re: [osgi-dev] Building a "profile" system with declarative services and configuration admin?

2017-03-13 Thread Daghan ACAY
Hi peter,

As a clarification, i can see this design allows multiple ProfileRunner 
instances (actually as  many as IRCProfile configurations) at runtime where 
each ProfileRunner has zero or more IRFfilters whose properties obeys the LDAP 
filter defined by the filters_target value. Now for each ProfileRunner instance 
filters_target value can be configured at runtime through web console or 
@ConfigurerExtender using filters.target in json. Am i right?

My second clarification is about life cycle of ProfileRunner. If i change the 
IRCProfile configuration of an existing ProfileRunner instance then that 
instance will be recreated and IRFFilters will be injected to the newly created 
instance. Am i right?

Now two tricky ones.

1- if we had defined configuration for IRFFilter as you have suggested and 
assume we have for a single IRFFilter component e.g "filter=log". Again assume 
this IRFFilter instance  is already injected to one of the existing 
ProfileRunner instance. If i change the IRFFilter component's property to 
"filter=uppercase", is this IRFFilter removed from the List without 
destroying the existing ProfileRunner instance?

2- If you had @updated method defined for ProfileRunner and changed the 
filters_target value for an existing ProfileRunner instance from 
(filter=uppercase) to (filter=log), what happens to the List member, 
are they refreshed according to the new filters_target value, without 
destroying the existing ProfileRunner instance?

Thanks in advance.

-daghan


Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: list+org.o...@io7m.com
Sent: Monday, March 13, 2017 03:05 PM
To: Peter Kriens 
Subject: Re: [osgi-dev] Building a "profile" system with declarative services 
and configuration admin?
CC: OSGi Developer Mail List 

On 2017-03-13T09:03:49 +0100
Peter Kriens  wrote:

> Just use configuration admin. So first define your profile configuration:
>
>@ObjectClassDefinition
>@interface IRCProfile {
>String username();
>String password();
>String host();
>String filters_target() default “(filter=uppercase)“;
>}
>
> You then create a a runner that does the work:
>
>@Designate( ocd= IRCProfile.class, factory=true )
>@Component(service=ProfileRunner.class)
>public class ProfileRunner {
>
>@Reference
>volatile List filters;
>
>@Activate
>void activate( IRCProfile profile ) {
>…
>// start a thread?
>}
>
>}
>
> This runner can now be created as many times as you want with WebConsole. 
> Each configuration you create is automatically cause a ProfileRunner to be 
> instantiated when its filters are registered. The filters are coupled to the 
> component via the `filters.target` configuration field. The default currently 
> shows that it needs the ‘uppercase’ filter. However, with the or (|) operator 
> you can make it any number of filters: (|(filter=uppercase)(filter=log)). If 
> you need ordering in the filters, use the service.ranking property on the 
> filter components.
>
> You can now make any number of filters that look like:
>
>@Component( property={“filter=uppercase”, “service.ranking=-100”})
>public class UpperCaseFilter implements IRCFilterType {
>
>String process( String s) {
>return s.toUpperCase();
>}
>}
>
> I do not think you need anything more? Of course your IRCFilterType are now 
> components so they can be configured independently in a similar vein as the 
> ProfileRunner.

Interesting, thanks!

I'm reading through the DS spec right now and I'm not sure I understand
how the filters_target() method ends up coupling the components. I
understand how filters work, I'm just not sure how the OSGi runtime
knows to use that method...

The rest seems fairly straightforward.

> Having file based configuration is always a bad smell in OSGi. Configuration 
> Admin looks different from what most developers know but it is quite powerful.

To be clear, I was referring to the property files that back Felix's
implementation of the Configuration Admin service. The implementation
appears to want one configuration file per service PID, so in a system
with a lot of components, that can mean a lot of separate configuration
files. That ends up being a fairly user-hostile thing in a system like
this because the user then has to understand service PIDs and know what
all of them are for the components in order to configure the client.

M
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] OSGI support needed bundling web application

2017-03-07 Thread Daghan ACAY
Hi Rama,

We use a similar strategy. We have a separate project for front end. Here is 
how we do it:

1- we have a backend project providing rest endpoints, in your case enroute 
application project (if you start a green field project. If not you need to 
port/migrate your existing backend to osgi)
2- we have a angular project with gulp and npm which we build independently. 
This project contains all the static files the front end needs and expended 
version of "static" folder of enroute application project. However, you loose 
all the automated processing that comes with enroute e.g. @RequireAngular etc.

You can run the first project as executable jar with embedded server. However, 
we wrap the second project into a war through maven build and put the artefact 
to a tomcat container. This way tomcat provides static content and executable 
jar provides REST endpoint.

This is a complicated deployment with various benefits such as extendability, 
security, scalibility etc. but if your project is relatively small then i 
suggest you use single enroute application project and maintain both front and 
backend code in a single executable jar. Enroute tutorial gives an excellent 
tutorial for building such a project from scratch. It also has a great 
structure so that if needed you can easily split single project into two and 
build something similar above.

I hope this helps

Cheers

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Wednesday, March 8, 2017 12:05 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] OSGI support needed bundling web application

A bit confused about the terminology … So let me verify:

backend Java code wrapped in a bundle implementing a REST API
frontend Angular Java code

In enRoute the frontend would be stored in the application project. (In the 
static directory.) Your REST backend would be provided as a provider. The 
application project would depend on the provider so that if you resolve the 
REST provider is dragged in with its dependencies.

Kind regards,

Peter Kriens




On 7 Mar 2017, at 12:23, rama.g 
mailto:ram...@utthunga.com>> wrote:

Dear Peter
You are right. this example. In this case  both front end and backend are 
bundled together. My use case is backend to be bundled separately, front end to 
be bundled separately as they are developed by two different vendors.
My current scenario is that, backend rest APIs are bundled on OSGI framework. 
Front end I have used OSGI Enroute?. I want an interface between the backend 
plugin and frontend plugin. How can this be established

Is it easy to port the backend from OSGI to OSGI Enroute

Thanks and Regards
Rama G

From: osgi-dev-boun...@mail.osgi.org 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Peter Kriens
Sent: Tuesday, March 07, 2017 4:08 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] OSGI support needed bundling web application

Did you follow the OSGi enRoute tutorials? The application template seems to do 
exactly what you want.

Kind regards,

Peter Kriens

On 7 Mar 2017, at 11:35, rama.g 
mailto:ram...@utthunga.com>> wrote:

Dear sir / madam
I need to know the kind of support OSGI framework provides to host web 
application for the given use case.
I have my backend (rest APIs) developed independently using modular approach . 
I have set of User components developed using Angular java corresponding to 
each backend module. We are required to bundle the backend and UI components 
separately for ease of maintenance , but when I deploy the product to the user 
he should visualize as a single plugin (combination of backend and UI)
Please suggest OSGI solution  required to meet the above use case

Assuming that  the backend is already bundled in OSGI framework, suggest a 
method to bundle UI components which works in collaboration with the backend

Thanks and Regards
Rama G

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-21 Thread Daghan ACAY
Just to closet this thread,


This is what I have done.


I created new repository and set the -buildrepo to this repository. I added the 
following cnf/ext/enroute.bnd


-plugin.maven  \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
name=Local
-buildrepo: Local


This has replaced the

-plugin.6.Local: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local ; \
pretty  =   true ; \
local   =   ${build}/local

I can see "Local" in Eclipse Repositories view in BNDtools. In the repository 
view "Local" is created and it shows all the projects in the currnet workspace. 
however ~/.m2/repositories folder does not have any of the jar files. Other 
workspaces cannot refer to the project artefacts through .m2

@Randy I have also tried
-plugin.maven  \
aQute.bnd.repository.maven.provider.BndPomRepository; \
name=Local
-buildrepo: Local

Unfortunately it did not work for me. I will continue to search until I find a 
solution.

Thanks for all the help
-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: Monday, February 20, 2017 11:03 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project


Thanks Randy,


I will look into this tomorrow (it is bit late now in Australia:) and let you 
know. If I can drop the pom.xml files in each project then you might be able to 
use it as well.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Randy Leonard 
Sent: Monday, February 20, 2017 10:33 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

> I guess what I am trying to understand now is the use of -buildrepo.
- I haven’t used this yet, only going off what Peter had told us earlier
- But I would suspect it goes in the cnf/build.bnd file

Just to clarify my proposed solution… would likely work only if the following 
were true:
- You define your cnf/release repositories as 
‘aQute.bnd.repository.maven.pom.provider.BndPomRepository’
- The ‘-buildrepo’ command builds to ‘cnf/release’ as part of the build process
- You use the trick of defining cnf/release directories as repositories, as 
outlined in my original post

I’m not offering guarantees the solution would work, but seems likely if the 
above conditions are true

Randy



On Feb 20, 2017, at 3:06 AM, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I guess what I am trying to understand now is the use of -buildrepo.

Can you tell me in which file you have defined it? also where did you see the 
output e.g. folder, file. If what I understand this correct than we do not need 
a separate pom.xml files for each project in the workspace, which in itself is 
a huge win.

I believe for now I will give up hope on replacing nexus 

Cheers
-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Randy Leonard 
mailto:randy.leonard@gmail.com>>
Sent: Monday, February 20, 2017 9:52 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

> You can set a -buildrepo.
Thx, very helpful

> If you use local maven builds then I do not need to include the transient 
> repositories
Correct

> If you use local maven builds…
I use both maven and gradle builds.
- Gradle builds everything, and my OSGi workspaces refer to each other’s 
cnf/release repository to resolve dependencies (in an acyclic manner, of course)
- Maven only builds a small subset of cxf-based client bundles and pushes to 
.m2 (or other) repository for use within Liferay


> Basically the question is how can I get rid of 
> https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
com.easyiot.application/central.xml at master · 
daghanacay/com.easyiot.application · 
GitHub<https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml>
github.com<http://github.com/>
Contribute to com.easyiot.application development by creating an account on 
GitHub.


> using a combination of rawgithub, bnd repositories and without an external 
> nexus server.
- It seems you want maven to substitute m2/Nexus with rawgithub
- I don’t have any experience with rawgithub, but would suspect this would be 
challenging

I suspect a better way is to omit rawgithub from the build process, just push 
your artifacts there post-build.  Instead:
- Specify ‘-buildrepo’ as suggested by Peter.  This would ensure ensure bundles 
are built to both the project’s target and workspace cnf/release directories
- Use the ‘-plugin…’ trick I had provided earlier so that your ‘cnf/release’ 
directories are treated as reposi

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-20 Thread Daghan ACAY
Thanks Randy,


I will look into this tomorrow (it is bit late now in Australia:) and let you 
know. If I can drop the pom.xml files in each project then you might be able to 
use it as well.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Randy Leonard 
Sent: Monday, February 20, 2017 10:33 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

> I guess what I am trying to understand now is the use of -buildrepo.
- I haven’t used this yet, only going off what Peter had told us earlier
- But I would suspect it goes in the cnf/build.bnd file

Just to clarify my proposed solution… would likely work only if the following 
were true:
- You define your cnf/release repositories as 
‘aQute.bnd.repository.maven.pom.provider.BndPomRepository’
- The ‘-buildrepo’ command builds to ‘cnf/release’ as part of the build process
- You use the trick of defining cnf/release directories as repositories, as 
outlined in my original post

I’m not offering guarantees the solution would work, but seems likely if the 
above conditions are true

Randy



On Feb 20, 2017, at 3:06 AM, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I guess what I am trying to understand now is the use of -buildrepo.

Can you tell me in which file you have defined it? also where did you see the 
output e.g. folder, file. If what I understand this correct than we do not need 
a separate pom.xml files for each project in the workspace, which in itself is 
a huge win.

I believe for now I will give up hope on replacing nexus 

Cheers
-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Randy Leonard 
mailto:randy.leonard@gmail.com>>
Sent: Monday, February 20, 2017 9:52 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

> You can set a -buildrepo.
Thx, very helpful

> If you use local maven builds then I do not need to include the transient 
> repositories
Correct

> If you use local maven builds…
I use both maven and gradle builds.
- Gradle builds everything, and my OSGi workspaces refer to each other’s 
cnf/release repository to resolve dependencies (in an acyclic manner, of course)
- Maven only builds a small subset of cxf-based client bundles and pushes to 
.m2 (or other) repository for use within Liferay


> Basically the question is how can I get rid of 
> https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
com.easyiot.application/central.xml at master · 
daghanacay/com.easyiot.application · 
GitHub<https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml>
github.com<http://github.com/>
Contribute to com.easyiot.application development by creating an account on 
GitHub.


> using a combination of rawgithub, bnd repositories and without an external 
> nexus server.
- It seems you want maven to substitute m2/Nexus with rawgithub
- I don’t have any experience with rawgithub, but would suspect this would be 
challenging

I suspect a better way is to omit rawgithub from the build process, just push 
your artifacts there post-build.  Instead:
- Specify ‘-buildrepo’ as suggested by Peter.  This would ensure ensure bundles 
are built to both the project’s target and workspace cnf/release directories
- Use the ‘-plugin…’ trick I had provided earlier so that your ‘cnf/release’ 
directories are treated as repositories
- After the build completes, push the bundles from your various ‘cnf/release’ 
directories to rawgithub.

I suspect this will work, but haven’t tried this exact setup…

Randy



On Feb 20, 2017, at 2:06 AM, Peter Kriens 
mailto:peter.kri...@aqute.biz>> wrote:

There is an undocumented feature in Bnd that might be useful here. You can set 
a -buildrepo. Any project that is build will automatically release to all the 
listed repositories in -buildrepo property.

Kind regards,

Peter Kriens

On 20 Feb 2017, at 09:52, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I think I am doing the same thing but through github


-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
name =   EasyIot-Core; \
locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


One difference I see is that, after I do "./gradlew release" on the local 
machine I push release folder (with released jar files) to github as well as 
the code. This helps others to use the released jars with the above 
FixedIndexRepository definition in their bnd workspace.

What I am trying to solve is the transient dependencies. I have this file in 
application workspace 
https://github.com/daghanacay/com.easyiot.application/blob/master/

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-20 Thread Daghan ACAY
Hi Randy,


I guess what I am trying to understand now is the use of -buildrepo.


Can you tell me in which file you have defined it? also where did you see the 
output e.g. folder, file. If what I understand this correct than we do not need 
a separate pom.xml files for each project in the workspace, which in itself is 
a huge win.


I believe for now I will give up hope on replacing nexus [😊]


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Randy Leonard 
Sent: Monday, February 20, 2017 9:52 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

> You can set a -buildrepo.
Thx, very helpful

> If you use local maven builds then I do not need to include the transient 
> repositories
Correct

> If you use local maven builds…
I use both maven and gradle builds.
- Gradle builds everything, and my OSGi workspaces refer to each other’s 
cnf/release repository to resolve dependencies (in an acyclic manner, of course)
- Maven only builds a small subset of cxf-based client bundles and pushes to 
.m2 (or other) repository for use within Liferay


> Basically the question is how can I get rid of 
> https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
com.easyiot.application/central.xml at master · 
daghanacay/com.easyiot.application · 
GitHub<https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml>
github.com
Contribute to com.easyiot.application development by creating an account on 
GitHub.


> using a combination of rawgithub, bnd repositories and without an external 
> nexus server.
- It seems you want maven to substitute m2/Nexus with rawgithub
- I don’t have any experience with rawgithub, but would suspect this would be 
challenging

I suspect a better way is to omit rawgithub from the build process, just push 
your artifacts there post-build.  Instead:
- Specify ‘-buildrepo’ as suggested by Peter.  This would ensure ensure bundles 
are built to both the project’s target and workspace cnf/release directories
- Use the ‘-plugin…’ trick I had provided earlier so that your ‘cnf/release’ 
directories are treated as repositories
- After the build completes, push the bundles from your various ‘cnf/release’ 
directories to rawgithub.

I suspect this will work, but haven’t tried this exact setup…

Randy



On Feb 20, 2017, at 2:06 AM, Peter Kriens 
mailto:peter.kri...@aqute.biz>> wrote:

There is an undocumented feature in Bnd that might be useful here. You can set 
a -buildrepo. Any project that is build will automatically release to all the 
listed repositories in -buildrepo property.

Kind regards,

Peter Kriens

On 20 Feb 2017, at 09:52, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I think I am doing the same thing but through github


-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
name =   EasyIot-Core; \
locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


One difference I see is that, after I do "./gradlew release" on the local 
machine I push release folder (with released jar files) to github as well as 
the code. This helps others to use the released jars with the above 
FixedIndexRepository definition in their bnd workspace.

What I am trying to solve is the transient dependencies. I have this file in 
application workspace 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/EasyCoreMaven.xml
 which defines the projects in core workspace. Projects in core workspace have 
this dependencies 
https://github.com/daghanacay/com.easyiot.core/blob/master/cnf/central.xml. 
problem is the first mvn (EasyCoreMaven.xml) file does not calculate the 
transient dependencies defined in "central.mvn" and I have to include all the 
transient dependencies in all the other workspaces (there are two more) into 
application workspace central.xml file to make the runtime resolution to work, 
e.g. 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml.
 FYI build will work even if I do not create 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 but the exported executable will not work due to missing transient 
dependencies.

If you use local maven builds then I do not need to include the transient 
repositories to 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 since they resolve through local .m2. However .m2 is not available in Travis 
and I do not want to push mvn artefacts to a nexus server.

Basically the question is how can I get rid of 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 using a combination of rawgithub, bnd repositories and without an external 
nexus server.

I hope this i

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-20 Thread Daghan ACAY

I found LocalMvnTest.mvn file [😊]  it was created under the cnf folder but it 
does not create the third party dependencies. So I ma afraid it wont work.

Closest I think is to use "bnd-indexer-plugin" int the pom of each project 
inside the workspace but then it creates index files per project not under 
"cnf" folder.

Cheers
-Daghan

From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: Monday, February 20, 2017 9:22 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project


Hi Peter,


I found http://bnd.bndtools.org/instructions/buildrepo.html


I added to the following cnf/build.bnd file

-plugin.maven  \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
name=LocalMvnTest
-buildrepo: LocalMvnTest

I ran "./gradlew release" and I cannot see folder LocalMvnTest folder anywhere. 
am I doing something wrong?

Cheers
-Daghan

From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Monday, February 20, 2017 9:06 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

There is an undocumented feature in Bnd that might be useful here. You can set 
a -buildrepo. Any project that is build will automatically release to all the 
listed repositories in -buildrepo property.

Kind regards,

Peter Kriens

On 20 Feb 2017, at 09:52, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I think I am doing the same thing but through github


-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
name =   EasyIot-Core; \
locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


One difference I see is that, after I do "./gradlew release" on the local 
machine I push release folder (with released jar files) to github as well as 
the code. This helps others to use the released jars with the above 
FixedIndexRepository definition in their bnd workspace.

What I am trying to solve is the transient dependencies. I have this file in 
application workspace 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/EasyCoreMaven.xml
 which defines the projects in core workspace. Projects in core workspace have 
this dependencies 
https://github.com/daghanacay/com.easyiot.core/blob/master/cnf/central.xml. 
problem is the first mvn (EasyCoreMaven.xml) file does not calculate the 
transient dependencies defined in "central.mvn" and I have to include all the 
transient dependencies in all the other workspaces (there are two more) into 
application workspace central.xml file to make the runtime resolution to work, 
e.g. 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml.
 FYI build will work even if I do not create 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 but the exported executable will not work due to missing transient 
dependencies.

If you use local maven builds then I do not need to include the transient 
repositories to 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 since they resolve through local .m2. However .m2 is not available in Travis 
and I do not want to push mvn artefacts to a nexus server.

Basically the question is how can I get rid of 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 using a combination of rawgithub, bnd repositories and without an external 
nexus server.

I hope this is a cleaner version of the original question.

Regards
-Daghan


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: Monday, February 20, 2017 1:09 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Thanks Randy,
I will try this as soon as i go home and let you know the outcome.
Cheers
Daghan
Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
mailto:randy.leonard@gmail.com>>
Sent: Monday, February 20, 2017 08:46 AM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Daghan:

I understand your problem as having OSGi enRoute workspaces share bundles 
without having to commit to continuous integration.

For this, I add the following to cnf/build.bnd within each workspace:

-plugin.71.Foundation: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Foundation ; \
pretty 

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-20 Thread Daghan ACAY
Hi Peter,


I found http://bnd.bndtools.org/instructions/buildrepo.html


I added to the following cnf/build.bnd file

-plugin.maven  \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
name=LocalMvnTest
-buildrepo: LocalMvnTest

I ran "./gradlew release" and I cannot see folder LocalMvnTest folder anywhere. 
am I doing something wrong?

Cheers
-Daghan

From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Monday, February 20, 2017 9:06 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

There is an undocumented feature in Bnd that might be useful here. You can set 
a -buildrepo. Any project that is build will automatically release to all the 
listed repositories in -buildrepo property.

Kind regards,

Peter Kriens

On 20 Feb 2017, at 09:52, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Randy,

I think I am doing the same thing but through github


-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
name =   EasyIot-Core; \
locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


One difference I see is that, after I do "./gradlew release" on the local 
machine I push release folder (with released jar files) to github as well as 
the code. This helps others to use the released jars with the above 
FixedIndexRepository definition in their bnd workspace.

What I am trying to solve is the transient dependencies. I have this file in 
application workspace 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/EasyCoreMaven.xml
 which defines the projects in core workspace. Projects in core workspace have 
this dependencies 
https://github.com/daghanacay/com.easyiot.core/blob/master/cnf/central.xml. 
problem is the first mvn (EasyCoreMaven.xml) file does not calculate the 
transient dependencies defined in "central.mvn" and I have to include all the 
transient dependencies in all the other workspaces (there are two more) into 
application workspace central.xml file to make the runtime resolution to work, 
e.g. 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml.
 FYI build will work even if I do not create 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 but the exported executable will not work due to missing transient 
dependencies.

If you use local maven builds then I do not need to include the transient 
repositories to 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 since they resolve through local .m2. However .m2 is not available in Travis 
and I do not want to push mvn artefacts to a nexus server.

Basically the question is how can I get rid of 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 using a combination of rawgithub, bnd repositories and without an external 
nexus server.

I hope this is a cleaner version of the original question.

Regards
-Daghan


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: Monday, February 20, 2017 1:09 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Thanks Randy,
I will try this as soon as i go home and let you know the outcome.
Cheers
Daghan
Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
mailto:randy.leonard@gmail.com>>
Sent: Monday, February 20, 2017 08:46 AM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Daghan:

I understand your problem as having OSGi enRoute workspaces share bundles 
without having to commit to continuous integration.

For this, I add the following to cnf/build.bnd within each workspace:

-plugin.71.Foundation: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Foundation ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.foundation/cnf/release

-plugin.72.MasterData: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-MasterData ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.masterdata/cnf/release

-plugin.73.Batch: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Batch ; \
pretty

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-20 Thread Daghan ACAY
Hi Randy,


I think I am doing the same thing but through github


-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
name =   EasyIot-Core; \
locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


One difference I see is that, after I do "./gradlew release" on the local 
machine I push release folder (with released jar files) to github as well as 
the code. This helps others to use the released jars with the above 
FixedIndexRepository definition in their bnd workspace.

What I am trying to solve is the transient dependencies. I have this file in 
application workspace 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/EasyCoreMaven.xml
 which defines the projects in core workspace. Projects in core workspace have 
this dependencies 
https://github.com/daghanacay/com.easyiot.core/blob/master/cnf/central.xml. 
problem is the first mvn (EasyCoreMaven.xml) file does not calculate the 
transient dependencies defined in "central.mvn" and I have to include all the 
transient dependencies in all the other workspaces (there are two more) into 
application workspace central.xml file to make the runtime resolution to work, 
e.g. 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml.
 FYI build will work even if I do not create 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 but the exported executable will not work due to missing transient 
dependencies.

If you use local maven builds then I do not need to include the transient 
repositories to 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 since they resolve through local .m2. However .m2 is not available in Travis 
and I do not want to push mvn artefacts to a nexus server.

Basically the question is how can I get rid of 
https://github.com/daghanacay/com.easyiot.application/blob/master/cnf/central.xml
 using a combination of rawgithub, bnd repositories and without an external 
nexus server.

I hope this is a cleaner version of the original question.

Regards
-Daghan


From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: Monday, February 20, 2017 1:09 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project


Thanks Randy,

I will try this as soon as i go home and let you know the outcome.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
Sent: Monday, February 20, 2017 08:46 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Daghan:

I understand your problem as having OSGi enRoute workspaces share bundles 
without having to commit to continuous integration.

For this, I add the following to cnf/build.bnd within each workspace:

-plugin.71.Foundation: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Foundation ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.foundation/cnf/release

-plugin.72.MasterData: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-MasterData ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.masterdata/cnf/release

-plugin.73.Batch: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Batch ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.batch/cnf/release

-plugin.74.Finance: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Finance ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.finance/cnf/release



After doing so, my list of repositories within the workspace is extended to 
include not just Central, Local, Release, and Distro… but each of the 
workspaces as referenced above.

You can then make bundles available to other workspaces by updating the 
contents of each project’s cnf/release folder… which is done by executing 
'./gradlew release’ within each workspace directory.

Note my plugins above are still using an absolute pathname to each workspace’s 
cnf/release directory.  I will be updating soon to reference environment 
variables.


Let me know if I have understood your problem correctly, and if I haven’t been 
clear on any of the above.

Thanks,
Randy



On Feb 19, 2017, at 2:24 PM, Daghan ACAY 
mailto:daghana...

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-19 Thread Daghan ACAY
Thanks Randy,

I will try this as soon as i go home and let you know the outcome.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
Sent: Monday, February 20, 2017 08:46 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

Daghan:

I understand your problem as having OSGi enRoute workspaces share bundles 
without having to commit to continuous integration.

For this, I add the following to cnf/build.bnd within each workspace:

-plugin.71.Foundation: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Foundation ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.foundation/cnf/release

-plugin.72.MasterData: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-MasterData ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.masterdata/cnf/release

-plugin.73.Batch: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Batch ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.batch/cnf/release

-plugin.74.Finance: \
aQute.bnd.deployer.repository.LocalIndexedRepo; \
name=   Local-Finance ; \
pretty  =   true ; \
local   =   
/Users/randy/projects/MyProject/src/git/com.xyz.finance/cnf/release



After doing so, my list of repositories within the workspace is extended to 
include not just Central, Local, Release, and Distro… but each of the 
workspaces as referenced above.

You can then make bundles available to other workspaces by updating the 
contents of each project’s cnf/release folder… which is done by executing 
'./gradlew release’ within each workspace directory.

Note my plugins above are still using an absolute pathname to each workspace’s 
cnf/release directory.  I will be updating soon to reference environment 
variables.


Let me know if I have understood your problem correctly, and if I haven’t been 
clear on any of the above.

Thanks,
Randy



On Feb 19, 2017, at 2:24 PM, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:


Hi Andy,

I guess i followed your strategy please see 
https://mail.osgi.org/pipermail/osgi-dev/2017-February/006135.html

My problem is now sharing artefacts without using Nexus. Are you deploying your 
artefacts to nexus during maven build? If not how do you deal with transient 
dependencies needed for resolution process.

PS i solved it by putting it all transient dependencies to central.xml file in 
all workspaces but this is duplication and maintenance headache.

Regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
mailto:randy.leonard@gmail.com>>
Sent: Sunday, February 19, 2017 05:47 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

To all:

This was actually quite easy to do.
 - Follow the instructions here: 
http://enroute.osgi.org/tutorial_eval/050-start.html
 - But with one caveat… create bnd projects, *not maven projects*.  Then 
manually insert your pom.xml files into your bnd projects.

Once this is done, you get the hot-replacement provided by bnd during bundle 
development and can still use ‘mvn clean install’ to deploy to your m2 
repository.

The only caveat is you will need to synchronize dependencies in both bnd.bnd 
and pom.xml files.  But for our situation, only using maven for apache cxf 
client stubs… so pretty straightforward stuff.

We now have a number of OSGi enRoute workspaces which provide services to each 
other and Liferay portal workspaces.  Modifications to one workspace are 
immediately available in all other enRoute workspaces, and almost immediately 
within Liferay workspaces.  We only submit to continuous integration after 
changes spanning all workspaces are proven to be correct in the development 
environment.

Let me know if there is interest in how we have done this, and I can set up a 
git repository showing how this all works.

Randy

———


>> leveraged aQute.bnd.deployer.repository.LocalIndexedRepo within Liferay7 ..."
> Can you expand on what this means please? A use-case would be good.
Gradle works with several types of repositories, as listed here:
  - 
https://docs.gradle.org/current/userguide/dependency_management.html#sec:repositories
 
<https://docs.gradle.org/current/usergui

Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

2017-02-19 Thread Daghan ACAY
Hi Andy,

I guess i followed your strategy please see 
https://mail.osgi.org/pipermail/osgi-dev/2017-February/006135.html

My problem is now sharing artefacts without using Nexus. Are you deploying your 
artefacts to nexus during maven build? If not how do you deal with transient 
dependencies needed for resolution process.

PS i solved it by putting it all transient dependencies to central.xml file in 
all workspaces but this is duplication and maintenance headache.

Regards
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Randy Leonard 
Sent: Sunday, February 19, 2017 05:47 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Accessing LocalIndexedRepo from Liferay 7 project

To all:

This was actually quite easy to do.
 - Follow the instructions here: 
http://enroute.osgi.org/tutorial_eval/050-start.html
 - But with one caveat… create bnd projects, *not maven projects*.  Then 
manually insert your pom.xml files into your bnd projects.

Once this is done, you get the hot-replacement provided by bnd during bundle 
development and can still use ‘mvn clean install’ to deploy to your m2 
repository.

The only caveat is you will need to synchronize dependencies in both bnd.bnd 
and pom.xml files.  But for our situation, only using maven for apache cxf 
client stubs… so pretty straightforward stuff.

We now have a number of OSGi enRoute workspaces which provide services to each 
other and Liferay portal workspaces.  Modifications to one workspace are 
immediately available in all other enRoute workspaces, and almost immediately 
within Liferay workspaces.  We only submit to continuous integration after 
changes spanning all workspaces are proven to be correct in the development 
environment.

Let me know if there is interest in how we have done this, and I can set up a 
git repository showing how this all works.

Randy

———


>> leveraged aQute.bnd.deployer.repository.LocalIndexedRepo within Liferay7 ..."
> Can you expand on what this means please? A use-case would be good.
Gradle works with several types of repositories, as listed here:
  - 
https://docs.gradle.org/current/userguide/dependency_management.html#sec:repositories
 


But the default repository type used by enRoute is not listed in the above 
link, and is instead defined by an enRoute/aQute plugin:
 - aQute.bnd.deployer.repository.LocalIndexedRepo


What this means:
  - Liferay does not natively support enRoute repositories unless it can be 
configured to import the aQute gradle plugin.


Ultimately, the issue is finding a repository scheme that both enRoute and 
Liferay can agree upon.  Seems there are three options:
1. Use Maven to build enRoute projects… ugh (dual build systems to synchronize, 
or lose hot-replacement offered by gradle-build approach)
2. Get Liferay to understand enRoute’s default repository type of 
LocalIndexedRepo
3. Get enRoute to generate Ivy repositories, as I believe Liferay will work 
with those just fine


Option 2 approach:
  - enRoute obtains LocalIndexedRepo support by importing aQute libraries at 
the start of the build.gradle file, and I could presumably do the same with 
Liferay projects
  - But I would still need to define the LocalIndexedRepo repositories 
somewhere, and further define dependencies via BSN notation?

Option 3 approach:
  - Modify build enRoute scripts and build.bnd files to leverage Ivy 
repositories
  - Register Ivy repositories and dependencies in Liferay’s build.gradle file


Hope I have made things more clear?  Your thoughts?

Randy


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Build Projects with dependencies to other osgi projects

2017-02-15 Thread Daghan ACAY
Hi,


I have been working on CI/CD for projects contained in different OSGi 
workspaces a while now and finally gave up trying to find solution. I am asking 
for OSGi experts to help me out, I hope [😊] . Before you continue please note 
that this is BND-tools and enroute related question.


Here is my scenario I have 4 enroute workspaces with multiple projects in them 
[1]. Every project inside each workspace have their own external dependencies 
(maven central) as well as dependency to one or more of the other workspaces. I 
have two scenarios


1- I build locally and use .m2 to manage build artefacts. I create .pom for 
every project in each workspace. I build them using "mvn clean install". When I 
need to reference to one of the projects in the other workspace I use 
BndPomRepository plugin in the build.bnd. For example "application" workspace 
refers to "core" workspace as follows

-plugin.2.easyiot.core = \
aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
snapshotUrls=https://oss.sonatype.org/content/groups/osgi; \
releaseUrls=https://repo1.maven.org/maven2/; \
pom=${build}/EasyCoreMaven.xml; \
name=EasyCoreMaven; \
location=${build}/cache/EasyCoreMaven.xml
where EasyCoreMaven.xml lists all the projects in the "core" workspace. This is 
great because transient dependencies in the "core" workspace projects are 
handled through mvn pom and I do not need to worry about them in the 
"application" workspace. It works great!!!


My problem starts with the second use case, CI/CD

2- When I start to build using travis and gradle I add the FixedIndexedRepo 
plugin to the build.bnd. For example "application" workspace refers to "core" 
workspace as

-plugin.3.easyiot.core = \
aQute.bnd.deployer.repository.FixedIndexedRepo; \
   name =   EasyIot-Core; \
   locations =   
https://raw.githubusercontent.com/daghanacay/com.easyiot.core/master/cnf/release/index.xml


In this case I make sure

a- I release all the artefacts for the projects in the "core" workspace (using 
"./gradlew release" on the local machine) and push it to git (so the jar files 
and index.xml file end up in raw.githubusercontent)

b- trigger the build  using gradle on travis for projects in "application" 
workspace, which then resolves dependencies from github index

c- build and export application executable

c- push the executable jar to docker and elastic beanstalk respectively

This builds perfectly and everything seems shipshape


BUT PROBLEM is executable does not work since it does not contain the 
transitive dependencies of the projects used in the "core" workspace. My only 
requirement is no nexus server allowed. I also do not wish to put all the 
projects in a single workspace due to extensibility and provide easy way to 
contribute by other open source developers using their own workspace structure.


How can I get this thing work in anyway possible e.g.

1- define a repository in gradle.build file [2]

2- create index file for transient dependencies and use it somehow [3]

3- use a different bnd repository plugin [4]

4- open to other suggestions, desperately :)


I am looking forward to your feedback, I have spend considerable time on this 
and I am on the verge of giving up.


Best regards

-Daghan


References

[1] projects links are

https://github.com/daghanacay/com.easyiot.core

https://github.com/daghanacay/com.easyiot.protocol

https://github.com/daghanacay/com.easyiot.device

https://github.com/daghanacay/com.easyiot.application

[2] 
https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html#sec:repositories_tutorial

[3] 
https://daghanacay.github.io/aws,/streaming/2016/11/27/BNDtoolsAndMaven.html#maven-plugins
[4] 
https://daghanacay.github.io/aws,/streaming/2016/11/27/BNDtoolsAndMaven.html#bnd-tools-repositories




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Bndtools and m2e

2016-12-15 Thread Daghan ACAY
Hi raymond,

This looks great. I would like to try out but i am confused about the relation 
between bndtool eclipse plugin and e2m plugin in terms of project development 
cycle and ci/cd. An example project and quick tutorial would help me heaps if 
you have one ot dont mind spending a little bit of time writing.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Raymond Auge 
Sent: Friday, December 16, 2016 06:35 AM
To: OSGi Developer Mail List 
Subject: [osgi-dev] Bndtools and m2e

Hello everyone,

I thought you might be interested in a milestone change in bndtools; 
integration with m2e!

https://groups.google.com/d/msg/bndtools-dev/suGJ6GWWoIk/SmEub2scEQAJ

Please test and give the bndtools developers any feedback about it!

Sincerely,
--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Strange issue with enRoute and Aries SPI Fly.

2016-12-08 Thread Daghan ACAY
I do not wish an alternative solution but application note here might give a 
fresh perspective http://enroute.osgi.org/appnotes/interceptors.html as an 
alternative to weaving.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Christian Schneider 
Sent: Thursday, December 8, 2016 09:20 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Strange issue with enRoute and Aries SPI Fly.

I think the really problematic thing in Aries-spi is the client side.
On the server side I think it makes sense to look into the bundles and provide 
the ServiceLoader services as OSGi services.

On the client side it only works if Aries-spi does the weaving early enough. So 
I wonder if in many cases we could just change the client side and still profit 
from the Aries-spi services.
Not sure if this can work for the sound support though.

Christian

On 08.12.2016 09:35, Peter Kriens wrote:
Runtime weaving is always one of the worst programming hacks in existence, I 
would avoid it like the plague at all costs. It looks so attractive but it 
causes so much unexpected pain.

However, you probably can’t. So I guess the like problem is that your UI code 
gets loaded before the weaver is installed. If you weaver uses the OSGi API to 
weave then it registers a Weaving Hook service. What you should do is make your 
GUI code depend on that service, you should make the hook also immediate.  This 
will prohibit your code from loading before the weaving hooks is established. 
If you have a domain service that is registered by the weaver as it seems 
depend on that one.

However, absolute best advice is to dump the dynamic weaving solution and find 
a way to register the plugin directly with the SPI.

Kind regards,

Peter Kriens


On 7 Dec 2016, at 18:38, Elliot Huntington 
mailto:elliot.hunting...@gmail.com>> wrote:

Hi Peter,

Yes, I also assume I am running the application without security. I have tested 
this two ways, one by running the enRoute application directly within Eclipse 
just as explained in the enRoute tutorials, and also by exporting the enRoute 
application as a stand alone executable jar file. In both cases the behavior is 
the same. I agree with your suggestion to eliminate as much as possible to 
identify what the problem is. Actually, that was my motivation for creating 
this github project. I wanted to create a SSCCE to share 
with others in order to get the help I need to figure this out.

In order to make this problem more clear I updated the example 
(https://github.com/axiopisty/com.github.axiopisty.plarpebu) to isolate the 
code that integrates the SPI Fly dynamic weaving. The latest commit on this 
project allows the dynamic weaving feature to be configured on or off with a 
checkbox in the GUI. I tested this quite thoroughly. With dynamic weaving 
disabled, the MediaPlayer load method works the exact same from either the 
command line or the GUI. But with dynamic weaving enabled it only works as 
expected from the command line using the Gogo Shell.

The problem is beyond my scope of knowledge or expertise in either OSGi or 
Apache Aries SPI Fly. This is why I'm reaching out to you experts in the OSGi 
and Aries communities.

Sincerely,
Elliot

On Tue, Dec 6, 2016 at 2:20 AM, Peter Kriens 
<peter.kri...@aqute.biz>
 wrote:
Since the system is all started up when you press play or use the gogo command 
this does not look like a start ordering problem. Nor is it a R/C problem 
because all is satisfied.

The path from Gogo must therefore follow a different trajectory. The best way 
to find these things out is to single step both paths and try to find a 
difference. It might also help to remove as much functionality as possible to 
focus on the different paths. I.e. try to remove the weaving to include/exclude 
that as cause.

I assume you run without security?

Kind regards,

Peter Kriens

On 5 Dec 2016, at 21:48, Elliot Huntington 
<elliot.hunting...@gmail.com>
 wrote:

@BJ Hargrave,

Yes, I just tested rearranging the items listed in -runbundles to make sure the 
ones that should be loaded first are. The problem remains.

@Raymond Auge,

I'm having a hard time understanding your response. I think I generally 
understand what you're saying, but I don't know what to look for as far as what 
should specifically be in the set of requirements/capabilities for this use 
case. But I think the essence of your response is that if the requirements and 
capabilities are not properly configured in the bundles then the bundles wont 
even resolve properly much less activate properly?

I'm quite certain that I have properly configured the requirements/capabilities 
in the media player bundle which depends on the dynamic weaving bundle, 
otherwise I don't think loa

Re: [osgi-dev] JPM4J missing in new install as per enRoute Tutorrial

2016-12-06 Thread Daghan ACAY
Hi Paul,

There are some changes for using maven based repositories vs jpm4j based 
repositories. For example in 3.3  bndtools plugin started using mvn like xml 
files instead of jpm4j like .json files.

Please send me a private message and i am happy to discuss the details.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Paul F Fraser 
Sent: Tuesday, December 6, 2016 09:13 PM
To: OSGi Developer Mail List 
Subject: [osgi-dev] JPM4J missing in new install as per enRoute Tutorrial

>From a new install of eclipse (neon) and bndtools 3.3 and following the 
>enRoute starting tutorial
for a separate workspace and git dir.

The option to find bundles with  jpm4j is not available.

For example before I had this problem, if I typed gson in the repository search 
box I was offered
the opportunity to find it in jpm4j.

Anyone else had this problem?

Regards

Paul Fraser




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] help needed

2016-11-28 Thread Daghan ACAY
Thanks a lot gwendal.

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: gwendal toullec 
Sent: Tuesday, November 29, 2016 11:03 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] help needed


Done but only for osgi.enroute.iot.pi.provider and not for pi4j because 
osgi.enroute.iot.pi.provider  is really needed for the second part of the tuto 
with scheduler.


Gwendal.



De : osgi-dev-boun...@mail.osgi.org  de la part 
de Daghan ACAY 
Envoyé : lundi 28 novembre 2016 08:18
À : OSGi Developer Mail List
Objet : Re: [osgi-dev] help needed


You welcome,


It would be great help if you can find time and do a pull request on the 
tutorial source at least for raspberry pi 2.

You can find the page content here https://github.com/osgi/osgi.enroute.site.


good luck

-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of gwendal toullec 
Sent: Monday, November 28, 2016 7:18 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] help needed


Thank you very much Daghan, it works fine [😊]


Unfortunately this library isn't up to date for raspberry 3 so I had py4j 
dependency in the central.xml as you explain for osgi.enroute.iot.pi.provider 
and all is right now.


Thanks again.


Regards,

Gwendal.


De : osgi-dev-boun...@mail.osgi.org  de la part 
de Daghan ACAY 
Envoyé : dimanche 27 novembre 2016 03:38
À : OSGi Developer Mail List
Objet : Re: [osgi-dev] help needed


Hi Gwendal,


I believe "osgi.enroute.iot.pi.provider" is no longer a part of enroute distro. 
Please remove the manually downloaded pi4j from your project and do the 
following:


1- open cnf>central.xml

2- Add the following



org.osgi
osgi.enroute.iot.pi.provider
2.0.0



This should solve your problem.


PS: if cannot find cnf>central.xml then let me know (possibly you will see 
cnf>central.json), I will provide another solution.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of gwendal toullec 
Sent: Sunday, November 27, 2016 12:20 AM
To: osgi-dev@mail.osgi.org
Subject: [osgi-dev] help needed


Hi all, I am trying to do this tutorial


http://enroute.osgi.org/tutorial_iot/120-exploring.html


but I have got a problem with:

osgi.enroute.iot.pi.provider

package is not find so I can resolve bndrun dependencies:


Unable to resolve <> version=null:
   missing requirement osgi.enroute.iot.pi.provider



and when I try with

osgi.enroute.iot.pi.command

dependencies not found:


Unable to resolve <> version=null:
   missing requirement enroute.iot.raspberry.application
->  Unable to resolve enroute.iot.raspberry.application 
version=1.0.0.201611270001:
   missing requirement com.pi4j.system]


I manually dowload and add pi4j in my project build path so I haven't no more 
eclipse problem but I fell that it is not a good solution for osgi and it not 
run on my remote raspberry ssh console...


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Object Converters for osgi

2016-11-28 Thread Daghan ACAY
Thanks David,


This might be better solution since I am already using DTO and DTOs service. I 
have to ask do we have a official release of that component in maven or some 
other repo. Currently I am using osgi.enroute.dtos.bndlib.provider:2.0.0 
referenced in enroute distro i.e. org.osgi:osgi.enroute.pom.distro:2.0.0


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of David Daniel 
Sent: Sunday, November 27, 2016 12:37 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Object Converters for osgi


The Felix converter code can be found here. 
https://github.com/apache/felix/tree/trunk/converter. It is based off the dto 
spec and conversion spec. 
https://github.com/osgi/design/blob/master/rfps/rfp-0169-Object-Conversion.pdf

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/felix/tree/trunk/converter>

apache/felix<https://github.com/apache/felix/tree/trunk/converter>
github.com
felix - Mirror of Apache Felix


[https://avatars0.githubusercontent.com/u/1123352?v=3&s=400]<https://github.com/osgi/design/blob/master/rfps/rfp-0169-Object-Conversion.pdf>

osgi/design<https://github.com/osgi/design/blob/master/rfps/rfp-0169-Object-Conversion.pdf>
github.com
OSGi Alliance design repository mirror



On Nov 27, 2016 12:16 AM, "Daghan ACAY" 
mailto:daghana...@hotmail.com>> wrote:

Hi Mat,


I did not want to hijack the original thread.


I meant exactly those, thanks. But then what did you mean by "Converter - Felix 
(standardized light weight object conversion)"?


Cheers

-Daghan


Do you mean libraries for object conversion? I know of a couple general purpose 
bean mappers:
http://mapstruct.org/
http://dozer.sourceforge.net/
Dozer - Dozer<http://dozer.sourceforge.net/>
dozer.sourceforge.net<http://dozer.sourceforge.net>
Dozer. Dozer is a Java Bean to Java Bean mapper that recursively copies data 
from one object to another. Typically, these Java Beans will be of different 
complex ...




As for conversion APIs, there's the Felix one, a Camel one, Blueprint has one, 
and there's something in DS for that, too (metatypes?), though I don't know 
much about that one.

On 26 November 2016 at 21:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Matt,


I was looking into something similar in my project if you mean similar concepts 
as in "Spring or Camel converters" with "Converter - Felix (standardized light 
weight object conversion)" then please let me know where I can 
access/contribute to that project.


Cheers

-Daghan



___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] help needed

2016-11-28 Thread Daghan ACAY
You welcome,


It would be great help if you can find time and do a pull request on the 
tutorial source at least for raspberry pi 2.

You can find the page content here https://github.com/osgi/osgi.enroute.site.


good luck

-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of gwendal toullec 
Sent: Monday, November 28, 2016 7:18 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] help needed


Thank you very much Daghan, it works fine [😊]


Unfortunately this library isn't up to date for raspberry 3 so I had py4j 
dependency in the central.xml as you explain for osgi.enroute.iot.pi.provider 
and all is right now.


Thanks again.


Regards,

Gwendal.


De : osgi-dev-boun...@mail.osgi.org  de la part 
de Daghan ACAY 
Envoyé : dimanche 27 novembre 2016 03:38
À : OSGi Developer Mail List
Objet : Re: [osgi-dev] help needed


Hi Gwendal,


I believe "osgi.enroute.iot.pi.provider" is no longer a part of enroute distro. 
Please remove the manually downloaded pi4j from your project and do the 
following:


1- open cnf>central.xml

2- Add the following



org.osgi
osgi.enroute.iot.pi.provider
2.0.0



This should solve your problem.


PS: if cannot find cnf>central.xml then let me know (possibly you will see 
cnf>central.json), I will provide another solution.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of gwendal toullec 
Sent: Sunday, November 27, 2016 12:20 AM
To: osgi-dev@mail.osgi.org
Subject: [osgi-dev] help needed


Hi all, I am trying to do this tutorial


http://enroute.osgi.org/tutorial_iot/120-exploring.html


but I have got a problem with:

osgi.enroute.iot.pi.provider

package is not find so I can resolve bndrun dependencies:


Unable to resolve <> version=null:
   missing requirement osgi.enroute.iot.pi.provider



and when I try with

osgi.enroute.iot.pi.command

dependencies not found:


Unable to resolve <> version=null:
   missing requirement enroute.iot.raspberry.application
->  Unable to resolve enroute.iot.raspberry.application 
version=1.0.0.201611270001:
   missing requirement com.pi4j.system]


I manually dowload and add pi4j in my project build path so I haven't no more 
eclipse problem but I fell that it is not a good solution for osgi and it not 
run on my remote raspberry ssh console...


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Object Converters for osgi

2016-11-26 Thread Daghan ACAY
Sorry Mat,

That email belongs to Raymond. Thanks for the links though.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Matt Sicker 
Sent: Sunday, November 27, 2016 05:06 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Object Converters for osgi

I'm not really sure what those are.

On 26 November 2016 at 23:16, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Mat,


I did not want to hijack the original thread.


I meant exactly those, thanks. But then what did you mean by "Converter - Felix 
(standardized light weight object conversion)"?


Cheers

-Daghan


Do you mean libraries for object conversion? I know of a couple general purpose 
bean mappers:
http://mapstruct.org/
http://dozer.sourceforge.net/
Dozer - Dozer<http://dozer.sourceforge.net/>
dozer.sourceforge.net<http://dozer.sourceforge.net>
Dozer. Dozer is a Java Bean to Java Bean mapper that recursively copies data 
from one object to another. Typically, these Java Beans will be of different 
complex ...




As for conversion APIs, there's the Felix one, a Camel one, Blueprint has one, 
and there's something in DS for that, too (metatypes?), though I don't know 
much about that one.

On 26 November 2016 at 21:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Matt,


I was looking into something similar in my project if you mean similar concepts 
as in "Spring or Camel converters" with "Converter - Felix (standardized light 
weight object conversion)" then please let me know where I can 
access/contribute to that project.


Cheers

-Daghan



___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Matt Sicker mailto:boa...@gmail.com>>
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Object Converters for osgi

2016-11-26 Thread Daghan ACAY
Hi Mat,


I did not want to hijack the original thread.


I meant exactly those, thanks. But then what did you mean by "Converter - Felix 
(standardized light weight object conversion)"?


Cheers

-Daghan


Do you mean libraries for object conversion? I know of a couple general purpose 
bean mappers:
http://mapstruct.org/
http://dozer.sourceforge.net/
Dozer - Dozer<http://dozer.sourceforge.net/>
dozer.sourceforge.net
Dozer. Dozer is a Java Bean to Java Bean mapper that recursively copies data 
from one object to another. Typically, these Java Beans will be of different 
complex ...




As for conversion APIs, there's the Felix one, a Camel one, Blueprint has one, 
and there's something in DS for that, too (metatypes?), though I don't know 
much about that one.

On 26 November 2016 at 21:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Matt,


I was looking into something similar in my project if you mean similar concepts 
as in "Spring or Camel converters" with "Converter - Felix (standardized light 
weight object conversion)" then please let me know where I can 
access/contribute to that project.


Cheers

-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] New to OSGI and in discovery/evaluation phase, please advise

2016-11-26 Thread Daghan ACAY
Hi Matt,


I was looking into something similar in my project if you mean similar concepts 
as in "Spring or Camel converters" with "Converter - Felix (standardized light 
weight object conversion)" then please let me know where I can 
access/contribute to that project.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Matt Sicker 
Sent: Thursday, November 24, 2016 4:47 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] New to OSGI and in discovery/evaluation phase, please 
advise

I'll plug Apache Camel  and Apache CXF 
 as immensely useful libraries in the OSGi world. In 
particular, I'd also recommend Apache Karaf  as an 
enterprise container for OSGi, but there's nothing wrong with embedding Felix 
or Equinox in an existing server (or figuring out how to leverage the existing 
OSGi infrastructure in your Java EE server; most if not all of them are 
implemented on top of OSGi nowadays including WebLogic 
).
Apache Karaf
karaf.apache.org
Karaf can run as a standalone container, supporting a wide range of 
applications and technologies.


Apache CXF -- Index
cxf.apache.org
Apache CXF is an open source services framework. CXF helps you build and 
develop services using frontend programming APIs, like JAX-WS and JAX-RS. These 
services can ...


Apache Camel: Index
camel.apache.org
Apache Camel ™ is a versatile open-source integration framework based on known 
Enterprise Integration Patterns. Camel empowers you to define routing and 
mediation ...



For custom deployments, there is also Apache ACE , 
though I've never used it before.
[http://www.apache.org/images/asf_logo.gif]

Apache ACE - Background
ace.apache.org
Apache ACE is a software distribution framework that allows you to centrally 
manage and distribute software components, configuration data and other 
artifacts to ...



As for some tutorials, these guys have a bunch of sample OSGi projects using 
various technologies:

https://github.com/cschneider
[https://avatars2.githubusercontent.com/u/484584?v=3&s=400]

cschneider (Christian Schneider) · GitHub
github.com
cschneider has 65 repositories available. Follow their code on GitHub.



https://github.com/jbonofre
[https://avatars3.githubusercontent.com/u/158903?v=3&s=400]

jbonofre (Jean-Baptiste Onofré) · GitHub
github.com
jbonofre has 40 repositories available. Follow their code on GitHub.




On 24 November 2016 at 09:12, Raymond Auge 
mailto:raymond.a...@liferay.com>> wrote:
Following Felix's shameless Apache/Adobe plugs ;) I'll add:

Liferay was/is a traditionally massive enterprise WAR (but really more) for 
which, in time we realized monoliths are really very #$%^&@... and so we 
learned and adopted OSGi inside our application and gradually (not so gradually 
actually) evolved our legacy non-modular code into our embedded OSGi framework. 
This was a massive change but totally the right thing to do.

We use Apache Felix/Apache Aries/Eclipse Equinox (and other OSS) projects as 
sources for many of our key "subsystems" and we're helping (trying anyway) to 
build out even more systems that don't currently exist in OSGi as members of 
the greater OSGi community and by participating in the OSGi Alliance. We've 
gained so many benefits from this relationship with the OSGi community that I 
highly recommend participating.

Just a small list of the current work in progress (YOU CAN GET IN ON THE GROUND 
FLOUR!!!):

Push Streams - Aries (an async event streaming API)
tx-control - Aries (functional oriented transaction management)
JAX-RS Whiteboard - Aries
CDI Extender - Aries (coming soon)
Converter - Felix (standardized light weight object conversion)
Configurator - Felix (deployable configurations)

and many more...

;)

- Ray


On Thu, Nov 24, 2016 at 9:45 AM, Felix Meschberger 
mailto:fmesc...@adobe.com>> wrote:
Hi Wai Keung

This is a shameless Apache Software Foundation plug, sorry ;-)

Having said that, the Apache Felix project 
(felix.apache.org) is basically the OSGi „core“ home 
at Apache while Apache Aries (aries.apache.org) has a 
lot of Enterprise Spec implementations.

Apache Sling (sling.apache.org), finally, is a web 
application framework entirely built „in OSGi“. It is the basis, sorry this is 
an Adobe plug, of Adobe Experience Manager which is a complete enterprise grade 
Web Content (and more) Management application and platform. All in OSGi. 
Sling’s Launchpad which helps building single file deployables for application 
deployment builds 

Re: [osgi-dev] help needed

2016-11-26 Thread Daghan ACAY
Hi Gwendal,


I believe "osgi.enroute.iot.pi.provider" is no longer a part of enroute distro. 
Please remove the manually downloaded pi4j from your project and do the 
following:


1- open cnf>central.xml

2- Add the following



org.osgi
osgi.enroute.iot.pi.provider
2.0.0



This should solve your problem.


PS: if cannot find cnf>central.xml then let me know (possibly you will see 
cnf>central.json), I will provide another solution.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of gwendal toullec 
Sent: Sunday, November 27, 2016 12:20 AM
To: osgi-dev@mail.osgi.org
Subject: [osgi-dev] help needed


Hi all, I am trying to do this tutorial


http://enroute.osgi.org/tutorial_iot/120-exploring.html


but I have got a problem with:

osgi.enroute.iot.pi.provider

package is not find so I can resolve bndrun dependencies:


Unable to resolve <> version=null:
   missing requirement osgi.enroute.iot.pi.provider



and when I try with

osgi.enroute.iot.pi.command

dependencies not found:


Unable to resolve <> version=null:
   missing requirement enroute.iot.raspberry.application
->  Unable to resolve enroute.iot.raspberry.application 
version=1.0.0.201611270001:
   missing requirement com.pi4j.system]


I manually dowload and add pi4j in my project build path so I haven't no more 
eclipse problem but I fell that it is not a good solution for osgi and it not 
run on my remote raspberry ssh console...


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Component being activated twice?

2016-11-24 Thread Daghan ACAY
Joining this thread these with Tim's other email about *-runprovided*.

It reminds me the Set theory in maths. One can define the very same set by 
saying

1- -distro: liferay
2- distro: karaf minus -runblacklist
3- -runprovided(example) plus -runrequires.

I hope i am not missing crucial detail by trying to simplify it. But assuming 
my simplification is valid, i prefer we have major -distro's which we can fine 
tune them with the existing -runblacklist and -runrequires.

This being said, distros should be well defined and we'll documented and 
minimal in number. I guess this is one thing enroute is trying to solve. Osgi 
is great but leaves to much to the developer and configuration. It might 
benefit osgi to go convention over configuration.

To be honest very little talks about using Spring with different app serves 
mixing cxf instead of Spring REST etc. IMHO we are spoiled with options and we 
want more for the sake of asking for it.

Now my question is: can osgi/enroute provide well defined distros in the near 
future. Some examples might be:

1-karaf
2-felix/enroute
3- equinox/eclipse
4- possibly servicemix

Or should we start creating or own distros?

I hope i did not derail the discussion.

Regards
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Raymond Auge 
Sent: Thursday, November 24, 2016 03:49 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Component being activated twice?

Given the current state of the art, what most affects your resolver output 
starts with:

-runee: JavaSE-1.8 # this sets the base in terms of which JRE you are targeting 
this is the fundamental parts provided by all JREs of a given version

then you have:

-distro:  # which is an optional pre-created jar with a manifest 
containing all the capabilities provided by your "target platform", in your 
case it's Karaf + whatever addons you've added to your karaf instance.

those two things define what should NOT be included in your resolve result.

Then your input is:

-runrequires:  # this is your application you want to run. All the 
bundle's you've defined here are the ones you absolutely want to have in the 
runtime.

-runblacklist:  # this is the set of bundles which you've explicitly 
asked the resolver to never return in it's result.. but it doesn't mean they're 
not already provided by your system.

For me the lynch pin to making this whole cycle complete would be that:

-distro: 

represent the current reality, vs some snapshot in time which may no longer be 
valid.

If it were possible to have that then you could theoretically point:

-distro: karak;index="socket:/..."

OR

-distro: liferay;index="file:/..."

OR

-distro: websphere;index="http:/..."

OR

-distro: my_super_custom_runtime;index="git:/..."

and your resolver operation would actually protect you from introducing 
incompatible, or completely duplicated things.

If we took this a step further and had:

-distro: repo;name="liferay"

and have the repo config be:

-plugin.distro.repo: \
com.foo.super.LiveIndexOfRuntimeRepository; \
index="socket:/..."; \
name="liferay"

BOOM

Not only would I have resolution protection for those things I mentioned above, 
but I could physically browse the runtime to see what's already there.

- Ray


On Wed, Nov 23, 2016 at 11:27 AM, Tim Ward 
mailto:t...@telensa.com>> wrote:
OK, so if I feature:uninstall scr from Karaf I can let Resolve do its thing and 
everything works.

Is that an error in

http://enroute.osgi.org/appnotes/bndtools-and-karaf.html

then?


On 23/11/2016 16:23, Christian Schneider wrote:
-runfw just sets the OSGi framework. Karaf basically also does this inside when 
you can choose between felix and equinox but karaf is a lot more than that.
So correctly setting up bndtools for karaf as a runtime will involve a lot more 
than -rnfw.

I think there currently is not complete solution for this but I am also be very 
interested in the combination of karaf and bndtools.

Christian

On 23.11.2016 17:18, Tim Ward wrote:
I was sort-of guessing that that's what -runfw was about, but didn't find 
enough documentation to be able to understand it. Via monkey-see monkey-do 
cut-and-paste I've ended up with

-runfw: org.apache.felix.framework;version='[5.6.1,5.6.1]'

which clearly does NOT tell it "you are running on Karaf, with such-and-such 
list of other bundles installed".

Further, I was sort-of guessing that -runblacklist might be relevant here, but 
was puzzled to find it expressed (in the GUI) in terms of bundles? packages? 
rather than capabilities.

But it's not what I want, because putting the unwanted bundle in as a 
blacklisted item gets me

==
Unable to resolve <> version=null:
   missing requirement com.telensa.apps.planet.p2c.provider

->  Unable to resolve com.telensa.apps.planet.p2c.provider 
version=1.0.0.20161123

Re: [osgi-dev] DS & Concurrency

2016-11-23 Thread Daghan ACAY
Hi Peter

I saw it on twitter it is very welcomed article. An initial scan is very 
promising. I will read in full and possibly add some things about locks and 
latches.

I did much of it with bluetooth protocol and they are hopefully correct  :)

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Thursday, November 24, 2016 03:00 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] DS & Concurrency

Feel free to add a section with such rules … Though I am not a fan of them 
because they tend to be in the way when I am thinking and are too often not 
that useful for experienced people; I prefer good code reviews.

Kind regards,

Peter Kriens


On 23 Nov 2016, at 16:47, Raymond Auge 
mailto:raymond.a...@liferay.com>> wrote:

Hi Peter,

I've read about 1/4 of the document so far (if only I had more time) and so far 
I like it.

As you've already found this is a much needed piece of work. We (Liferay) 
struggle with this in our company to a high degree to the point that we have 
many source formatting checks/rules in place which attempt to capture as many 
concurrency oversights as possible. These checks are actually REALLY annoying 
but I classify it with baseline in that even the smartest developers will 
occasionally let their fingers write code that their brain hasn't compiled and 
such checks keep them honest. Oops I accidentally broke binary compat... Oops I 
accidentally exposed a concurrency issue.

So, yes I think this is very useful and I promise to read it fully.

Sincerely,
- Ray

On Wed, Nov 23, 2016 at 10:06 AM, Peter Kriens 
mailto:peter.kri...@aqute.biz>> wrote:
I’ve just created an app note about DS and concurrent patterns:

http://enroute.osgi.org/appnotes/concurrency.html

Feedback appreciated, kind regards,

Peter Kriens

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] How to make packages only visible for some peer bundles?

2016-11-17 Thread Daghan ACAY
I might be totally of with this but have you considered fragments? This link 
might be useful

http://blog.vogella.com/2016/02/09/osgi-bundles-fragments-dependencies/

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Christian Schneider 
Sent: Friday, November 18, 2016 05:29 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] How to make packages only visible for some peer bundles?

Well actually I did not expect it to work automatically. So I was not even 
trying it.

After your comment I tested using a mandatory attribute and indeed it works 
fine. There is one caveat of course. As it works without additional config on 
the import side it also means that it will not really prevent people to simply 
use a class from the internal package.

Still I think it is a good solution as the attribute can tell quite explicitly 
in which context it is appropriate to use the package. For example I used an 
attribute braveprivate=true. Which quite clearly tells that it is just form 
brave internal usage.

So thanks for the hint.

Christian

On 14.11.2016 10:45, Timothy Ward wrote:
Hi Christian,

I’m really not sure why you aren’t advocating documentation *and* mandatory 
attributes. Bnd will add the attribute for you if it’s needed, so there’s no 
need to customise Import-Package and extra effort for the implementors in 
maintaining this, just an extra check at runtime to prevent class space wiring.

Regards,

Tim


On 14 Nov 2016, at 08:48, Christian Schneider 
mailto:ch...@die-schneider.net>> wrote:


I am currently helping at openzipkin to make it fully OSGi ready. At one of the 
projects we came up with a problem that is of some general relevance.

In the project brave-core there is a package 
com.github.kristofa.brave.internal. It contains several classes that are used 
inside other brave modules but should not be used by users. It started with an 
annotation that we were able to limit to source retention .. but there are also 
normal classes that will require package visibility.

See:
https://github.com/openzipkin/brave/issues/268

I know several possible solutions:

  *   Export the package but document in the classes that they are brave 
internal. This solution has the advantage that it is easiest to configure
  *   Shade the package into each brave module in different package. So the 
classes become internally embedded into each module. This approach requires 
quite a bit of tuning in each module and is sensitive to changes in the code.
  *   Use mandatory attributes like recommended by Neil. I will scope how I 
would do this below. The disadvantage here seems to be that we need a manually 
tuned Import-Package statement in each module that imports the package.

How to use a mandatory attribute for the project public package:

In brave-core:

Export-Package: com.github.kristofa.brave.internal;brave=true;mandatory=brave

In brave modules:

Import-Package: com.github.kristofa.brave.internal;brave=true

So this would make the package visible to other brave modules but would make 
sure users do not accidently use the package. Of course users could still 
import the package like above if they intend to break things.

So I personally would go with the first option to just document that the 
package and the classes are for internal use. The main reason for me is to 
minimize the configuration effort inside brave. The problem is that brave and 
zipkin maintainers do not use OSGi themselves. So the more complicated we make 
the configuration the more likely it is to break over time.

So what strategy would you recommend for this problem? Are there ways to make 
the other options easy to maintain too?

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Mvn for enroute

2016-11-16 Thread Daghan ACAY
Hi david,

I did DISABLED. However build fails with url cannot be found. even with 
REQUIRED i get the following info on console

[INFO] The Artifact org.osgi:osgi.enroute.websecurity.adapter:jar:2.0.0 could 
not be found in any repository, returning the local location

Cheers
-daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: David Daniel 
Sent: Wednesday, November 16, 2016 10:46 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Mvn for enroute

When doing a ci build to get the maven url set the localurl to DISABLED.  When 
debugging on your local dev box set it to required.


REQUIRED


On Wed, Nov 16, 2016 at 5:56 AM, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Tim,


I followed your advice and find a bunch of mvn plugins for bnd here


https://github.com/bndtools/bnd/tree/master/maven



I have used bnd-indexer-maven-plugin on the example given in the tutorial 
<http://enroute.osgi.org/tutorial_eval/> 
http://enroute.osgi.org/tutorial_eval/050-start.html and created index files in 
all projects. All great


Now I have two more question:


1- When I run the indexer plugin I see the following output


[INFO] The Artifact org.osgi:osgi.enroute.websecurity.adapter:jar:2.0.0 could 
not be found in any repository, returning the local location

which reflects in the generated index file as

 
  
  
  
  



I would expect something like

 
  
  https://mvnrepository.com/artifact/org.osgi/osgi.enroute.websecurity.adapter/2.0.0"/>
  
  


am I doing something wrong?

2- These index contains the dependencies of the project. I also create index 
file for my own projects. I can do that from eclipse->project->Release bundles 
and the indexes corresponding to my projects are created under 
cnf->release->index.xml along with the jar file under the folder with the name 
of the project. Is there a way to do it with mvn plugins?

Thanks for your response in advance

Cheers
-Daghan


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Timothy Ward mailto:tim.w...@paremus.com>>
Sent: Monday, November 14, 2016 10:48 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Mvn for enroute

is it possible to use only bndrun and not the pom file?

Yes - however in order for the bndrun file to work it needs to have one or more 
repositories to pull bundles from. In the example the repository that is used 
is a “POM repository” i.e. it uses dependencies from a Maven POM. Therefore the 
bndrun can only “see” what’s in the POM!

If you use a different kind of repository then there’s no need to put the 
dependency in the POM file, but then you need to create that other repository 
somehow. The bnd-indexer-maven-plugin may be of interest if you want to go in 
this direction, as might using Gradle and the bnd workspace model.

I hope this helps.

Regards,

Tim


On 13 Nov 2016, at 07:20, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi,

I am looking at http://enroute.osgi.org/tutorial_eval/400-command and under the 
heading "Adding the Command Bundle to the Runtime" it says to add the command 
bundle both to bndrun file and the pom.xml file. Strictly speaking command 
bundle is not a dependency so it does not need to go pom file. So I am looking 
something like this to be inserted to bndrun file:

osgi.identity;filter:='(&(osgi.identity=osgi.enroute.examples.eval.command)(osgi.version>=1.0.0-SNAPSHOT))'

but when I build with mvn install then I get the following error




[ERROR] Failed to execute goal 
biz.aQute.bnd:bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) on 
project osgi.enroute.examples.eval.bndrun: Unable to resolve <> 
version=null: missing requirement osgi.enroute.examples.eval.command; 
osgi.version>=1.0.0-SNAPSHOT -> [Help 1]

is it possible to use only bndrun and not the pom file?

Cheers
-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Mvn for enroute

2016-11-16 Thread Daghan ACAY
Hi Tim,


I followed your advice and find a bunch of mvn plugins for bnd here


https://github.com/bndtools/bnd/tree/master/maven



I have used bnd-indexer-maven-plugin on the example given in the tutorial 
<http://enroute.osgi.org/tutorial_eval/> 
http://enroute.osgi.org/tutorial_eval/050-start.html and created index files in 
all projects. All great


Now I have two more question:


1- When I run the indexer plugin I see the following output


[INFO] The Artifact org.osgi:osgi.enroute.websecurity.adapter:jar:2.0.0 could 
not be found in any repository, returning the local location

which reflects in the generated index file as

 
  
  
  
  



I would expect something like

 
  
  https://mvnrepository.com/artifact/org.osgi/osgi.enroute.websecurity.adapter/2.0.0"/>
  
  


am I doing something wrong?

2- These index contains the dependencies of the project. I also create index 
file for my own projects. I can do that from eclipse->project->Release bundles 
and the indexes corresponding to my projects are created under 
cnf->release->index.xml along with the jar file under the folder with the name 
of the project. Is there a way to do it with mvn plugins?

Thanks for your response in advance

Cheers
-Daghan


From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Timothy Ward 
Sent: Monday, November 14, 2016 10:48 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Mvn for enroute

is it possible to use only bndrun and not the pom file?

Yes - however in order for the bndrun file to work it needs to have one or more 
repositories to pull bundles from. In the example the repository that is used 
is a “POM repository” i.e. it uses dependencies from a Maven POM. Therefore the 
bndrun can only “see” what’s in the POM!

If you use a different kind of repository then there’s no need to put the 
dependency in the POM file, but then you need to create that other repository 
somehow. The bnd-indexer-maven-plugin may be of interest if you want to go in 
this direction, as might using Gradle and the bnd workspace model.

I hope this helps.

Regards,

Tim


On 13 Nov 2016, at 07:20, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi,

I am looking at http://enroute.osgi.org/tutorial_eval/400-command and under the 
heading "Adding the Command Bundle to the Runtime" it says to add the command 
bundle both to bndrun file and the pom.xml file. Strictly speaking command 
bundle is not a dependency so it does not need to go pom file. So I am looking 
something like this to be inserted to bndrun file:

osgi.identity;filter:='(&(osgi.identity=osgi.enroute.examples.eval.command)(osgi.version>=1.0.0-SNAPSHOT))'

but when I build with mvn install then I get the following error




[ERROR] Failed to execute goal 
biz.aQute.bnd:bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) on 
project osgi.enroute.examples.eval.bndrun: Unable to resolve <> 
version=null: missing requirement osgi.enroute.examples.eval.command; 
osgi.version>=1.0.0-SNAPSHOT -> [Help 1]

is it possible to use only bndrun and not the pom file?

Cheers
-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Mvn for enroute

2016-11-12 Thread Daghan ACAY
Hi,


I am looking at http://enroute.osgi.org/tutorial_eval/400-command and under the 
heading "Adding the Command Bundle to the Runtime" it says to add the command 
bundle both to bndrun file and the pom.xml file. Strictly speaking command 
bundle is not a dependency so it does not need to go pom file. So I am looking 
something like this to be inserted to bndrun file:


osgi.identity;filter:='(&(osgi.identity=osgi.enroute.examples.eval.command)(osgi.version>=1.0.0-SNAPSHOT))'


but when I build with mvn install then I get the following error




[ERROR] Failed to execute goal 
biz.aQute.bnd:bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) on 
project osgi.enroute.examples.eval.bndrun: Unable to resolve <> 
version=null: missing requirement osgi.enroute.examples.eval.command; 
osgi.version>=1.0.0-SNAPSHOT -> [Help 1]

is it possible to use only bndrun and not the pom file?

Cheers
-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

2016-11-12 Thread Daghan ACAY
Hi Christian,


I guess I found a bug [😊]


your suggestion works if bndrun file *has a* "-runbundles:" entry. value can be 
empty or some other value.


However, if there is a value from the previous build and you add a new 
"-runrequires" and do a build "-runrequires" entry is replaced by the 
additional runbundles instead of union of the required bundles. Every time you 
do a build it oscillates between the dependencies. here is how you can 
reproduce it:



-runrequires: \
osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\


-runbundles: {intentially empty}


then run mvn install with the  configuration below, then you get


-runrequires:  \
osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\


-runbundles: \
org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
org.apache.felix.log;version='[1.0.1,1.0.2)',\
org.apache.felix.scr;version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\
org.osgi.service.metatype;version='[1.3.0,1.3.1)',\
osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)'


now change the runrequires as follows


-runrequires: \
osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\
osgi.identity;filter:='(osgi.identity=osgi.enroute.gogo.shell.provider)'

And run mvn install again, you will get

-runbundles: \
org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\
osgi.enroute.gogo.shell.provider;version='[2.0.0,2.0.1)'

If you run mvn install at this stage without making any change then the run 
bundles will look like the previous build, i.e.

-runbundles: \
org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
org.apache.felix.log;version='[1.0.1,1.0.2)',\
org.apache.felix.scr;version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\
org.osgi.service.metatype;version='[1.3.0,1.3.1)',\
osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)'

To get the *union* of resolutions then you need to clean the "-runbundles" and 
run mvn install again, i.e.

-runbundles: \
org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\
org.apache.felix.log;version='[1.0.1,1.0.2)',\
org.apache.felix.scr;version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\
org.osgi.service.metatype;version='[1.3.0,1.3.1)',\
osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)',\
osgi.enroute.gogo.shell.provider;version='[2.0.0,2.0.1)'

It think this is a bug and quite dangerous since it will break the runtime 
aggregation and will make many people lose a lot hours trying to debug the 
problem.

Cheers
-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: Sunday, November 13, 2016 6:26 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...


Hi Christian,


I tried your suggestion inside the bndrun project as follows:





biz.aQute.bnd
bnd-export-maven-plugin
3.4.0-SNAPSHOT

true
false

osgi.enroute.examples.eval.bndrun

.




export








The following still gives the same error

bndrun $  mvn install

Result:

[INFO] --- bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) @ 
osgi.enroute.examples.eval.bndrun ---

-runbundles: \
org.apache.felix.configadmin; version='[1.8.8,1.8.9)',\
org.apache.felix.log; version='[1.0.1,1.0.2)',\
org.apache.felix.scr; version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype; version='[1.4.100,1.4.101)',\
org.osgi.service.metatype; version='[1.3.0,1.3.1)',\
osgi.enroute.examples.eval.simple.provider; version='[1.0.0,1.0.1)'

am I missing something?

Cheers
-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Christian Schneider 
Sent: Thursday, October 13, 2016 8:38 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

Hi Daghan,

I think I can answer part of your questions.

Christian

On 12.10.2016 23:27, Daghan ACAY wrote:
>
> 2- how is bndtool resolution and hot deploy from eclipse affected?
> Should we still resolve bndrun in eclipse?
>
You can still resolve using the UI. But you can also do a pure maven build.
Hot deploy does not work reliably. You have to at least do mvn install
on the module you changed and restart your OSGi runtime.
>
> 3- as a suggestion breaking a build and copy pasting will not work in
> ci/cd. I think a more automated solution can be beneficial.
>
You can use this configuration to make the resolve completely automate

Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

2016-11-12 Thread Daghan ACAY
Hi Christian,


I tried your suggestion inside the bndrun project as follows:





biz.aQute.bnd
bnd-export-maven-plugin
3.4.0-SNAPSHOT

true
false

osgi.enroute.examples.eval.bndrun

.




export








The following still gives the same error

bndrun $  mvn install

Result:

[INFO] --- bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) @ 
osgi.enroute.examples.eval.bndrun ---

-runbundles: \
org.apache.felix.configadmin; version='[1.8.8,1.8.9)',\
org.apache.felix.log; version='[1.0.1,1.0.2)',\
org.apache.felix.scr; version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype; version='[1.4.100,1.4.101)',\
org.osgi.service.metatype; version='[1.3.0,1.3.1)',\
osgi.enroute.examples.eval.simple.provider; version='[1.0.0,1.0.1)'

am I missing something?

Cheers
-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Christian Schneider 
Sent: Thursday, October 13, 2016 8:38 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

Hi Daghan,

I think I can answer part of your questions.

Christian

On 12.10.2016 23:27, Daghan ACAY wrote:
>
> 2- how is bndtool resolution and hot deploy from eclipse affected?
> Should we still resolve bndrun in eclipse?
>
You can still resolve using the UI. But you can also do a pure maven build.
Hot deploy does not work reliably. You have to at least do mvn install
on the module you changed and restart your OSGi runtime.
>
> 3- as a suggestion breaking a build and copy pasting will not work in
> ci/cd. I think a more automated solution can be beneficial.
>
You can use this configuration to make the resolve completely automated

   true
   false


--
Christian Schneider
http://www.liquid-reality.de
Liquid Reality - Christian Schneider's Blog - Liquid 
Reality<http://www.liquid-reality.de/>
www.liquid-reality.de
Apache karaf is an open source OSGi server developed by the Apache foundation. 
It provides very convenient management functionality on top of existing OSGi 
frameworks.




Open Source Architect
http://www.talend.com
[http://upload.wikimedia.org/wikipedia/en/2/21/Talend_logo.png]<http://www.talend.com/>

Talend Real-Time Open Source Data Integration Software<http://www.talend.com/>
www.talend.com
Talend open source integration software products offer real-time solutions for 
all types of data integration. Learn more about the benefits of Hadoop and 
Spark.




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] "Using OSGi enRoute with Maven"

2016-11-12 Thread Daghan ACAY
Thanks Tim,


It has solved my problem.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Tim Ward 
Sent: Saturday, November 12, 2016 8:46 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] "Using OSGi enRoute with Maven"

Hi,

I'm pretty sure that you're using a version of Maven that's too old for the 
latest bnd-maven-plugin. Try checking your version and upgrading.

Tim

Sent from my iPhone

On 12 Nov 2016, at 06:44, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:


I am following the tutorial at 
http://enroute.osgi.org/tutorial_eval/050-start.html and I am having difficulty 
making it work. I found one problem and fixed it on my local


parent pom dependency should be changed by dropping the SNAPSHOT



 org.osgi
 osgi.enroute.base.api
 2.0.0-SNAPSHOT


also the code here should be updated


https://github.com/osgi/osgi.enroute.examples.eval/blob/master/pom.xml


<https://github.com/osgi/osgi.enroute.examples.eval/blob/master/pom.xml>However 
when I create the pom.xml for the API as defined in 
http://enroute.osgi.org/tutorial_eval/300-api and run


mvn verify


I get the following error



[INFO] 
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process 
(default) on project osgi.enroute.examples.eval.api: Execution default of goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process failed: A required class was 
missing while executing biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process: 
org/slf4j/LoggerFactory
[ERROR] -
[ERROR] realm =plugin>biz.aQute.bnd:bnd-maven-plugin:3.3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/bnd-maven-plugin/3.3.0/bnd-maven-plugin-3.3.0.jar
[ERROR] urls[1] = 
file:/home/daghan/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[2] = 
file:/home/daghan/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
[ERROR] urls[3] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/biz.aQute.bndlib/3.3.0/biz.aQute.bndlib-3.3.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -: 
org.slf4j.LoggerFactory
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process (default) on project 
osgi.enroute.examples.eval.api: Execution default of goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process failed: A required class was 
missing while executing biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process: 
org/slf4j/LoggerFactory
-
realm =plugin>biz.aQute.bnd:bnd-maven-plugin:3.3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/bnd-maven-plugin/3.3.0/bnd-maven-plugin-3.3.0.jar
urls[1] = 
file:/home/daghan/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
urls[2] = 
file:/home/daghan/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
urls[3] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/biz.aQute.bndlib/3.3.0/biz.aQute.bndlib-3.3.0.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-

at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.codehaus.plexus.classworlds.laun

Re: [osgi-dev] Reference Filters

2016-11-12 Thread Daghan ACAY
Hi Paul,


I am really keen to learn and promote OSGi and enRoute in Melbourne. If you 
join me we can help each other. If you need help please do not hesitate to ask.


Cheers



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Paul F Fraser 
Sent: Saturday, November 12, 2016 8:34 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Reference Filters

Thanks, Daghan,

I will check out the example and hopefully understand the process.
Seems that you are getting well into enRoute, a good way to go.
Not sure when I can get to an OSGi Melbourne meetup, but still on the list :-[

Paul

On 11/11/2016 9:38 PM, Daghan ACAY wrote:

Hi Paul,


You can find an example here


https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json



see "mqttProtocolReference.target" : "(id=ttn.staging.mqtt)",

and the corresponding binding here

https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.development.board1.device.provider/src/com/easyiot/development/board1/device/provider/DevelopmentBoard1Impl.java


// Bind mqttClient

@Reference(name = "mqttProtocolReference", cardinality = 
ReferenceCardinality.OPTIONAL, policyOption = ReferencePolicyOption.GREEDY)

private TtnMqttProtocol ttnMqttClient;


Hope to see you at OSGi meetings [??]

-Daghan


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
<mailto:osgi-dev-boun...@mail.osgi.org> on 
behalf of Paul F Fraser <mailto:pa...@a2zliving.com>
Sent: Friday, November 11, 2016 7:03 AM
To: OSGi Developer Mail List
Subject: [osgi-dev] Reference Filters


Hi,

A previous discussion in this list

@Component
public class Component
{
  @Reference(target = "(alias = ${alias})"
  public void bindService(Service service)
}

and the solution proposed was to use .target as a property.

Are there any code examples available that provide more info on this technique.

I am trying to create multiple named databases and obtain unique references to 
each by their name.

Regards

Paul Fraser



___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] "Using OSGi enRoute with Maven"

2016-11-11 Thread Daghan ACAY
I am following the tutorial at 
http://enroute.osgi.org/tutorial_eval/050-start.html and I am having difficulty 
making it work. I found one problem and fixed it on my local


parent pom dependency should be changed by dropping the SNAPSHOT



 org.osgi
 osgi.enroute.base.api
 2.0.0-SNAPSHOT


also the code here should be updated


https://github.com/osgi/osgi.enroute.examples.eval/blob/master/pom.xml


However 
when I create the pom.xml for the API as defined in 
http://enroute.osgi.org/tutorial_eval/300-api and run


mvn verify


I get the following error



[INFO] 
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process 
(default) on project osgi.enroute.examples.eval.api: Execution default of goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process failed: A required class was 
missing while executing biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process: 
org/slf4j/LoggerFactory
[ERROR] -
[ERROR] realm =plugin>biz.aQute.bnd:bnd-maven-plugin:3.3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/bnd-maven-plugin/3.3.0/bnd-maven-plugin-3.3.0.jar
[ERROR] urls[1] = 
file:/home/daghan/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[2] = 
file:/home/daghan/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
[ERROR] urls[3] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/biz.aQute.bndlib/3.3.0/biz.aQute.bndlib-3.3.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -: 
org.slf4j.LoggerFactory
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process (default) on project 
osgi.enroute.examples.eval.api: Execution default of goal 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process failed: A required class was 
missing while executing biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process: 
org/slf4j/LoggerFactory
-
realm =plugin>biz.aQute.bnd:bnd-maven-plugin:3.3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/bnd-maven-plugin/3.3.0/bnd-maven-plugin-3.3.0.jar
urls[1] = 
file:/home/daghan/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
urls[2] = 
file:/home/daghan/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
urls[3] = 
file:/home/daghan/.m2/repository/biz/aQute/bnd/biz.aQute.bndlib/3.3.0/biz.aQute.bndlib-3.3.0.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-

at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default 
of goal biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process failed: A required 
class was missing while executing 
biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process: org/slf4j/LoggerFactory
-

Re: [osgi-dev] Reference Filters

2016-11-11 Thread Daghan ACAY
Hi Paul,


You can find an example here


https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json



see "mqttProtocolReference.target" : "(id=ttn.staging.mqtt)",


and the corresponding binding here


https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.development.board1.device.provider/src/com/easyiot/development/board1/device/provider/DevelopmentBoard1Impl.java



// Bind mqttClient
@Reference(name = "mqttProtocolReference", cardinality = 
ReferenceCardinality.OPTIONAL, policyOption = ReferencePolicyOption.GREEDY)
private TtnMqttProtocol ttnMqttClient;


Hope to see you at OSGi meetings [😊]

-Daghan


From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Paul F Fraser 
Sent: Friday, November 11, 2016 7:03 AM
To: OSGi Developer Mail List
Subject: [osgi-dev] Reference Filters


Hi,

A previous discussion in this list

@Component
public class Component
{
  @Reference(target = "(alias = ${alias})"
  public void bindService(Service service)
}

and the solution proposed was to use .target as a property.

Are there any code examples available that provide more info on this technique.

I am trying to create multiple named databases and obtain unique references to 
each by their name.

Regards

Paul Fraser
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Understanding activate

2016-10-26 Thread Daghan ACAY
I stand corrected [😊]


I hope you find the problem. Just another suggestion, can you provide the code 
so we can look into it in more detail?


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of manoj.vrajam...@wipro.com 
Sent: Wednesday, October 26, 2016 10:34 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate

Just tried @Component(immediate = true, service=SampleImpl.class  This did  
*not* work either.. ☹

But, you are right… I have *not* implemented any interface ..though I have 
created a dummy one (simply lying there – created just in case I need it later)

public interface Alljoyn{
}

From: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] On 
Behalf Of Daghan ACAY
Sent: 26 October 2016 15:55
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

I guess I know the problem.



Your component does not implement an interface. That is, Osgi is build on the 
idea of abstraction. You define an interface (java interface) and your 
component implements it. If you follow that pattern then @Component can figure 
out properly how to register your component. In your case you have an 
implementation without an interface, hence you are breaking the convention. 
there is nothing wrong with that, but you net to say OSGi DS that you are doing 
this. Here is how you can do it:



try


@Component(immediate = true, service=SampleImpl.class)
public class SampleImpl {


I hope this works



Cheers

Daghan




From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of manoj.vrajam...@wipro.com<mailto:manoj.vrajam...@wipro.com> 
mailto:manoj.vrajam...@wipro.com>>
Sent: Wednesday, October 26, 2016 9:47 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Understanding activate


I did this..Put a breakpoint at the print..anad ran it usin debug osgi ...I did 
not get any different result...


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: 26 October 2016 15:00:17
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

Another thing i do is put a break point at the line, e.g. activate method in 
your case, and run it in debug mode. It is more reliable than logs on console.

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: Wednesday, October 26, 2016 08:27 PM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Understanding activate

I will just get a wild guess at it.

DS component start time is not deterministic. That is your component can start 
first in all components, in the middle or the last.

I see you are using debug run which starts a lot components and prints out to 
log. I say your "starting..." can be printed earlier in console. Please run 
again with debug and scroll up.  I have a feeling you will find "starting..."

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Timothy Ward mailto:tim.w...@paremus.com>>
Sent: Wednesday, October 26, 2016 08:22 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate

Also, your component should definitely not have a waiting thread which 
discovers devices. The devices should register services which are injected into 
the component. The injection can be used to trigger an action at that time. 
This is known as the whiteboard pattern - bundles register a service so that 
they can be discovered and used by another component.

Regards,

Tim


On 26 Oct 2016, at 11:20, Neil Bartlett 
mailto:njbartl...@gmail.com>> wrote:

You don’t invoke the activate/deactivate methods yourself. They are invoked by 
the SCR at the appropriate time, assuming they have been correctly declared.

On 26 Oct 2016, at 09:20, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Please find reply inline…

From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:20
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate

** This mail has been sent from an external source **

Re: [osgi-dev] Understanding activate

2016-10-26 Thread Daghan ACAY
I guess I know the problem.


Your component does not implement an interface. That is, Osgi is build on the 
idea of abstraction. You define an interface (java interface) and your 
component implements it. If you follow that pattern then @Component can figure 
out properly how to register your component. In your case you have an 
implementation without an interface, hence you are breaking the convention. 
there is nothing wrong with that, but you net to say OSGi DS that you are doing 
this. Here is how you can do it:


try


@Component(immediate = true, service=SampleImpl.class)
public class SampleImpl {


I hope this works


Cheers

Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of manoj.vrajam...@wipro.com 
Sent: Wednesday, October 26, 2016 9:47 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate


I did this..Put a breakpoint at the print..anad ran it usin debug osgi ...I did 
not get any different result...


From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: 26 October 2016 15:00:17
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

Another thing i do is put a break point at the line, e.g. activate method in 
your case, and run it in debug mode. It is more reliable than logs on console.

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Daghan ACAY 
Sent: Wednesday, October 26, 2016 08:27 PM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate


I will just get a wild guess at it.

DS component start time is not deterministic. That is your component can start 
first in all components, in the middle or the last.

I see you are using debug run which starts a lot components and prints out to 
log. I say your "starting..." can be printed earlier in console. Please run 
again with debug and scroll up.  I have a feeling you will find "starting..."

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Timothy Ward 
Sent: Wednesday, October 26, 2016 08:22 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Understanding activate

Also, your component should definitely not have a waiting thread which 
discovers devices. The devices should register services which are injected into 
the component. The injection can be used to trigger an action at that time. 
This is known as the whiteboard pattern - bundles register a service so that 
they can be discovered and used by another component.

Regards,

Tim


On 26 Oct 2016, at 11:20, Neil Bartlett 
mailto:njbartl...@gmail.com>> wrote:

You don’t invoke the activate/deactivate methods yourself. They are invoked by 
the SCR at the appropriate time, assuming they have been correctly declared.

On 26 Oct 2016, at 09:20, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Please find reply inline…

From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:20
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

An activate method is able to start its own threads, but it sounds like this 
may not be the right approach for you.
Me: Oh..okay..

What do you mean when you say "which would sleep and wait for others to join 
before proceeding for next action”? This sounds a lot like you should be using 
the OSGi service registry and referencing services rather than sleeping. That 
way your activate method will not need to wait.
Me: Actually my plan is to wait on sleep to discover devices.  [ I get a 
callback when I other devices join the network. That part is written (not 
tested).]

As for your current problem - is that code snippet really the component? The 
output indicates that you have a deactivate method defined as well.
Me: I have written a dummy deactivate method as well. It does nothing. My 
intention is to somehow invoke this function in this bundle and see what 
happens going forward when my java code executes. To start with I have just 
written a dummy print statement “starting….”

Regards,

Tim


On 26 Oct 2016, at 09:43, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

No…none of the others have activate() in them.. This is the first time I am 
writing an activate() method…

Plaese note: I just want a method in this bundle to be invoked on running the 
framework. I thought activate() would be the right one. But I understand from 
your comments that activate should not have a thread sleep

Re: [osgi-dev] Understanding activate

2016-10-26 Thread Daghan ACAY
Another thing i do is put a break point at the line, e.g. activate method in 
your case, and run it in debug mode. It is more reliable than logs on console.

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Daghan ACAY 
Sent: Wednesday, October 26, 2016 08:27 PM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Understanding activate


I will just get a wild guess at it.

DS component start time is not deterministic. That is your component can start 
first in all components, in the middle or the last.

I see you are using debug run which starts a lot components and prints out to 
log. I say your "starting..." can be printed earlier in console. Please run 
again with debug and scroll up.  I have a feeling you will find "starting..."

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Timothy Ward 
Sent: Wednesday, October 26, 2016 08:22 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Understanding activate

Also, your component should definitely not have a waiting thread which 
discovers devices. The devices should register services which are injected into 
the component. The injection can be used to trigger an action at that time. 
This is known as the whiteboard pattern - bundles register a service so that 
they can be discovered and used by another component.

Regards,

Tim


On 26 Oct 2016, at 11:20, Neil Bartlett 
mailto:njbartl...@gmail.com>> wrote:

You don’t invoke the activate/deactivate methods yourself. They are invoked by 
the SCR at the appropriate time, assuming they have been correctly declared.

On 26 Oct 2016, at 09:20, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Please find reply inline…

From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:20
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

An activate method is able to start its own threads, but it sounds like this 
may not be the right approach for you.
Me: Oh..okay..

What do you mean when you say "which would sleep and wait for others to join 
before proceeding for next action”? This sounds a lot like you should be using 
the OSGi service registry and referencing services rather than sleeping. That 
way your activate method will not need to wait.
Me: Actually my plan is to wait on sleep to discover devices.  [ I get a 
callback when I other devices join the network. That part is written (not 
tested).]

As for your current problem - is that code snippet really the component? The 
output indicates that you have a deactivate method defined as well.
Me: I have written a dummy deactivate method as well. It does nothing. My 
intention is to somehow invoke this function in this bundle and see what 
happens going forward when my java code executes. To start with I have just 
written a dummy print statement “starting….”

Regards,

Tim


On 26 Oct 2016, at 09:43, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

No…none of the others have activate() in them.. This is the first time I am 
writing an activate() method…

Plaese note: I just want a method in this bundle to be invoked on running the 
framework. I thought activate() would be the right one. But I understand from 
your comments that activate should not have a thread sleeping (which I 
eventually planned). So, then activate() would not help me, right ?

Could you propose as to what I should do alternatively to invoke a function 
(which would sleep and wait for others to join before proceeding for next 
action) on start up?


From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:03
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate

** This mail has been sent from an external source **
I note that there are a number of other DS components present - are any of the 
others showing the same issue?

I’m making a guess here, but do any of the other components have Activate 
methods which can block the activation Thread?

Felix SCR owns a background worker thread which is used for a number of 
different tasks. In components like this one the thread will be used to invoke 
the activate method. If a component is blocks that thread then it may cause 
your whole SCR to get “stuck”. This is one of several reasons why activate 
methods should not block for long periods.

Your problem may be totally unrelated to this, but 

Re: [osgi-dev] Understanding activate

2016-10-26 Thread Daghan ACAY
I will just get a wild guess at it.

DS component start time is not deterministic. That is your component can start 
first in all components, in the middle or the last.

I see you are using debug run which starts a lot components and prints out to 
log. I say your "starting..." can be printed earlier in console. Please run 
again with debug and scroll up.  I have a feeling you will find "starting..."

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Timothy Ward 
Sent: Wednesday, October 26, 2016 08:22 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Understanding activate

Also, your component should definitely not have a waiting thread which 
discovers devices. The devices should register services which are injected into 
the component. The injection can be used to trigger an action at that time. 
This is known as the whiteboard pattern - bundles register a service so that 
they can be discovered and used by another component.

Regards,

Tim


On 26 Oct 2016, at 11:20, Neil Bartlett 
mailto:njbartl...@gmail.com>> wrote:

You don’t invoke the activate/deactivate methods yourself. They are invoked by 
the SCR at the appropriate time, assuming they have been correctly declared.

On 26 Oct 2016, at 09:20, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Please find reply inline…

From: osgi-dev-boun...@mail.osgi.org 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:20
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate


** This mail has been sent from an external source **

An activate method is able to start its own threads, but it sounds like this 
may not be the right approach for you.
Me: Oh..okay..

What do you mean when you say "which would sleep and wait for others to join 
before proceeding for next action”? This sounds a lot like you should be using 
the OSGi service registry and referencing services rather than sleeping. That 
way your activate method will not need to wait.
Me: Actually my plan is to wait on sleep to discover devices.  [ I get a 
callback when I other devices join the network. That part is written (not 
tested).]

As for your current problem - is that code snippet really the component? The 
output indicates that you have a deactivate method defined as well.
Me: I have written a dummy deactivate method as well. It does nothing. My 
intention is to somehow invoke this function in this bundle and see what 
happens going forward when my java code executes. To start with I have just 
written a dummy print statement “starting….”

Regards,

Tim


On 26 Oct 2016, at 09:43, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

No…none of the others have activate() in them.. This is the first time I am 
writing an activate() method…

Plaese note: I just want a method in this bundle to be invoked on running the 
framework. I thought activate() would be the right one. But I understand from 
your comments that activate should not have a thread sleeping (which I 
eventually planned). So, then activate() would not help me, right ?

Could you propose as to what I should do alternatively to invoke a function 
(which would sleep and wait for others to join before proceeding for next 
action) on start up?


From: osgi-dev-boun...@mail.osgi.org 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Timothy Ward
Sent: 26 October 2016 13:03
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Understanding activate

** This mail has been sent from an external source **
I note that there are a number of other DS components present - are any of the 
others showing the same issue?

I’m making a guess here, but do any of the other components have Activate 
methods which can block the activation Thread?

Felix SCR owns a background worker thread which is used for a number of 
different tasks. In components like this one the thread will be used to invoke 
the activate method. If a component is blocks that thread then it may cause 
your whole SCR to get “stuck”. This is one of several reasons why activate 
methods should not block for long periods.

Your problem may be totally unrelated to this, but it is worth checking.

Regards,

Tim


On 26 Oct 2016, at 09:11, 
manoj.vrajam...@wipro.com wrote:

Please find my code snippet + the scr diagnostics ..below:


@Component(name = "com.wipro.iot.Alljoyn", immediate = true)
public class AlljoynImpl {

@Activate
public void activate()
{
System.out.println("starting.");
}
}




g!
g! scr:list
 Name  BundleId DefaultEnabled
[com.wipro.iot.Alljoyn] [   6] [true]
[com.wipro.iot.DeviceManager] [   1] [true]
[com

Re: [osgi-dev] Enroute examples

2016-10-24 Thread Daghan ACAY
Hi Peter,


Thanks for the update. it almost worked [😊]


I have changed


enroute-distro.bnd file


revision=org.osgi:osgi.enroute.pom.distro:2.0.0-SNAPSHOT; \


to


revision=org.osgi:osgi.enroute.pom.distro:2.0.0; \


I think it might be easier for you to change it directly instead of a pull 
request.


Regards

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Monday, October 24, 2016 9:22 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Enroute examples

My bad, it should work now.

Kind regards,

Peter Kriens

On 23 okt. 2016, at 07:48, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi all,

I have tried to run examples from https://github.com/osgi/osgi.enroute.examples 
git repository. I am using BNDtolls version 3.3.0.REL-20160922-205148-g069791c.

Problem is, almost all the examples cannot run since they cannot resolve the 
requirements of the example projects. When I resolve them on my local workspace 
they run but create unexpected results. In particular:

osgi.enroute.examples.easse.application runs but returns error on the browser:

"sse error /sse/1/*?instance=621132138185"

Relevant dependency change seem to be in the jetty

BEFORE
org.apache.felix.http.jetty;version='[3.1.0,3.1.1)',\
osgi.enroute.google.angular.webresource;version='[1.4.4,1.4.5)',\
AFTER

org.apache.felix.http.jetty;version='[3.2.0,3.2.1)',\
osgi.enroute.google.angular.webresource;version='[1.5.7,1.5.8)'

Thanks for your help
-Daghan

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Enroute examples

2016-10-22 Thread Daghan ACAY
Hi all,


I have tried to run examples from https://github.com/osgi/osgi.enroute.examples 
git repository. I am using BNDtolls version 3.3.0.REL-20160922-205148-g069791c.


Problem is, almost all the examples cannot run since they cannot resolve the 
requirements of the example projects. When I resolve them on my local workspace 
they run but create unexpected results. In particular:


osgi.enroute.examples.easse.application runs but returns error on the browser:


"sse error /sse/1/*?instance=621132138185"


Relevant dependency change seem to be in the jetty


BEFORE

org.apache.felix.http.jetty;version='[3.1.0,3.1.1)',\

osgi.enroute.google.angular.webresource;version='[1.4.4,1.4.5)',\

AFTER

org.apache.felix.http.jetty;version='[3.2.0,3.2.1)',\
osgi.enroute.google.angular.webresource;version='[1.5.7,1.5.8)'

Thanks for your help
-Daghan
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] DS component life cycle.

2016-10-16 Thread Daghan ACAY
Hi all,


Thanks for your help. I would like to provide my reasoning why references are 
optional and dynamic. First of all both protocols and devices are created 
through configuration. That is, while the system is running a user can create a 
new device through web console. Every device will have at least one protocol, 
however a users can capture a "single real" device which "may" provide data 
from multiple protocols. In the second case "device" is used to correlate data 
from "possibly" multiple data sources (at this point you might ask why I am 
transferring same data of same real device through different protocols. I 
rather think that you did not ask that question and just accept that I 
should:). At the same time single protocol can be used by multiple devices, by 
protocol I mean protocol instance that is generated by the corresponding 
configuration. Hence, relationship between device and protocol becomes many to 
many.


In this case

1- a device should have at least one protocol instance but any one of them is 
optional

2- if a new protocol instance is created by the user through configuration 
during runtime, device should recognize this and start receiving data from it 
in addition to the original, hence it is dynamic


Just to clarify one point, if you look at the original code, you can see device 
itself is not doing anything that a protocol needs to do, e.g. sending 
receiving data. It is just registering itself to the protocol based on its 
device specific configuration. This functionality is perfect place for 
whiteboard pattern I agree but I wanted to keep Tim's solution as well due to 
simplicity and another reason I will discuss later. Below is the final code, 
showcasing Tims's "policyOption=greedy" and Peter's whiteboard suggestion.


You can find device code here:

https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java


Whiteboard code can be found here:

https://github.com/daghanacay/com.easyiot.protocol/blob/master/com.easyiot.auslora-websocket.protocol.provider/src/com/easyiot/auslora_websocket/protocol/provider/AusloraWebsocketWhiteBoard.java



Finally the configuration:

https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json


1- From config you can see device.LT100H.1 is getting data from multiple 
protocols (real.auslora.wss, ttn.staging.mqtt), yet there may be many of type 
LT100H that might receive data from the same protocol. Also there might be 
other types of devices that can use the same protocol as in the next item.

2- Second device "device.development.board.1" gets data only from 
"real.auslora.wss" although it can get from the other protocol (optional)

3- Assume that someone updated the "real.auslora.wss" configuration or added a 
new protocol and updated second device, the system should recognize those 
changes and devices should register/unregister themselves automatically.


If you read until here and still not confused then I have some more questions 
about the whiteboard code because I am still not convinced that it is the way 
to go, mostly because it is more abstracted/indirect/hard-to-understand than 
Tim's solution:


1- What happens if a device is picked up before its corresponding protocol is 
picked up, the same old timing problem? I tried to use "_" infront of method 
"_addAusloraProtocol" but will it work or should I do a more elaborate logic, 
e.g. store all the devices without a corresponding protocol and register them 
when the new protocol is available? This is a valid case since the user can 
create the device configuration before the protocol configuration.


2- I prefer not to use String and properties Map since it is fragile. Can I use 
configuration objects instead of "Map props" at 
"_addAusloraProtocol"? I know I cannot use it in "addAusloraListener" method 
since the configuration object for the listener, e.g. 
LT100HDeviceConfiguration.class is not available in the classpath, and I dont 
want them to be.


3- As you can see in the device code above, I had to change the Listener 
interface with "setProtocolHandler" method to set the protocol reference inside 
device. This reference is used in "sendData" method. Tim suggested using 
EventAdmin for this, and listener but in general I do not prefer using 
EventAdmin since the messages are not type checked, also very hard to apply 
security. Is there any other way to inject protocol reference into the device? 
Here is Tim's solution shines because it gets the ttnMqttClient reference 
directly from OSGi registry.


Thanks for your suggestions, I hope I executed them correctly. One final round 
and the design will be settled [😊]


Regards


Re: [osgi-dev] DS component life cycle.

2016-10-14 Thread Daghan ACAY
Hi Tim,


Thanks for the sample code. I remember doing this and it somehow did not bind 
all the optional dependencies although they were available. However the 
"policyOption=greedy" might do the trick. I  will definitely look into it and 
see in debug how to component behaves. As for the thread safety and 
synchronisation I tried CountdownLatch in @Reference method and it was dead 
lock. I should admit I am not huge on multi-threaded applications so I might 
have violated millions of rules at that moment [😊]



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Timothy Ward 
Sent: Friday, October 14, 2016 7:26 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] DS component life cycle.

Separating the two consumers into separate components would be a far better 
encapsulation. There is no reason that one component should be doing both MQTT 
and WebSocket work - in fact the configuration that you provide doesn’t even 
configure the MQTT reference, meaning that it could get bound to anything!

You should really separate the two consumers into separate components. What 
happens then is down to how the consumed data is supposed to be used. It 
appears as though there is no use of “pushed” data (i.e. there is a get method 
and that’s it), which seems a bit odd for a data stream like this. I would 
really expect the converted data to be published to an Event Admin Topic. The 
person who wants to use the data can then register an event listener, and will 
get told whenever the data is updated.

In any event, the correct way to handle the original ordering dependency that 
you asked about is to do the initialisation in the activate method 
(https://github.com/timothyjward/com.easyiot.device/blob/df6999f1cb741a4c55b0ce217169ec912afc6741/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java).
[https://avatars1.githubusercontent.com/u/3882104?v=3&s=400]<https://github.com/timothyjward/com.easyiot.device/blob/df6999f1cb741a4c55b0ce217169ec912afc6741/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java>

timothyjward/com.easyiot.device<https://github.com/timothyjward/com.easyiot.device/blob/df6999f1cb741a4c55b0ce217169ec912afc6741/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java>
github.com
Contribute to com.easyiot.device development by creating an account on GitHub.



Note that I still think that this is a poorly constructed component, as the 
optional references aren’t really optional, just two mandatory components stuck 
together. I also don’t think that the code needs to be dynamic, but if you want 
it to be then I leave the thread safety as an exercise for the reader ;).

Regards,

Tim
On 14 Oct 2016, at 08:15, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:


Hi Peter,

This looks great. I thought about white board pattern but problem is this, 
there is no single mqttProtocolProvider! they are also created through factory 
configuration and bind to device through configuration. Please see the actual 
configuration used in application project here.

https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json

Correct me if i am wrong but Whiteboard pattern assumes there is only one 
mqttprotocolprovider. Peter, I still can work with the code that you have 
explained but still won't be as clean. I am thinking of using service tracker 
may be in the device but then it is not DS. I think it is an interesting case 
that might be worthy of you experts time :)

PS: please excuse me if i misunderstand you or i am making this something more 
complicated then it should be.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Friday, October 14, 2016 05:58 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] DS component life cycle.

@Christian: The MQTT client is optional and dynamic. So the activate method 
cannot be used. You need to subscribe/unsubscribe based on the availability of 
the mqtt server.

@Daghan:

Divide and conquer! You’re trying to do multiple responsibilities in one 
component and that is the antithesis of modularity, also called lack of 
cohesion. This is a perfect example of how things could get simpler by choosing 
the right decomposition.

The best solution imho is to introduce a second,component. Let the Device 
component just be a Device, it should not have to worry about Mqtt. After all, 
you could be connected to other event queues. (It also makes it easier to 
test.) You made mqtt optional to reflect this. This is exactly the reason the 
Whiteboard Pattern was invented!

This would look like

Re: [osgi-dev] DS component life cycle.

2016-10-14 Thread Daghan ACAY
 _mqtt. subscribe( channel, l );
>>   }
>>
>>   void removeMqttListener( TtnMqttMessageListener l, 
>> Map props ) {
>>   String channel = props.get( “subscriptionChannel” );
>>   if ( channel != null && !channel.isEmpty() ) {
>>   _mqtt.unsubscribe( channel );
>>
>>   }
>>   }
>>
>> You now created a whiteboard service that can also be used by other Device 
>> implementations while significantly reducing the complexity of your 
>> implementation.
>>
>> This is why after all those years I still love OSGi … you can only do this 
>> when you have dynamic components. As your struggle showed, trying to manage 
>> this is quickly becoming quite complex. Whenever you enter in such a 
>> struggle, think, lack of cohesion is often your problem.
>>
>> Kind regards,
>>
>>   Peter Kriens
>>
>>
>>>
>>> On 14 okt. 2016, at 08:09, Christian Schneider  
>>> wrote:
>>>
>>> In your case simply inject the ttnMqttClient in the @Reference and do the 
>>> subscribe in @Activate when you get the config and the unsubscribe in 
>>> @Deactivate.
>>>
>>> Christian
>>>
>>> 2016-10-13 23:00 GMT+02:00 Daghan ACAY :
>>> Hi all,
>>>
>>> I am trying to create a component that is instantiated by ConfigAdmin and 
>>> uses multiple references to operate. Basically the component should 
>>> instantiate through a factory configuration and use that configuration to 
>>> set up its own @Reference s. You can see the code here:
>>>
>>> https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java
>>>
>>> All the mentioned @Reference ed components are instantiated by 
>>> configuration as well, so at a given time the @Reference might not be 
>>> available but my own component should still work. yet should the Reference 
>>> available then it should be injected, basic 0-1 strategy.
>>>
>>> Problem I am facing with the current form of the code is that, the 
>>> @Reference injection is happening before the @Activate method is called. 
>>> This leads to NPE in the @Reference method due to null configuration. Is it 
>>> possible to make this code work such that config is provided to the 
>>> component before the dependency injection?
>>>
>>> I have tried annotating the class fields and set them "volatile". I even 
>>> make them a list and use the class fields in the activate method this time 
>>> the class fields were null due to 0-1 strategy. so I end up with annotating 
>>> the methods.
>>>
>>> I might have designed this all wrong, so any help simple or fundamental is 
>>> appreciated.
>>>
>>> Regards
>>>
>>> -Daghan
>>>
>>> Sent by MailWise – See your emails as clean, short chats.
>>>
>>>
>>> ___
>>> OSGi Developer Mail List
>>> osgi-dev@mail.osgi.org
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>
>>>
>>>
>>> --
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>> ___
>>> OSGi Developer Mail List
>>> osgi-dev@mail.osgi.org
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] DS component life cycle.

2016-10-14 Thread Daghan ACAY
Hi Christian,

That was what i was thinking when i was responding to Peter. But with your 
response i am more confident that it will work.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Christian Schneider 
Sent: Friday, October 14, 2016 06:31 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] DS component life cycle.

Whiteboard can work with more than one provider. In your example you simply 
injected an optional mqttprotocolprovider so it is not clear how you would 
distinguish them.

One simple appraoch is that you give the desired provider a name. You then add 
this name together with the subscription channel to your service properties.

The mqttprotocolprovider can be made to only accept the listeners that match 
its name. You can even code this in a factory configuration style. So you only 
have one code for it and can instantiate it several times with different mqtt 
connection properties.

Christian

On 14.10.2016 09:15, Daghan ACAY wrote:

Hi Peter,

This looks great. I thought about white board pattern but problem is this, 
there is no single mqttProtocolProvider! they are also created through factory 
configuration and bind to device through configuration. Please see the actual 
configuration used in application project here.

https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json

Correct me if i am wrong but Whiteboard pattern assumes there is only one 
mqttprotocolprovider. Peter, I still can work with the code that you have 
explained but still won't be as clean. I am thinking of using service tracker 
may be in the device but then it is not DS. I think it is an interesting case 
that might be worthy of you experts time :)

PS: please excuse me if i misunderstand you or i am making this something more 
complicated then it should be.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens <mailto:peter.kri...@aqute.biz>
Sent: Friday, October 14, 2016 05:58 PM
To: OSGi Developer Mail List 
<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] DS component life cycle.

@Christian: The MQTT client is optional and dynamic. So the activate method 
cannot be used. You need to subscribe/unsubscribe based on the availability of 
the mqtt server.

@Daghan:

Divide and conquer! You’re trying to do multiple responsibilities in one 
component and that is the antithesis of modularity, also called lack of 
cohesion. This is a perfect example of how things could get simpler by choosing 
the right decomposition.

The best solution imho is to introduce a second,component. Let the Device 
component just be a Device, it should not have to worry about Mqtt. After all, 
you could be connected to other event queues. (It also makes it easier to 
test.) You made mqtt optional to reflect this. This is exactly the reason the 
Whiteboard Pattern was invented!

This would look like:


@Component( property = “subscriptionChannel=” )
public class LT100HDeviceImpl implements Device, TtnMqttMessageListener 
{
// remove the mqtt subscription code but
// implement the TtnMqttMessageListener
   }

And the whiteboard component. Notice the _ in the _mqtt field. This ensures it 
is set before the event method that has a name that will appear in a sorted 
list later. (References are sorted by name.) (I vaguely recall field references 
are done before bind methods but this makes it certain.)

@Component(immediate=true)
public class MQTTWhiteboard {

@Reference
TtnMqttProtocol _mqtt;

@Reference( cardinality = ReferenceCardinality.OPTIONAL, policy 
= ReferencePolicy.DYNAMIC )
void addMqttListener( TtnMqttMessageListener l, 
Map props ) {
String channel = props.get( “subscriptionChannel” );
if ( channel != null && !channel.isEmpty() ) {
_mqtt. subscribe( channel, l );
}

void removeMqttListener( TtnMqttMessageListener l, 
Map props ) {
String channel = props.get( “subscriptionChannel” );
if ( channel != null && !channel.isEmpty() ) {
_mqtt.unsubscribe( channel );

}
}

You now created a whiteboard service that can also be used by other Device 
implementations while significantly reducing the complexity of your 
implementation.

This is why after all those years I still love OSGi … you can only do this when 
you have dynamic components. As your struggle showed, trying to manage this is 
quickly becoming quite complex. Whenever you enter in

Re: [osgi-dev] DS component life cycle.

2016-10-14 Thread Daghan ACAY
I think i have plenty to week with. Thanks to you all. I will do my homework 
this weekend and will provide my solution.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Timothy Ward 
Sent: Friday, October 14, 2016 06:27 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] DS component life cycle.

Separating the two consumers into separate components would be a far better 
encapsulation. There is no reason that one component should be doing both MQTT 
and WebSocket work - in fact the configuration that you provide doesn’t even 
configure the MQTT reference, meaning that it could get bound to anything!

You should really separate the two consumers into separate components. What 
happens then is down to how the consumed data is supposed to be used. It 
appears as though there is no use of “pushed” data (i.e. there is a get method 
and that’s it), which seems a bit odd for a data stream like this. I would 
really expect the converted data to be published to an Event Admin Topic. The 
person who wants to use the data can then register an event listener, and will 
get told whenever the data is updated.

In any event, the correct way to handle the original ordering dependency that 
you asked about is to do the initialisation in the activate method 
(https://github.com/timothyjward/com.easyiot.device/blob/df6999f1cb741a4c55b0ce217169ec912afc6741/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java).

Note that I still think that this is a poorly constructed component, as the 
optional references aren’t really optional, just two mandatory components stuck 
together. I also don’t think that the code needs to be dynamic, but if you want 
it to be then I leave the thread safety as an exercise for the reader ;).

Regards,

Tim
On 14 Oct 2016, at 08:15, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:


Hi Peter,

This looks great. I thought about white board pattern but problem is this, 
there is no single mqttProtocolProvider! they are also created through factory 
configuration and bind to device through configuration. Please see the actual 
configuration used in application project here.

https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json

Correct me if i am wrong but Whiteboard pattern assumes there is only one 
mqttprotocolprovider. Peter, I still can work with the code that you have 
explained but still won't be as clean. I am thinking of using service tracker 
may be in the device but then it is not DS. I think it is an interesting case 
that might be worthy of you experts time :)

PS: please excuse me if i misunderstand you or i am making this something more 
complicated then it should be.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Friday, October 14, 2016 05:58 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] DS component life cycle.

@Christian: The MQTT client is optional and dynamic. So the activate method 
cannot be used. You need to subscribe/unsubscribe based on the availability of 
the mqtt server.

@Daghan:

Divide and conquer! You’re trying to do multiple responsibilities in one 
component and that is the antithesis of modularity, also called lack of 
cohesion. This is a perfect example of how things could get simpler by choosing 
the right decomposition.

The best solution imho is to introduce a second,component. Let the Device 
component just be a Device, it should not have to worry about Mqtt. After all, 
you could be connected to other event queues. (It also makes it easier to 
test.) You made mqtt optional to reflect this. This is exactly the reason the 
Whiteboard Pattern was invented!

This would look like:


@Component( property = “subscriptionChannel=” )
public class LT100HDeviceImpl implements Device, TtnMqttMessageListener 
{
// remove the mqtt subscription code but
// implement the TtnMqttMessageListener
   }

And the whiteboard component. Notice the _ in the _mqtt field. This ensures it 
is set before the event method that has a name that will appear in a sorted 
list later. (References are sorted by name.) (I vaguely recall field references 
are done before bind methods but this makes it certain.)

@Component(immediate=true)
public class MQTTWhiteboard {

@Reference
TtnMqttProtocol _mqtt;

@Reference( cardinality = ReferenceCardinality.OPTIONAL, policy 
= ReferencePolicy.DYNAMIC )
void addMqttListener( TtnMqttMessageListener l, 
Map props ) {
String channe

Re: [osgi-dev] DS component life cycle.

2016-10-14 Thread Daghan ACAY
Hi Peter,

This looks great. I thought about white board pattern but problem is this, 
there is no single mqttProtocolProvider! they are also created through factory 
configuration and bind to device through configuration. Please see the actual 
configuration used in application project here.

https://github.com/daghanacay/com.easyiot.application/blob/master/com.easyiot.heatmap.application/configuration/configuration.json

Correct me if i am wrong but Whiteboard pattern assumes there is only one 
mqttprotocolprovider. Peter, I still can work with the code that you have 
explained but still won't be as clean. I am thinking of using service tracker 
may be in the device but then it is not DS. I think it is an interesting case 
that might be worthy of you experts time :)

PS: please excuse me if i misunderstand you or i am making this something more 
complicated then it should be.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Friday, October 14, 2016 05:58 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] DS component life cycle.

@Christian: The MQTT client is optional and dynamic. So the activate method 
cannot be used. You need to subscribe/unsubscribe based on the availability of 
the mqtt server.

@Daghan:

Divide and conquer! You’re trying to do multiple responsibilities in one 
component and that is the antithesis of modularity, also called lack of 
cohesion. This is a perfect example of how things could get simpler by choosing 
the right decomposition.

The best solution imho is to introduce a second,component. Let the Device 
component just be a Device, it should not have to worry about Mqtt. After all, 
you could be connected to other event queues. (It also makes it easier to 
test.) You made mqtt optional to reflect this. This is exactly the reason the 
Whiteboard Pattern was invented!

This would look like:


@Component( property = “subscriptionChannel=” )
public class LT100HDeviceImpl implements Device, TtnMqttMessageListener 
{
// remove the mqtt subscription code but
// implement the TtnMqttMessageListener
   }

And the whiteboard component. Notice the _ in the _mqtt field. This ensures it 
is set before the event method that has a name that will appear in a sorted 
list later. (References are sorted by name.) (I vaguely recall field references 
are done before bind methods but this makes it certain.)

@Component(immediate=true)
public class MQTTWhiteboard {

@Reference
TtnMqttProtocol _mqtt;

@Reference( cardinality = ReferenceCardinality.OPTIONAL, policy 
= ReferencePolicy.DYNAMIC )
void addMqttListener( TtnMqttMessageListener l, 
Map props ) {
String channel = props.get( “subscriptionChannel” );
if ( channel != null && !channel.isEmpty() ) {
_mqtt. subscribe( channel, l );
}

void removeMqttListener( TtnMqttMessageListener l, 
Map props ) {
String channel = props.get( “subscriptionChannel” );
if ( channel != null && !channel.isEmpty() ) {
_mqtt.unsubscribe( channel );

}
}

You now created a whiteboard service that can also be used by other Device 
implementations while significantly reducing the complexity of your 
implementation.

This is why after all those years I still love OSGi … you can only do this when 
you have dynamic components. As your struggle showed, trying to manage this is 
quickly becoming quite complex. Whenever you enter in such a struggle, think, 
lack of cohesion is often your problem.

Kind regards,

Peter Kriens


>
> On 14 okt. 2016, at 08:09, Christian Schneider  
> wrote:
>
> In your case simply inject the ttnMqttClient in the @Reference and do the 
> subscribe in @Activate when you get the config and the unsubscribe in 
> @Deactivate.
>
> Christian
>
> 2016-10-13 23:00 GMT+02:00 Daghan ACAY :
> Hi all,
>
> I am trying to create a component that is instantiated by ConfigAdmin and 
> uses multiple references to operate. Basically the component should 
> instantiate through a factory configuration and use that configuration to set 
> up its own @Reference s. You can see the code here:
>
> https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java
>
> All the mentioned @Reference ed components are instantiated by configuration 
> as well, so at a given time the @Reference might not be available but my own 
> component should still work. yet should the Reference available then it 
> s

Re: [osgi-dev] DS component life cycle.

2016-10-13 Thread Daghan ACAY
That "elsewhere" is what i am struggling to find. But i will look at it again 
today with fresh information you have provided.

Any other suggestions are welcome.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Ferry Huberts 
Sent: Friday, October 14, 2016 08:19 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] DS component life cycle.

Injection code should not depend on whether or not your component is
activated. Code doing that should be moved elsewhere.




On 13/10/16 23:12, Daghan ACAY wrote:
> Thanks Ferry,
>
> Thanks a lot for the info. It will be very useful in the future. In this
> particular case since my references are optional i need to control the
> indeterminism. I used countdown latch but of course it created dead lock:).
>
> Can you suggest a solution? Any will do, including redesigning the
> software :)
>
> Regards
> Daghan
>
> Sent by MailWise <http://www.mail-wise.com/installation/2> – See your
> emails as clean, short chats.
>
>
>
>  Original Message 
> From: Ferry Huberts 
> Sent: Friday, October 14, 2016 08:05 AM
> To: osgi-dev@mail.osgi.org
> Subject: Re: [osgi-dev] DS component life cycle.
>
> Mandatory references are always injected before activate.
> Optional references can be injected either before or after activate.
>
> On 13/10/16 23:00, Daghan ACAY wrote:
>> Hi all,
>>
>> I am trying to create a component that is instantiated by ConfigAdmin
>> and uses multiple references to operate. Basically the component should
>> instantiate through a factory configuration and use that configuration
>> to set up its own @Reference s. You can see the code here:
>>
>>
> https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java
>>
>> All the mentioned @Reference ed components are instantiated by
>> configuration as well, so at a given time the @Reference might not be
>> available but my own component should still work. yet should the
>> Reference available then it should be injected, basic 0-1 strategy.
>>
>> Problem I am facing with the current form of the code is that, the
>> @Reference injection is happening before the @Activate method is called.
>> This leads to NPE in the @Reference method due to null configuration. Is
>> it possible to make this code work such that config is provided to the
>> component before the dependency injection?
>>
>> I have tried annotating the class fields and set them "volatile". I even
>> make them a list and use the class fields in the activate method this
>> time the class fields were null due to 0-1 strategy. so I end up with
>> annotating the methods.
>>
>> I might have designed this all wrong, so any help simple or fundamental
>> is appreciated.
>>
>> Regards
>>
>> -Daghan
>>
>> Sent by MailWise <http://www.mail-wise.com/installation/2> – See your
>> emails as clean, short chats.
>>
>>
>>
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>
> --
> Ferry Huberts
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>

--
Ferry Huberts
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Bundle resolution in BND

2016-10-13 Thread Daghan ACAY
As for publishing to maven repo. I believe even though they are published in 
mvn repo we need a local view of it for the resolver to work with. I understand 
you have valid reasons to enforce local index file (np-complete, repeatability 
etc.) but inevitably it requires developers to manually create local view of 
the external repos even before the resolution can work. Are you saying resolver 
can work directly on global mvn repo (without local indexes/views)? If so can 
you explain how?

As for modularity, i cannot see any way out. For example a relatively complex 
application will rely on multiple services, whose implementation bundles will 
require transitive dependencies which in turn might depend on other services. 
Regardless of how specific your service is there will be an external 
dependency. IMHO Even if we assume all the java libraries are designed and 
implemented using osgi practices, transitive dependencies in multiple layers 
can not be avoided. This is exactly what i am facing right now. My services are 
really specific but implementation has external dependencies.

All said, i am not trying to start a philosophical discussion. I just want to 
make my life as easy as possible. In a nutshell, my pain point is local index 
files of external repositories. Can we drop them? If not what is a best way to 
manage them, possibly share an index file or full cnf company wide and use bnd 
to create specific cnf for developer workspace? How does that work for open 
source projects? I am sure you have answers for all these but i am a little at 
a loss now :).

Regards
Daghan


 Original Message 
From: Peter Kriens 
Sent: Thursday, September 1, 2016 02:42 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Bundle resolution in BND

Your workspaces should publish to a repository (e.g. Nexus) and then consume 
from those repositories. The resolver takes a root bundle (in OSGi enRoute the 
application) and then finds a closure of all bundles from the enlisted 
repositories that have no remaining requirements. So in contrast to maven, all 
bundles are put in a melting pot and then selected from.

If you have systems that have deep transitive dependencies then you’re just not 
working very modular. The core idea of OSGi is to create bundles that implement 
a number of service APIs and use a number of service APIs. So their 
dependencies is solely those service APIs and maybe a few standalone 
implementation libraries. If you see other patterns you either adapt to 
minimize those dependencies or use Maven, a tool that is wonderful with deep, 
very deep, transitive dependencies.

The core idea of OSGi is that the bucket stops at the service boundary.

Kind regards,

Peter Kriens

On 31 aug. 2016, at 13:31, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi there,

I was working on understanding bundle resolution and workspaces in BND and 
enRoute. Here is my simplified set up:

workspace 1 two projects
ProjectA.api
ProjectB.provider (this depends on Bundle1 and Bundle2)

I resolve Project B using central maven repository. And release Both ProjectA 
and ProjectB to "Release"

Workspace 2 one project. This workspace has reference to "Release" directory of 
the workspace 1 hence can see ProjectA and ProjectB. However, this workspace 
does not have the Central repository pointing to Bundle1 and Bundle2 above. 
Project in workspace 2 is called

ProjectC.provider (this depends on ProjectA.api)

Here is my question . When I try to resolve Project C, resolution fails saying
"Project C  cannot be resolved because ProjectB cannot be resolved because it 
needs Bundle1."

Why should I have dependencies of my dependencies in my second workplace? Isn't 
it against resolution process? I mean if you have multiple dependencies then do 
you need to go and find every single one of the transient dependencies in your 
current local repositories. This can be exponentially big. Should not 
resolution find the dependencies even though they are not on your local 
repositories? I know I am going in the territory of MVN but I really thing 
there must be a simpler way. Similar to "provided" in MVN may be? or a global, 
I mean literally global "cnf"?

I also tried to export the dependencies of ProjectB.provider from 
ProjectB.provider to aid the resolution in Workspace2 but this does not seem 
right either in terms of the size of ProjectB or conventions of OSGi. So can 
you please tell me how can one use external bundle and resolve without knowing 
the transient dependencies? IF this cannot be done than how should one proceed 
to organise their workspaces while collaborating with others?

Sorry for the long message but I wanted to be as clear as possible.

Regards
-Daghan
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev


Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

2016-10-13 Thread Daghan ACAY
Hi Christian,

I was quite happy with the auto deploy until now. I give you that sometimes it 
breaks when i do something fancy, e.g change code and save while stopped at 
debug point. But other than that it was quite solid.

On the other hand i had fair amount of problem when i refresh repositories. 
Sometimes for no reason projects in workspace gives compilation error and it 
takes multiple repository refreshes from bndtools menu in eclipse to get it 
recognizing distro and other repositories. But that is another bug report.

Thanks for the answers i am looking forward to get my hands on the code.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Christian Schneider 
Sent: Thursday, October 13, 2016 07:38 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...


Hi Daghan,

I think I can answer part of your questions.

Christian

On 12.10.2016 23:27, Daghan ACAY wrote:
>
> 2- how is bndtool resolution and hot deploy from eclipse affected?
> Should we still resolve bndrun in eclipse?
>
You can still resolve using the UI. But you can also do a pure maven build.
Hot deploy does not work reliably. You have to at least do mvn install
on the module you changed and restart your OSGi runtime.
>
> 3- as a suggestion breaking a build and copy pasting will not work in
> ci/cd. I think a more automated solution can be beneficial.
>
You can use this configuration to make the resolve completely automated

   true
   false


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] DS component life cycle.

2016-10-13 Thread Daghan ACAY
Thanks Ferry,

Thanks a lot for the info. It will be very useful in the future. In this 
particular case since my references are optional i need to control the 
indeterminism. I used countdown latch but of course it created dead lock:).

Can you suggest a solution? Any will do, including redesigning the software :)

Regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Ferry Huberts 
Sent: Friday, October 14, 2016 08:05 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] DS component life cycle.


Mandatory references are always injected before activate.
Optional references can be injected either before or after activate.

On 13/10/16 23:00, Daghan ACAY wrote:
> Hi all,
>
> I am trying to create a component that is instantiated by ConfigAdmin
> and uses multiple references to operate. Basically the component should
> instantiate through a factory configuration and use that configuration
> to set up its own @Reference s. You can see the code here:
>
> https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java
>
> All the mentioned @Reference ed components are instantiated by
> configuration as well, so at a given time the @Reference might not be
> available but my own component should still work. yet should the
> Reference available then it should be injected, basic 0-1 strategy.
>
> Problem I am facing with the current form of the code is that, the
> @Reference injection is happening before the @Activate method is called.
> This leads to NPE in the @Reference method due to null configuration. Is
> it possible to make this code work such that config is provided to the
> component before the dependency injection?
>
> I have tried annotating the class fields and set them "volatile". I even
> make them a list and use the class fields in the activate method this
> time the class fields were null due to 0-1 strategy. so I end up with
> annotating the methods.
>
> I might have designed this all wrong, so any help simple or fundamental
> is appreciated.
>
> Regards
>
> -Daghan
>
> Sent by MailWise <http://www.mail-wise.com/installation/2> – See your
> emails as clean, short chats.
>
>
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>

--
Ferry Huberts
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] DS component life cycle.

2016-10-13 Thread Daghan ACAY
Hi all,

I am trying to create a component that is instantiated by ConfigAdmin and uses 
multiple references to operate. Basically the component should instantiate 
through a factory configuration and use that configuration to set up its own 
@Reference s. You can see the code here:

https://github.com/daghanacay/com.easyiot.device/blob/master/com.easyiot.LT100H.device.provider/src/com/easyiot/LT100H/device/provider/LT100HDeviceImpl.java

All the mentioned @Reference ed components are instantiated by configuration as 
well, so at a given time the @Reference might not be available but my own 
component should still work. yet should the Reference available then it should 
be injected, basic 0-1 strategy.

Problem I am facing with the current form of the code is that, the @Reference 
injection is happening before the @Activate method is called. This leads to NPE 
in the @Reference method due to null configuration. Is it possible to make this 
code work such that config is provided to the component before the dependency 
injection?

I have tried annotating the class fields and set them "volatile". I even make 
them a list and use the class fields in the activate method this time the class 
fields were null due to 0-1 strategy. so I end up with annotating the methods.

I might have designed this all wrong, so any help simple or fundamental is 
appreciated.

Regards

-Daghan

Sent by MailWise – See your emails as 
clean, short chats.
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

2016-10-12 Thread Daghan ACAY
Hi Peter,

I have read it and i realize three things

1- we now need to add an additional project to create the run time assembly, 
e.g /bndrun folder in the tutorial. Is this the only way? If so will bndtools 
support this type of project template as it is currently supporting api, 
provider, application templates?

2- how is bndtool resolution and hot deploy from eclipse affected? Should we 
still resolve bndrun in eclipse?

3- as a suggestion breaking a build and copy pasting will not work in ci/cd. I 
think a more automated solution can be beneficial.

I will try to give more feedback when i get my hands on the code. Thanks for 
all the work you put in it is very appreciated.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Christian Schneider 
Sent: Saturday, October 8, 2016 05:20 AM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ...

Hi Peter,

do you also provide the full source code of the finished project?
I read most of the instructions and generally they look good but I think I 
personally would never try to recreate the whole project by hand by following 
the steps.
I think most people would simply checkout the finished example and try and 
experiment with it while reading the sections of the tutorial.

I also think the instructions for creating and adding the runbundles manually 
are quite tedious. I would rather leave the option to auto resolve on for the 
start and explain in a special section what the risks are and how to avoid 
these by "approving" the resolve manually like you describe now.

Btw. I wonder if we could use a command line option for maven to auto update 
the runbundles. So you could describe to first run the build with mvn install. 
It fails and then run again with the option to replace the runbundles. That 
would be a lot simpler than copy pasting them.

Christian

On 06.10.2016 15:51, Peter Kriens wrote:
I’ve created a tutorial for OSGi enRoute with Maven and vi. I am in need of 
some people that are willing to review this tutorial.

The tutorial is at http://enroute.osgi.org/tutorial_eval/050-start.html

You can find the Github source code at: 
https://github.com/osgi/osgi.enroute.site/tree/gh-pages/_tutorial_eval

Please provide tool requests and issues or just mail me personally at 
peter.kri...@aqute.biz.

Any help would be HIGHLY appreciated. Kind regards,

Peter Kriens



___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Bundle resolution in BND

2016-09-07 Thread Daghan ACAY
Thanks Peter,

This helps a lot.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Wednesday, September 7, 2016 10:12 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Bundle resolution in BND

You can also use Github repo as a Maven index, see how the bnd project on 
github does both. (Though we host on cloudbees)

Kind regards,

Peter Kriens

On 6 sep. 2016, at 00:50, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:


Hi Peter,

I was thinking about this, i actually love FixedIndexedRepo because i can use 
githubusercontent as poor man's nexus :).

Do you think it is useful to add transient dependency information into  the 
FixedIndexedRepo indexes. I believe this will be similar functionally that you 
will offer with BndPomRepository. Should i put this to bndtool as feature 
request?

Cheers

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message ----
From: Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: Monday, September 5, 2016 07:50 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Bundle resolution in BND


Hi Peter,


Thanks for the BndPomRepository news, any specific release day for 3.3? I 
couldn't find anything on the BndTool page. I am looking forward to it. I think 
this is one area that will speed up OSGi development drastically.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Monday, September 5, 2016 6:35 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Bundle resolution in BND

On 4 sep. 2016, at 06:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:
Hi Peter,
I sent a long reply before but I think it was lost in the cracks of internet.
Must have missed it … sorry.

As for your first comment, even if I publish my artefacts to Nexus, I need to 
use local index file to aid the bundle resolution. I am happy to do that for 
the dependencies of my code but doing it for the transient dependencies are bit 
labour-some. Until now I had to create a local index file (via drag and drop) 
for artefacts in JPM4J or MVN central. Is it possibly to run resolution 
directly on local or global nexus (without manually preparing the local index)? 
BTW I found out index file is embedded into “FixedIndexedRepo" so you dont need 
to create the index manually.
In bnd(tools) 3.3 we hqve the BndPomRepository, this will allow you to maintain 
your index in a Maven pom, including its transitive dependencies.

As for your second comment, my problem is what happens if the service API's are 
dependent on other service API's. This is especially true if your bundle/jar 
depends on external jars. Even though the service API that you rely on is very 
specific it might bring in a lot of third party in implementation and there is 
not much you can do about it when you are using third party API's. Shallow 
dependencies can only happen if the API implementation is self contained, e.g. 
includes all third part jars into its bundle, which I believe is not good for 
modularity and licencing issues. Can you give me a sufficiently large example 
that they manage footprint small and avoid external dependencies?
This is the tension between the model the OSGi Alliance has been promoting and 
the state of the industry. All OSGi APIs are available as API JARs and multiple 
implementations. Unfortunately, trying to get the JARs from JCP JARs can be 
quite tricky. Also, it turns out that the rigor that the OSGi Alliance applies 
to the specification process is too rarely applied in other specification 
groups.

It is one of the reasons I sometimes create bundles where there do exist 
popular open source implementations. There is transitive dependencies are so 
horrid and a clean service based implementation is so small that it sometimes 
makes the balance point to make instead of get for free. A lot of work in OSGi 
enRoute was to show how simple a service implementation can be and how powerful 
OSGi is when you can compose your software out of small components that have 
well defined interfaces.


I don't want to start a philosophical discussion, just a practical one. I guess 
my problem is the local index files for external repositories and how to 
manage/share them between multiple developers. I can think of some solutions:
1- May be we can put a cnf in git repo and make BntTool to fetch from the git 
repo as a workspace template? Will this work if the template is continuously 
changing?
2- Create FixedRepo (they embed the index) to deploy releases and distribute 
the repo URLS? can more than one de

Re: [osgi-dev] Working example tx-control with JPA

2016-09-07 Thread Daghan ACAY
Hi Henrik,

Sorry for replying with no answer but I am planning of doing similar with 
UserAdmin, e.g connect the jdbc backend to get authentication information.

The architecture would be similar to JAAS where users can plugin different 
backends for authentication. Similar to this actually 
https://karaf.apache.org/manual/latest/security

If you like to collaborate i would be interested in hearing your ideas.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Henrik Niehaus 
Sent: Thursday, September 8, 2016 02:40 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Working example tx-control with JPA

Thanks Peter,
I actually got that working and used it to implement a MySQL backend for Felix 
UserAdmin. But know I want to switch to JPA, because for bigger object 
structures it gets quite complicated to do it all with JDBC only. Unfortunately 
I cant get this reference

@Reference EntityManagerFactoryBuilder emfb;

to be resolved. That's why I was asking for an example.

-Henrik

Am 07.09.2016 um 18:34 schrieb Peter Kriens:
You could take a look at https://github.com/osgi/osgi.enroute.examples.jdbc

It wasn’t completely finished and reviewed but I think it works.

Kind regards,

Peter Kriens

On 7 sep. 2016, at 18:33, Henrik Niehaus 
mailto:henrik.nieh...@gmx.de>> wrote:

Does anybody have a working example for tx-control with JPA? I know
there is a brief explation at [1], but I'm struggling with the
configuration and don't exactly know, which dependencies to use. It
would be very nice, if someone could provide a small self contained code
example (preferably a bnd workspace).

BR

-Henrik

[1] http://aries.apache.org/modules/tx-control/localJPA.html

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Bundle resolution in BND

2016-09-05 Thread Daghan ACAY
Hi Peter,

I was thinking about this, i actually love FixedIndexedRepo because i can use 
githubusercontent as poor man's nexus :).

Do you think it is useful to add transient dependency information into  the 
FixedIndexedRepo indexes. I believe this will be similar functionally that you 
will offer with BndPomRepository. Should i put this to bndtool as feature 
request?

Cheers

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Daghan ACAY 
Sent: Monday, September 5, 2016 07:50 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Bundle resolution in BND


Hi Peter,


Thanks for the BndPomRepository news, any specific release day for 3.3? I 
couldn't find anything on the BndTool page. I am looking forward to it. I think 
this is one area that will speed up OSGi development drastically.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Monday, September 5, 2016 6:35 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Bundle resolution in BND

On 4 sep. 2016, at 06:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:
Hi Peter,
I sent a long reply before but I think it was lost in the cracks of internet.
Must have missed it … sorry.

As for your first comment, even if I publish my artefacts to Nexus, I need to 
use local index file to aid the bundle resolution. I am happy to do that for 
the dependencies of my code but doing it for the transient dependencies are bit 
labour-some. Until now I had to create a local index file (via drag and drop) 
for artefacts in JPM4J or MVN central. Is it possibly to run resolution 
directly on local or global nexus (without manually preparing the local index)? 
BTW I found out index file is embedded into “FixedIndexedRepo" so you dont need 
to create the index manually.
In bnd(tools) 3.3 we hqve the BndPomRepository, this will allow you to maintain 
your index in a Maven pom, including its transitive dependencies.

As for your second comment, my problem is what happens if the service API's are 
dependent on other service API's. This is especially true if your bundle/jar 
depends on external jars. Even though the service API that you rely on is very 
specific it might bring in a lot of third party in implementation and there is 
not much you can do about it when you are using third party API's. Shallow 
dependencies can only happen if the API implementation is self contained, e.g. 
includes all third part jars into its bundle, which I believe is not good for 
modularity and licencing issues. Can you give me a sufficiently large example 
that they manage footprint small and avoid external dependencies?
This is the tension between the model the OSGi Alliance has been promoting and 
the state of the industry. All OSGi APIs are available as API JARs and multiple 
implementations. Unfortunately, trying to get the JARs from JCP JARs can be 
quite tricky. Also, it turns out that the rigor that the OSGi Alliance applies 
to the specification process is too rarely applied in other specification 
groups.

It is one of the reasons I sometimes create bundles where there do exist 
popular open source implementations. There is transitive dependencies are so 
horrid and a clean service based implementation is so small that it sometimes 
makes the balance point to make instead of get for free. A lot of work in OSGi 
enRoute was to show how simple a service implementation can be and how powerful 
OSGi is when you can compose your software out of small components that have 
well defined interfaces.


I don't want to start a philosophical discussion, just a practical one. I guess 
my problem is the local index files for external repositories and how to 
manage/share them between multiple developers. I can think of some solutions:
1- May be we can put a cnf in git repo and make BntTool to fetch from the git 
repo as a workspace template? Will this work if the template is continuously 
changing?
2- Create FixedRepo (they embed the index) to deploy releases and distribute 
the repo URLS? can more than one developer push to same FixedRepo? How we 
manage the history of the repo?
do you have other solutions, particularly that will work in open source 
development? I mean other developers can use the artifacts that I create (from 
some repo) and do not worry about the transient depencies in their workspace 
during resolution?
Again, I think the way forward for bnd(tools) is to leverage the pom format. 
This will make it trivial to share between open source projects.

Kind regards,

Peter Kriens

Help is highly appreciated.

Cheers
-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Wednes

Re: [osgi-dev] Bundle resolution in BND

2016-09-05 Thread Daghan ACAY
Hi Peter,


Thanks for the BndPomRepository news, any specific release day for 3.3? I 
couldn't find anything on the BndTool page. I am looking forward to it. I think 
this is one area that will speed up OSGi development drastically.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Monday, September 5, 2016 6:35 AM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Bundle resolution in BND

On 4 sep. 2016, at 06:47, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:
Hi Peter,
I sent a long reply before but I think it was lost in the cracks of internet.
Must have missed it … sorry.

As for your first comment, even if I publish my artefacts to Nexus, I need to 
use local index file to aid the bundle resolution. I am happy to do that for 
the dependencies of my code but doing it for the transient dependencies are bit 
labour-some. Until now I had to create a local index file (via drag and drop) 
for artefacts in JPM4J or MVN central. Is it possibly to run resolution 
directly on local or global nexus (without manually preparing the local index)? 
BTW I found out index file is embedded into “FixedIndexedRepo" so you dont need 
to create the index manually.
In bnd(tools) 3.3 we hqve the BndPomRepository, this will allow you to maintain 
your index in a Maven pom, including its transitive dependencies.

As for your second comment, my problem is what happens if the service API's are 
dependent on other service API's. This is especially true if your bundle/jar 
depends on external jars. Even though the service API that you rely on is very 
specific it might bring in a lot of third party in implementation and there is 
not much you can do about it when you are using third party API's. Shallow 
dependencies can only happen if the API implementation is self contained, e.g. 
includes all third part jars into its bundle, which I believe is not good for 
modularity and licencing issues. Can you give me a sufficiently large example 
that they manage footprint small and avoid external dependencies?
This is the tension between the model the OSGi Alliance has been promoting and 
the state of the industry. All OSGi APIs are available as API JARs and multiple 
implementations. Unfortunately, trying to get the JARs from JCP JARs can be 
quite tricky. Also, it turns out that the rigor that the OSGi Alliance applies 
to the specification process is too rarely applied in other specification 
groups.

It is one of the reasons I sometimes create bundles where there do exist 
popular open source implementations. There is transitive dependencies are so 
horrid and a clean service based implementation is so small that it sometimes 
makes the balance point to make instead of get for free. A lot of work in OSGi 
enRoute was to show how simple a service implementation can be and how powerful 
OSGi is when you can compose your software out of small components that have 
well defined interfaces.


I don't want to start a philosophical discussion, just a practical one. I guess 
my problem is the local index files for external repositories and how to 
manage/share them between multiple developers. I can think of some solutions:
1- May be we can put a cnf in git repo and make BntTool to fetch from the git 
repo as a workspace template? Will this work if the template is continuously 
changing?
2- Create FixedRepo (they embed the index) to deploy releases and distribute 
the repo URLS? can more than one developer push to same FixedRepo? How we 
manage the history of the repo?
do you have other solutions, particularly that will work in open source 
development? I mean other developers can use the artifacts that I create (from 
some repo) and do not worry about the transient depencies in their workspace 
during resolution?
Again, I think the way forward for bnd(tools) is to leverage the pom format. 
This will make it trivial to share between open source projects.

Kind regards,

Peter Kriens

Help is highly appreciated.

Cheers
-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Wednesday, August 31, 2016 4:42 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Bundle resolution in BND

Your workspaces should publish to a repository (e.g. Nexus) and then consume 
from those repositories. The resolver takes a root bundle (in OSGi enRoute the 
application) and then finds a closure of all bundles from the enlisted 
repositories that have no remaining requirements. So in contrast to maven, all 
bundles are put in a melting pot and then selected from.

If you have systems that have deep transitive dependencies then you’re just not 
working very modular. The core idea of OSGi is to create bundles that implement 
a number of service APIs and u

Re: [osgi-dev] Bundle resolution in BND

2016-09-03 Thread Daghan ACAY
Hi Peter,


I sent a long reply before but I think it was lost in the cracks of internet.


As for your first comment, even if I publish my artefacts to Nexus, I need to 
use local index file to aid the bundle resolution. I am happy to do that for 
the dependencies of my code but doing it for the transient dependencies are bit 
labour-some. Until now I had to create a local index file (via drag and drop) 
for artefacts in JPM4J or MVN central. Is it possibly to run resolution 
directly on local or global nexus (without manually preparing the local index)? 
BTW I found out index file is embedded into "FixedIndexedRepo" so you dont need 
to create the index manually.


As for your second comment, my problem is what happens if the service API's are 
dependent on other service API's. This is especially true if your bundle/jar 
depends on external jars. Even though the service API that you rely on is very 
specific it might bring in a lot of third party in implementation and there is 
not much you can do about it when you are using third party API's. Shallow 
dependencies can only happen if the API implementation is self contained, e.g. 
includes all third part jars into its bundle, which I believe is not good for 
modularity and licencing issues. Can you give me a sufficiently large example 
that they manage footprint small and avoid external dependencies?


I don't want to start a philosophical discussion, just a practical one. I guess 
my problem is the local index files for external repositories and how to 
manage/share them between multiple developers. I can think of some solutions:


1- May be we can put a cnf in git repo and make BntTool to fetch from the git 
repo as a workspace template? Will this work if the template is continuously 
changing?

2- Create FixedRepo (they embed the index) to deploy releases and distribute 
the repo URLS? can more than one developer push to same FixedRepo? How we 
manage the history of the repo?


do you have other solutions, particularly that will work in open source 
development? I mean other developers can use the artifacts that I create (from 
some repo) and do not worry about the transient depencies in their workspace 
during resolution?


Help is highly appreciated.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: Wednesday, August 31, 2016 4:42 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Bundle resolution in BND

Your workspaces should publish to a repository (e.g. Nexus) and then consume 
from those repositories. The resolver takes a root bundle (in OSGi enRoute the 
application) and then finds a closure of all bundles from the enlisted 
repositories that have no remaining requirements. So in contrast to maven, all 
bundles are put in a melting pot and then selected from.

If you have systems that have deep transitive dependencies then you’re just not 
working very modular. The core idea of OSGi is to create bundles that implement 
a number of service APIs and use a number of service APIs. So their 
dependencies is solely those service APIs and maybe a few standalone 
implementation libraries. If you see other patterns you either adapt to 
minimize those dependencies or use Maven, a tool that is wonderful with deep, 
very deep, transitive dependencies.

The core idea of OSGi is that the bucket stops at the service boundary.

Kind regards,

Peter Kriens

On 31 aug. 2016, at 13:31, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi there,

I was working on understanding bundle resolution and workspaces in BND and 
enRoute. Here is my simplified set up:

workspace 1 two projects
ProjectA.api
ProjectB.provider (this depends on Bundle1 and Bundle2)

I resolve Project B using central maven repository. And release Both ProjectA 
and ProjectB to "Release"

Workspace 2 one project. This workspace has reference to "Release" directory of 
the workspace 1 hence can see ProjectA and ProjectB. However, this workspace 
does not have the Central repository pointing to Bundle1 and Bundle2 above. 
Project in workspace 2 is called

ProjectC.provider (this depends on ProjectA.api)

Here is my question . When I try to resolve Project C, resolution fails saying
"Project C  cannot be resolved because ProjectB cannot be resolved because it 
needs Bundle1."

Why should I have dependencies of my dependencies in my second workplace? Isn't 
it against resolution process? I mean if you have multiple dependencies then do 
you need to go and find every single one of the transient dependencies in your 
current local repositories. This can be exponentially big. Should not 
resolution find the dependencies even though they are not on your local 
repositories? I know I am going in the territory of MVN but I really thing 
there must be a simpler way. Similar to "provided" in MVN may be? or a global, 
I mean literally

Re: [osgi-dev] Please Help

2016-09-01 Thread Daghan ACAY
Thanks monaj,

It is good that it is working for you. I noted your feedback and will try to 
put in to the doco.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: manoj.vrajam...@wipro.com
Sent: Thursday, September 1, 2016 02:33 PM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Please Help

The tutorial is fair enough. It does convey that the Provider has to export the 
API in the bnd.bnd !!  One thing that I felt that was missing is:

· Impl class is autogenerated . We have to specify in the tutorial that 
this provider/impl class has to implement the interface/api class that we 
intend to export



I did this and it is working..  :)


From: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] On 
Behalf Of Daghan ACAY
Sent: 01 September 2016 04:02
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Please Help


** This mail has been sent from an external source **

Hi manoj,

Please do base tutorial. Pay special attention to 
http://enroute.osgi.org/tutorial_base/320-provider.html section "imports". It 
basically says that your provider should export api bundles.

To solve your problem you should drag api bundles from calculated imports to 
exported bundles in your provider project's bnd.bnd file.

Please provide feedback on "quick start tutorial" if this is not clear so we 
can improve it.

Regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: manoj.vrajam...@wipro.com<mailto:manoj.vrajam...@wipro.com>
Sent: Wednesday, August 31, 2016 09:34 PM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: [osgi-dev] Please Help

Hi All,



I am trying to do the "Excercise Services" Section in the Quick Start Tutorial. 
I have followed exactly the same steps as said in the Section. But, on 
resolution, I get the following Resolve Error. (please see attachment)



Please help



Thanks,

Manoj
The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this email. www.wipro.com<http://www.wipro.com>
The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this email. www.wipro.com
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Please Help

2016-08-31 Thread Daghan ACAY
Hi manoj,

Please do base tutorial. Pay special attention to 
http://enroute.osgi.org/tutorial_base/320-provider.html section "imports". It 
basically says that your provider should export api bundles.

To solve your problem you should drag api bundles from calculated imports to 
exported bundles in your provider project's bnd.bnd file.

Please provide feedback on "quick start tutorial" if this is not clear so we 
can improve it.

Regards
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: manoj.vrajam...@wipro.com
Sent: Wednesday, August 31, 2016 09:34 PM
To: osgi-dev@mail.osgi.org
Subject: [osgi-dev] Please Help


Hi All,


I am trying to do the "Excercise Services" Section in the Quick Start Tutorial. 
I have followed exactly the same steps as said in the Section. But, on 
resolution, I get the following Resolve Error. (please see attachment)


Please help


Thanks,

Manoj

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this email. www.wipro.com
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Bundle resolution in BND

2016-08-31 Thread Daghan ACAY
Hi there,


I was working on understanding bundle resolution and workspaces in BND and 
enRoute. Here is my simplified set up:


workspace 1 two projects

ProjectA.api

ProjectB.provider (this depends on Bundle1 and Bundle2)


I resolve Project B using central maven repository. And release Both ProjectA 
and ProjectB to "Release"


Workspace 2 one project. This workspace has reference to "Release" directory of 
the workspace 1 hence can see ProjectA and ProjectB. However, this workspace 
does not have the Central repository pointing to Bundle1 and Bundle2 above. 
Project in workspace 2 is called


ProjectC.provider (this depends on ProjectA.api)


Here is my question . When I try to resolve Project C, resolution fails saying

"Project C  cannot be resolved because ProjectB cannot be resolved because it 
needs Bundle1."


Why should I have dependencies of my dependencies in my second workplace? Isn't 
it against resolution process? I mean if you have multiple dependencies then do 
you need to go and find every single one of the transient dependencies in your 
current local repositories. This can be exponentially big. Should not 
resolution find the dependencies even though they are not on your local 
repositories? I know I am going in the territory of MVN but I really thing 
there must be a simpler way. Similar to "provided" in MVN may be? or a global, 
I mean literally global "cnf"?


I also tried to export the dependencies of ProjectB.provider from 
ProjectB.provider to aid the resolution in Workspace2 but this does not seem 
right either in terms of the size of ProjectB or conventions of OSGi. So can 
you please tell me how can one use external bundle and resolve without knowing 
the transient dependencies? IF this cannot be done than how should one proceed 
to organise their workspaces while collaborating with others?


Sorry for the long message but I wanted to be as clear as possible.


Regards

-Daghan
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Ambiguity when providing DS components?

2016-08-29 Thread Daghan ACAY
Hi Peter,

Thanks for the response. I am glad we are on the same page, despite some 
generation gap :). I will start an application note on the web page git.

PS: you are spot on with "composition." my favorite OO pattern. I don't use 
inheritance that much. Also DS+configuration really difficult to understand 
especially with dynamic references and component life cycle. Yet it is great 
way to write "configuration driven" software. BTW i am working on an iot 
framework just doing that. I think it would be good to look at DS+configuration 
in another application note sometime in the future.

Regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Monday, August 29, 2016 08:41 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Ambiguity when providing DS components?

Can I suggest you start an OSGi enRoute Application Note?

On 29 aug. 2016, at 12:13, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Peter,

In addition to your heuristics I generally use services if:

1- testability is important e.g. testing a class which uses "new" for creating 
some functional entity is very hard. Easiest way to provide dependency 
injection is services.

Yes, but it also drags in an injection engine. I am still very fond of new 
because I know what I get but it might be a generational thing.

2- service implementations should be changed at runtime e.g. if a backward 
compatible new version is available at runtime then references can get the 
latest version dynamically.

This can also be handled with normal packages, unless you have several of 
course but then the substitution rule kicks in for me.

3- whiteboard pattern needs to be used. E.g. if you need to act on multiple 
implementations as a framework.

Yes, especially the fact that you do not really care if there is zero, one, or 
many is very important.


4- components need to be created dynamically from configuration at runtime.

Yes, this is what I would consider state but it is worth point this out 
specifically because DS + configuration is magic few people understand except 
for the ones that do and love it :-)

5- a class or method is likely to be extended with new functionally using other 
components but api cannot change e.g. dependency injection at imlepenting class 
without changing the api

I guess you mean composition? I guess that makes sense, especially because you 
can also use things to wire together dynamically.

Kind regards,

Peter Kriens

Do you think these are complementary to your initial heuristics? Actually i 
would very much like if we can ask the community to compile a coherent list 
with code examples. I am sure this will help a lot of osgi practitioners 
including myself.

Best regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Monday, August 29, 2016 07:51 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Ambiguity when providing DS components?

There is no clear cut test to see what is a component. I use the following 
heuristics:

a) Does it have state? For example, Configuration Admin. In those case you want 
to share a single object between different bundles
b) Do I want to add some type to the system with a bundle. I.e. implementations 
are in different bundles. When they are all in the same bundle and you do not 
see a future where you would deliver different impls in a bundle a service is 
not needed
c) Does it have an interesting life cycle? Services are wonderful things to 
signal availability

In your case, the simple approach without a service seems the best choice. Just 
using ’new’ is imho the simplest of all solutions. You only want to go to a 
factory model if the selection process is complicated or you want to hide the 
implementations.

Kind regards,

Peter Kriens

> On 29 aug. 2016, at 11:46, 
> list+org.o...@io7m.com<mailto:list+org.o...@io7m.com> wrote:
>
> 'Ello.
>
> On 2016-08-29T09:39:18 +0200
> Peter Kriens mailto:peter.kri...@aqute.biz>> wrote:
>
>> It depends on how extensible you want to be …
>>
>> If you want to provide different implementations for the same type in 
>> different bundles then a solution is that each implementation bundle 
>> registers a service that acts as a factory. You design some service 
>> properties for the selection.
>
> That's pretty much what I've done, isn't it? Not sure if you were
> referring to a different technique.
>
> As for the service properties, would these be capabilities? I think my
> main question is what implementation is selected if no properties are
> defi

Re: [osgi-dev] Ambiguity when providing DS components?

2016-08-29 Thread Daghan ACAY
Ok, i will start one. Let me check the git for the Web page.

Cheers
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Monday, August 29, 2016 08:41 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Ambiguity when providing DS components?

Can I suggest you start an OSGi enRoute Application Note?

On 29 aug. 2016, at 12:13, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

Hi Peter,

In addition to your heuristics I generally use services if:

1- testability is important e.g. testing a class which uses "new" for creating 
some functional entity is very hard. Easiest way to provide dependency 
injection is services.

Yes, but it also drags in an injection engine. I am still very fond of new 
because I know what I get but it might be a generational thing.

2- service implementations should be changed at runtime e.g. if a backward 
compatible new version is available at runtime then references can get the 
latest version dynamically.

This can also be handled with normal packages, unless you have several of 
course but then the substitution rule kicks in for me.

3- whiteboard pattern needs to be used. E.g. if you need to act on multiple 
implementations as a framework.

Yes, especially the fact that you do not really care if there is zero, one, or 
many is very important.


4- components need to be created dynamically from configuration at runtime.

Yes, this is what I would consider state but it is worth point this out 
specifically because DS + configuration is magic few people understand except 
for the ones that do and love it :-)

5- a class or method is likely to be extended with new functionally using other 
components but api cannot change e.g. dependency injection at imlepenting class 
without changing the api

I guess you mean composition? I guess that makes sense, especially because you 
can also use things to wire together dynamically.

Kind regards,

Peter Kriens

Do you think these are complementary to your initial heuristics? Actually i 
would very much like if we can ask the community to compile a coherent list 
with code examples. I am sure this will help a lot of osgi practitioners 
including myself.

Best regards
Daghan

Sent by MailWise<http://www.mail-wise.com/installation/2> – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: Monday, August 29, 2016 07:51 PM
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Ambiguity when providing DS components?

There is no clear cut test to see what is a component. I use the following 
heuristics:

a) Does it have state? For example, Configuration Admin. In those case you want 
to share a single object between different bundles
b) Do I want to add some type to the system with a bundle. I.e. implementations 
are in different bundles. When they are all in the same bundle and you do not 
see a future where you would deliver different impls in a bundle a service is 
not needed
c) Does it have an interesting life cycle? Services are wonderful things to 
signal availability

In your case, the simple approach without a service seems the best choice. Just 
using ’new’ is imho the simplest of all solutions. You only want to go to a 
factory model if the selection process is complicated or you want to hide the 
implementations.

Kind regards,

Peter Kriens

> On 29 aug. 2016, at 11:46, 
> list+org.o...@io7m.com<mailto:list+org.o...@io7m.com> wrote:
>
> 'Ello.
>
> On 2016-08-29T09:39:18 +0200
> Peter Kriens mailto:peter.kri...@aqute.biz>> wrote:
>
>> It depends on how extensible you want to be …
>>
>> If you want to provide different implementations for the same type in 
>> different bundles then a solution is that each implementation bundle 
>> registers a service that acts as a factory. You design some service 
>> properties for the selection.
>
> That's pretty much what I've done, isn't it? Not sure if you were
> referring to a different technique.
>
> As for the service properties, would these be capabilities? I think my
> main question is what implementation is selected if no properties are
> defined and there's nothing in the manifest to indicate a preference of
> one implementation over the other. I've read through the spec and it
> doesn't seem to talk about this, so I assume that it's
> implementation-defined.
>
>> However, this sounds like overkill. What would the problem be to just export 
>> the supplier package and let the user create the instance directly like in 
>> classic Java? Why does it have to be a component?
>>
>
> I suppose it doesn't *have* to be a component

Re: [osgi-dev] Ambiguity when providing DS components?

2016-08-29 Thread Daghan ACAY
Hi Peter,

In addition to your heuristics I generally use services if:

1- testability is important e.g. testing a class which uses "new" for creating 
some functional entity is very hard. Easiest way to provide dependency 
injection is services.
2- service implementations should be changed at runtime e.g. if a backward 
compatible new version is available at runtime then references can get the 
latest version dynamically.
3- whiteboard pattern needs to be used. E.g. if you need to act on multiple 
implementations as a framework.
4- components need to be created dynamically from configuration at runtime.
5- a class or method is likely to be extended with new functionally using other 
components but api cannot change e.g. dependency injection at imlepenting class 
without changing the api.

Do you think these are complementary to your initial heuristics? Actually i 
would very much like if we can ask the community to compile a coherent list 
with code examples. I am sure this will help a lot of osgi practitioners 
including myself.

Best regards
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: Peter Kriens 
Sent: Monday, August 29, 2016 07:51 PM
To: OSGi Developer Mail List 
Subject: Re: [osgi-dev] Ambiguity when providing DS components?

There is no clear cut test to see what is a component. I use the following 
heuristics:

a) Does it have state? For example, Configuration Admin. In those case you want 
to share a single object between different bundles
b) Do I want to add some type to the system with a bundle. I.e. implementations 
are in different bundles. When they are all in the same bundle and you do not 
see a future where you would deliver different impls in a bundle a service is 
not needed
c) Does it have an interesting life cycle? Services are wonderful things to 
signal availability

In your case, the simple approach without a service seems the best choice. Just 
using ’new’ is imho the simplest of all solutions. You only want to go to a 
factory model if the selection process is complicated or you want to hide the 
implementations.

Kind regards,

Peter Kriens

> On 29 aug. 2016, at 11:46, list+org.o...@io7m.com wrote:
>
> 'Ello.
>
> On 2016-08-29T09:39:18 +0200
> Peter Kriens  wrote:
>
>> It depends on how extensible you want to be …
>>
>> If you want to provide different implementations for the same type in 
>> different bundles then a solution is that each implementation bundle 
>> registers a service that acts as a factory. You design some service 
>> properties for the selection.
>
> That's pretty much what I've done, isn't it? Not sure if you were
> referring to a different technique.
>
> As for the service properties, would these be capabilities? I think my
> main question is what implementation is selected if no properties are
> defined and there's nothing in the manifest to indicate a preference of
> one implementation over the other. I've read through the spec and it
> doesn't seem to talk about this, so I assume that it's
> implementation-defined.
>
>> However, this sounds like overkill. What would the problem be to just export 
>> the supplier package and let the user create the instance directly like in 
>> classic Java? Why does it have to be a component?
>>
>
> I suppose it doesn't *have* to be a component. I don't have enough
> practical experience with OSGi to know what should be and shouldn't be.
> I agree that I could export the supplier package to at least give OSGi
> users the option to instantiate statically.
>
> I introduced a component for the same reason that I assume anyone would
> introduce a component... To decouple use of the trees from the
> selection of implementations, and to make live upgrades easier.
>
> M
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Help

2016-08-24 Thread Daghan ACAY
Monaj,


Run curl with debug, this might help 
http://stackoverflow.com/questions/866946/how-can-i-see-the-request-headers-made-by-curl-when-sending-a-request-to-the-ser


Or use a more user friendly rest client such as Postman 
(https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en).
 You can also start Enroute appliation in debug mode and see of the call is 
routed to your post method.

[https://lh4.googleusercontent.com/Dfqo9J42K7-xRvHW3GVpTU7YCa_zpy3kEDSIlKjpd2RAvVlNfZe5pn8Swaa4TgCWNTuOJOAfwWY=s128-h128-e365]

Postman
chrome.google.com
Supercharge your API workflow with Postman! Build, test, and document your APIs 
faster. More than a million developers already do.…


[http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded&a]

How can I see the request headers made by curl when 
...
stackoverflow.com
I want to see the request headers made by curl when I am sending a request to 
the server. How can I check that?





From: osgi-dev-boun...@mail.osgi.org  on behalf 
of manoj.vrajam...@wipro.com 
Sent: Wednesday, August 24, 2016 11:44 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Help


Please help me out..I am stuck at this…  :(



From: Manoj Venkatesh Rajamani (Product Engineering Service)
Sent: 24 August 2016 15:37
To: OSGi Developer Mail List 
Subject: RE: [osgi-dev] Help



Why is POST not returning the Uppercase String? What am I missing here?



From: Manoj Venkatesh Rajamani (Product Engineering Service)
Sent: 24 August 2016 12:33
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Help





public String getUpper(String string) {
return string.toUpperCase();
}

public String postUpper(String string) {
return string.toUpperCase();
}



//GET works..See below



manoj@manoj-Latitude-E5420:~$ curl http://localhost:8080/rest/upper/Hello
"HELLO"manoj@manoj-Latitude-E5420:~$

//POST fails...See below ( no error seen)

manoj@manoj-Latitude-E5420:~$ curl -X POST -H 

 "Content-Type:application/json" -d "'Hello'" http://localhost:8080/rest/upper
manoj@manoj-Latitude-E5420:~$





From: Manoj Venkatesh Rajamani (Product Engineering Service)
Sent: 24 August 2016 10:44:27
To: OSGi Developer Mail List
Subject: RE: [osgi-dev] Help



postValue() did not work either !!



From: osgi-dev-boun...@mail.osgi.org 
[mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Peter Kriens
Sent: 24 August 2016 10:43
To: OSGi Developer Mail List 
mailto:osgi-dev@mail.osgi.org>>
Subject: Re: [osgi-dev] Help



** This mail has been sent from an external source **

You are doing a POST but you declared a PUT.



Kind regards,



Peter Kriens



On 24 aug. 2016, at 05:36, 
manoj.vrajam...@wipro.com wrote:



I inserted the following method in the existing class:

public String putValue(String string) {
String status = string;
return (status + " World");
}

2. Tried calling curl --data "param1=Hello" http://localhost:8080/rest/value


But got the following error:

manoj@manoj-Latitude-E5420:~$ curl --data "param1=Hello" 
http://localhost:8080/rest/value



Error 500 


HTTP ERROR: 500
Problem accessing /rest/value. Reason:
java.io.FileNotFoundException: No such method postvalue/0. Available: 
{getservletname/0=[getservletname/0], 
getinitparameternames/0=[getinitparameternames/0], 
getinitparameter/1=[getinitparameter/1], getstatus/1=[getstatus/1], 
getsetvalue/1=[getsetvalue/1], getupper/1=[getupper/1], 
getservletcontext/0=[getservletcontext/0], getservletinfo/0=[getservletinfo/0], 
getservletconfig/0=[getservletconfig/0], putvalue/0=[putvalue/0]}
Powered by Jetty://







From: osgi-dev-boun...@mail.osgi.org 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of David Leangen mailto:o...@leangen.net>>
Sent: 23 August 2016 17:56:18
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help



** This mail has been sent from an external source **



Hi Manoj,



It is similar to get. The java method name starts with the http method name, so 
for instance putUpper() etc.



The test cases in this project should help:



  
https://github.com/osgi/osgi.enroute.bundles/tree/master/osgi.enroute.

Re: [osgi-dev] Import in the same Eclipse workspacve bnd projects from different filesystem locations

2016-08-22 Thread Daghan ACAY
Hi Portinaro,

You can check here http://enroute.osgi.org/qs/200-workspace.html to see how to 
create a bnd/enroute workspace in bndtools.

Cheers
Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: BJ Hargrave 
Sent: Monday, August 22, 2016 10:09 PM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Import in the same Eclipse workspacve bnd projects from 
different filesystem locations

Yes. The git repo holding your project can be in a different folder than the 
eclipse workspace.

--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com


- Original message -
From: Portinaro Nicola 
Sent by: osgi-dev-boun...@mail.osgi.org
To: "osgi-dev@mail.osgi.org" 
Cc:
Subject: [osgi-dev] Import in the same Eclipse workspacve bnd projects from 
different filesystem locations
Date: Mon, Aug 22, 2016 5:30 AM


Hi,



Eclipse PDE tools allows to import in a workspace (without copy them), projects 
from different filesystem locations.

Is this use case supported in some way by the EnRoute/Bndtools toolchain?



Thanks in advance,

N.









Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone 
indicate. La diffusione, copia o qualsiasi altra azione derivante dalla 
conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate 
ricevuto questo documento per errore siete cortesemente pregati di darne 
immediata comunicazione al mittente e di provvedere alla sua distruzione, 
Grazie.

This e-mail and any attachments is confidential and may contain privileged 
information intended for the addressee(s) only. Dissemination, copying, 
printing or use by anybody else is unauthorised. If you are not the intended 
recipient, please delete this message and any attachments and advise the sender 
by return e-mail, Thanks.

[rispetta l'ambiente]Rispetta l'ambiente. Non stampare questa mail se non è 
necessario.




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] User Admin

2016-08-20 Thread Daghan ACAY
Hi all,


I have solved it. Actually it started working. As for password access to server 
I am using the handleSecurity method of ServletContextHelper as below


if (request.getHeader("Authorization") == null) {
response.addHeader("WWW-Authenticate", "Basic");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
return false;
}


which prompts the user for user name and password. I have also enabled the 
https so I am quite happy with the authentication and User admin services.

Cheers
-Daghan

____
From: Daghan ACAY 
Sent: Friday, August 19, 2016 10:49 AM
To: osgi-dev@mail.osgi.org
Subject: User Admin


Hi There,


I have two relevant questions:


the first one is, I am using User Admin Service and BndTools in eclipse, an 
useradmin service is resolving the implementation to knoplerfish 
implementation. I do


@Reference

UserAdmin userAdmin


.

@Activate

public void initSecurity(){

User peter = (User) userAdmin.createRole("peter", Role.USER);

}


"peter" return null. am i using it wrong?


as a secondary but relevant question, I am using "Http Whiteboard 
Specification" However I do not know how I can integrate it with simple 
authentication. can you give me some pointers?


thanks in advance

-daghan
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] User Admin

2016-08-19 Thread Daghan ACAY
Hi There,


I have two relevant questions:


the first one is, I am using User Admin Service and BndTools in eclipse, an 
useradmin service is resolving the implementation to knoplerfish 
implementation. I do


@Reference

UserAdmin userAdmin


.

@Activate

public void initSecurity(){

User peter = (User) userAdmin.createRole("peter", Role.USER);

}


"peter" return null. am i using it wrong?


as a secondary but relevant question, I am using "Http Whiteboard 
Specification" However I do not know how I can integrate it with simple 
authentication. can you give me some pointers?


thanks in advance

-daghan
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Osgi Web Whiteboard specification

2016-08-18 Thread Daghan ACAY
Hi Raymond,


You are right OSGi prepends the context path in front of the servlet pattern. I 
think I missed in the documentation. So actually my rest endpoint was 
/devices/devices/sensor3 instead of /devices/sensor3 when I put =/devices in 
the ServletContextHelper's HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH


PS: sorry for late response I did not have time to check your suggestion.


I hope this helps others

-Daghan




From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Raymond Auge 
Sent: Tuesday, August 16, 2016 5:18 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Osgi Web Whiteboard specification

First, perhaps you had a typo in that your servlet was mapped to /devices when 
it should have been mapped to /sensor3  which would have made the url with the 
context at /devices, /devices/devices and not /devices/sensor3 ?

- Ray

On Tue, Aug 16, 2016 at 7:42 AM, Daghan ACAY 
mailto:daghana...@hotmail.com>> wrote:

I think I found a solution. All I did was to change the 
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH of the DeviceContextHelper 
to "=/" as follows. It also allow me to change the context name in servlet, 
filter and the helper. I still appreciate if someone explain why context path 
did not work for the DeviceContextHelper. So solution in DS as follows for 
others to benefit:


ServletContextHelper Code (full code)

@Component(service = ServletContextHelper.class, scope = ServiceScope.BUNDLE, 
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/" })
public class DeviceContextHelper extends ServletContextHelper {
@Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse 
response) throws IOException {
return true;
}
}



SERVLET CODE
@Component(service = Servlet.class, property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name)",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/devices" })
public class DeviceRestProvider extends HttpServlet {


}



FILTER CODE


@Component(property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN 
+ "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name)" 
})
public class DeviceFilter implements Filter {
...

}

thanks in advance

-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Daghan ACAY mailto:daghana...@hotmail.com>>
Sent: Tuesday, August 16, 2016 11:15 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: [osgi-dev] Osgi Web Whiteboard specification


Dear all,


I am trying to use OSGi HTTP Whiteboard specifications to handle security on 
Servlets using DS. I found this page 
http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html
 and also this example 
http://svn.apache.org/repos/asf/felix/trunk/http/samples/whiteboard/src/main/java/org/apache/felix/http/samples/whiteboard/


Here is how far I got using "default" context. (using another context stops 
servlet from working, which I wish to get working ideally)


ServletContextHelper Code (full code)

@Component(service = ServletContextHelper.class, scope = ServiceScope.BUNDLE, 
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/devices" })
public class DeviceContextHelper extends ServletContextHelper {
@Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse 
response) throws IOException {
return true;
}
}



SERVLET CODE
@Component(service = Servlet.class, property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/devices" })
public class DeviceRestProvider extends HttpServlet {


}



FILTER CODE


@Component(property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN 
+ "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)" })
public class DeviceFilter implements Filter {
...

}


With this code call to http://localhost:8080/devices/sensor3


I receive the following
--

HTTP ERROR: 404

Problem accessing /devices/sensor3. Reason:

File devices/sensor3 could not be found


Powered by Jetty://




Can you let me

Re: [osgi-dev] Osgi Web Whiteboard specification

2016-08-16 Thread Daghan ACAY
I think I found a solution. All I did was to change the 
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH of the DeviceContextHelper 
to "=/" as follows. It also allow me to change the context name in servlet, 
filter and the helper. I still appreciate if someone explain why context path 
did not work for the DeviceContextHelper. So solution in DS as follows for 
others to benefit:


ServletContextHelper Code (full code)

@Component(service = ServletContextHelper.class, scope = ServiceScope.BUNDLE, 
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/" })
public class DeviceContextHelper extends ServletContextHelper {
@Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse 
response) throws IOException {
return true;
}
}



SERVLET CODE
@Component(service = Servlet.class, property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name)",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/devices" })
public class DeviceRestProvider extends HttpServlet {


}



FILTER CODE


@Component(property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN 
+ "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=your_context_name)" 
})
public class DeviceFilter implements Filter {
...

}

thanks in advance

-Daghan


____
From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Daghan ACAY 
Sent: Tuesday, August 16, 2016 11:15 AM
To: osgi-dev@mail.osgi.org
Subject: [osgi-dev] Osgi Web Whiteboard specification


Dear all,


I am trying to use OSGi HTTP Whiteboard specifications to handle security on 
Servlets using DS. I found this page 
http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html
 and also this example 
http://svn.apache.org/repos/asf/felix/trunk/http/samples/whiteboard/src/main/java/org/apache/felix/http/samples/whiteboard/


Here is how far I got using "default" context. (using another context stops 
servlet from working, which I wish to get working ideally)


ServletContextHelper Code (full code)

@Component(service = ServletContextHelper.class, scope = ServiceScope.BUNDLE, 
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/devices" })
public class DeviceContextHelper extends ServletContextHelper {
@Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse 
response) throws IOException {
return true;
}
}



SERVLET CODE
@Component(service = Servlet.class, property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/devices" })
public class DeviceRestProvider extends HttpServlet {


}



FILTER CODE


@Component(property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN 
+ "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)" })
public class DeviceFilter implements Filter {
...

}


With this code call to http://localhost:8080/devices/sensor3


I receive the following
--

HTTP ERROR: 404

Problem accessing /devices/sensor3. Reason:

File devices/sensor3 could not be found


Powered by Jetty://




Can you let me know what I am doing wrong?


Cheers

-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Rest Management service

2016-08-16 Thread Daghan ACAY
Thanks Tim,


That is all confirmation I need. I will get going by building from code.


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Tim Verbelen 
Sent: Tuesday, August 16, 2016 11:03 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Rest Management service

Hi Daghan,

Jan Rellermeyer has written the reference implementation and donated it to the 
Concierge project. Since we all have limited time last couple of months it is 
still in this state. We are planning to make it part of our next 5.1 release 
which we hope to have ready by the next OSGi Community Event. It is not 
available in Maven or any other repository as we speak but we hope to do this 
for the next release.

Best regards,

Tim

On 08/16/2016 12:57 PM, Daghan ACAY wrote:

Hi Tim,


Thanks for the link. I have seen that before but it was not released part of 
the incubation release and honestly it does not seem to be maintained recently. 
Are you confident that it is 100% compiliant with the specs? also I prefer to 
use an artifact instead of building from source due to Licencing issues. Do you 
know if it is available in MVN or other repo?


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org> 
<mailto:osgi-dev-boun...@mail.osgi.org> on 
behalf of Tim Verbelen 
<mailto:tim.verbe...@intec.ugent.be>
Sent: Monday, August 15, 2016 7:59 AM
To: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Rest Management service

Hi Daghan,

The reference implementation of the REST spec is available in Eclipse 
Concierge: 
https://git.eclipse.org/c/concierge/org.eclipse.concierge.git/tree/bundles/org.eclipse.concierge.service.rest

Best regards,

Tim

On 08/15/2016 09:49 AM, Daghan ACAY wrote:

Hi,

I want control OSGi from browser, e.g. Upload bundles, remove bundles etc.. I 
am aware of Web console but I want to provide my own interface.

In compendium "137 Introduction REST Management Service Specification" seems to 
be a good fit. Is there an implementation of that  specification. Or a better 
alternative to reverse engineering the Web console?

Cheers
-Daghan




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Tim Verbelen
Department of Information Technology
Broadband Communication Networks (IBCN)
Ghent University - iMinds
Technologiepark-Zwijnaarde 15, 9052 Gent
T: +32 9 33 14905 ; T Secr: +32 9 33 14900
E: tim.verbe...@intec.ugent.be<mailto:tim.verbe...@intec.ugent.be>
W : www.ibcn.intec.UGent.be<http://www.ibcn.intec.UGent.be>




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Tim Verbelen
Department of Information Technology
Broadband Communication Networks (IBCN)
Ghent University - iMinds
Technologiepark-Zwijnaarde 15, 9052 Gent
T: +32 9 33 14905 ; T Secr: +32 9 33 14900
E: tim.verbe...@intec.ugent.be<mailto:tim.verbe...@intec.ugent.be>
W : www.ibcn.intec.UGent.be<http://www.ibcn.intec.UGent.be>

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Osgi Web Whiteboard specification

2016-08-16 Thread Daghan ACAY
Dear all,


I am trying to use OSGi HTTP Whiteboard specifications to handle security on 
Servlets using DS. I found this page 
http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html
 and also this example 
http://svn.apache.org/repos/asf/felix/trunk/http/samples/whiteboard/src/main/java/org/apache/felix/http/samples/whiteboard/


Here is how far I got using "default" context. (using another context stops 
servlet from working, which I wish to get working ideally)


ServletContextHelper Code (full code)

@Component(service = ServletContextHelper.class, scope = ServiceScope.BUNDLE, 
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/devices" })
public class DeviceContextHelper extends ServletContextHelper {
@Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse 
response) throws IOException {
return true;
}
}



SERVLET CODE
@Component(service = Servlet.class, property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/devices" })
public class DeviceRestProvider extends HttpServlet {


}



FILTER CODE


@Component(property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN 
+ "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=("
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=default)" })
public class DeviceFilter implements Filter {
...

}


With this code call to http://localhost:8080/devices/sensor3


I receive the following
--

HTTP ERROR: 404

Problem accessing /devices/sensor3. Reason:

File devices/sensor3 could not be found


Powered by Jetty://




Can you let me know what I am doing wrong?


Cheers

-Daghan


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Rest Management service

2016-08-16 Thread Daghan ACAY
Hi Tim,


Thanks for the link. I have seen that before but it was not released part of 
the incubation release and honestly it does not seem to be maintained recently. 
Are you confident that it is 100% compiliant with the specs? also I prefer to 
use an artifact instead of building from source due to Licencing issues. Do you 
know if it is available in MVN or other repo?


Cheers

-Daghan



From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Tim Verbelen 
Sent: Monday, August 15, 2016 7:59 AM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Rest Management service

Hi Daghan,

The reference implementation of the REST spec is available in Eclipse 
Concierge: 
https://git.eclipse.org/c/concierge/org.eclipse.concierge.git/tree/bundles/org.eclipse.concierge.service.rest

Best regards,

Tim

On 08/15/2016 09:49 AM, Daghan ACAY wrote:

Hi,

I want control OSGi from browser, e.g. Upload bundles, remove bundles etc.. I 
am aware of Web console but I want to provide my own interface.

In compendium "137 Introduction REST Management Service Specification" seems to 
be a good fit. Is there an implementation of that  specification. Or a better 
alternative to reverse engineering the Web console?

Cheers
-Daghan




___
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Tim Verbelen
Department of Information Technology
Broadband Communication Networks (IBCN)
Ghent University - iMinds
Technologiepark-Zwijnaarde 15, 9052 Gent
T: +32 9 33 14905 ; T Secr: +32 9 33 14900
E: tim.verbe...@intec.ugent.be<mailto:tim.verbe...@intec.ugent.be>
W : www.ibcn.intec.UGent.be<http://www.ibcn.intec.UGent.be>

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Help

2016-08-16 Thread Daghan ACAY
Hi Manoj,

I think you should start from base tutorial from scratch but follow *every* 
step because those are to give you a ventral idea without knowing enroute or 
bndtool which has many conventions under the hood e.g. enroute workspace. Also 
make sure you are using the recommended versions of eclipse and bndtools.

If you have difficulty following the base tutorials then please let's us know 
or create a pull request.

After that you might solve the problem you are facing right now. It is quite 
difficult to help you without knowing your exact steps. Best person to help you 
is yourself.

Regards
- Daghan

Sent by MailWise – See your emails as 
clean, short chats.


 Original Message 
From: manoj.vrajam...@wipro.com
Sent: Tuesday, August 16, 2016 06:17 PM
To: osgi-dev@mail.osgi.org
Subject: Re: [osgi-dev] Help


I did not quite understand that...Can you please help me to cross this barrier 
please...


From: osgi-dev-boun...@mail.osgi.org  on behalf 
of Peter Kriens 
Sent: 16 August 2016 13:29:54
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help


** This mail has been sent from an external source **

This is about Workspace Templates …

On 16 aug. 2016, at 09:58, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Hi Peter,

Please find my preferences screen shots attached..

The URL https://github.com/osgi    in the 
"Repositories" was added by me. Still *NO* good result  :(

Where does the system look for while loading templates ? May be, we need to add 
the right URL there ? Please suggest..

Thanks,
Manoj

From: osgi-dev-boun...@mail.osgi.org 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: 16 August 2016 12:59:12
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help

** This mail has been sent from an external source **
Not sure what is going on but you’re missing the templates from the 
Preferences/Bndtools/Workspace Template. Did you edit that list?

You should ensure that the `workspace` repository from https://github.com/osgi 
is included.

Kind regards,

Peter Kriens


On 16 aug. 2016, at 06:49, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Hi,

I am unable to select the workspace template as specified in the QST (Quick 
Start Tutorial) as I am not getting the options as shown in QST. Please help

Please see the options I am getting in the attachment..

Thanks,
Manoj

From: osgi-dev-boun...@mail.osgi.org 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: 12 August 2016 20:07:33
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help

** This mail has been sent from an external source **
You should try to follow the Quick Start tutorial in detail. Looking at your 
workspace you’re clearly NOT using an enRoute workspace since the ext and other 
directories is missing. So I assume you’ve created a workspace out of nothing?

The QS defines quite explicitly how to start from a workspace. If you have 
problems creating the OSGi enRoute workspace you have to show us the steps of 
what you did.

Kind regards,

Peter Kriens


On 12 aug. 2016, at 15:59, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vrajam...@wipro.com>> wrote:

Neil,

Check this attachment..Let me know if you need more info

Thanks,
Manoj

From: osgi-dev-boun...@mail.osgi.org 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Neil Bartlett mailto:njbartl...@gmail.com>>
Sent: 12 August 2016 19:23:55
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help

** This mail has been sent from an external source **
Manoj,

You don’t have any libraries on your build path.

What does the content of bnd.bnd look like for this project?

Regards,
Neil


On 12 Aug 2016, at 14:45, 
manoj.vrajam...@wipro.com wrote:

Hi Peter,

I am new to OSGi.. Following the Quick Start tutorial that you suggested...

How do I resolve these errors shown in the attachment?

Thanks,
Manoj

From: osgi-dev-boun...@mail.osgi.org 
mailto:osgi-dev-boun...@mail.osgi.org>> on 
behalf of Peter Kriens mailto:peter.kri...@aqute.biz>>
Sent: 01 August 2016 16:50:44
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Help

** This mail has been sent from an external source **
As I said on SO, you should follow the OSGi enRoute Quick Start tutorial and 
then the Base tutorial. This should give you sufficient background to debug 
your problem yourself.

Kind regards,

Peter Kriens

On 1 aug. 2016, at 12:43, 
mailto:manoj.vrajam...@wipro.com>> 
mailto:manoj.vra

[osgi-dev] Rest Management service

2016-08-15 Thread Daghan ACAY
Hi,

I want control OSGi from browser, e.g. Upload bundles, remove bundles etc.. I 
am aware of Web console but I want to provide my own interface.

In compendium "137 Introduction REST Management Service Specification" seems to 
be a good fit. Is there an implementation of that  specification. Or a better 
alternative to reverse engineering the Web console?

Cheers
-Daghan

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev