The SLF4J API, on the other hand, is simply a detail of the logging API used by 
your bundles, or of the API used by the implementation that you’re bridging to 
the OSGi log service. Does that make sense? Yes that’s make sense agreed.

From: Tim Ward [mailto:tim.w...@paremus.com]
Sent: Friday, July 27, 2018 12:32 PM
To: Matthews, Kevin
Cc: BJ Hargrave; OSGi Developer Mail List
Subject: Re: [osgi-dev] OSGI enroute bndrun file

Hi Kevin,

You should never need to add SLF4J as a requirement, but you will need to add a 
logging implementation as a requirement if you wish to configure and use a 
specific logging implementation (for example logback). This, however, would be 
an important detail of your application because it would be dictated by the 
features you need and would affect the configuration that you write, as a 
result it ends up as an explicit requirement.

The SLF4J API, on the other hand, is simply a detail of the logging API used by 
your bundles, or of the API used by the implementation that you’re bridging to 
the OSGi log service. Does that make sense?

The run requirements are really just defining the things that you explicitly 
want to select. These will be things like application entry points (e.g. your 
Servlets/JAX-RS resources) and anything that you explicitly want to configure 
(and are therefore tied to the PID).

Best Regards,

Tim


On 27 Jul 2018, at 16:33, Matthews, Kevin 
<kevin.matth...@firstdata.com<mailto:kevin.matth...@firstdata.com>> wrote:

Ok thanks, your explanation helps Tim. However, I understand there is clear 
distinction between both files and always need for dependency management 
(pom/build.gradle). But, there seem to be some commonality between both files 
when defining your bundles. For example sl4j is added as transitive dependences 
in the pom but may also needed to add to your run requirements if you using 
logservice bundle.

From: Tim Ward [mailto:tim.w...@paremus.com]
Sent: Friday, July 27, 2018 11:17 AM
To: BJ Hargrave; OSGi Developer Mail List
Cc: Matthews, Kevin
Subject: Re: [osgi-dev] OSGI enroute bndrun file

Note that BJ is referencing one possible way to use the 
bnd-resolver-maven-plugin and bnd-export-maven-plugin.

The enRoute projects set up their bndrun files to use standalone indexes 
generated by the bnd-indexer-maven-plugin. These indexes are generated using 
the dependencies from the pom file of the project. The benefit of this solution 
is that indexes can be generated for different dependency scopes, for example a 
testing index is generated which includes test-scoped dependencies. This index 
is then used by the debug bndrun to include things like the Felix Gogo shell 
and the Felix Web console, which are good for debugging, but should not be 
available when resolving/deploying a production application.

To answer your original question, therefore:

It seems, if we create an OSGI project we have to add dependencies to maven or 
gradle pom.xml build.gradle then we have add dependencies to our composite 
application .bndrun file.

Adding the dependencies to your pom.xml is a necessary step. This is because 
the transitive dependency graph of your project determines the set of bundles 
that are available to the resolve and export operations. Also adding a 
dependency to your pom.xml does not require anything to be added to your bndrun 
file (although it may change the output of your next call to the resolver).

The requirement that you add to your bndrun is different and is not about 
declaring dependencies. The bndrun runrequire instruction exists to define the 
outer surface and structure of your application, which can be further 
fine-tuned using blacklisting and other instructions. The closest analogy in a 
non-OSGi project would be an assembly descriptor for the maven-assembly plugin. 
The purpose of the bndrun is therefore to define the complete set of bundles 
make up your application, with the bnd-resolver-maven-plugin using your run 
requirements to generate that list for you. In general your run requirements 
list should be very small (often only one requirement), and not need updating 
even if the pom dependencies change.

Hopefully this explanation helps you to see the difference between the two 
files and what they are trying to achieve.

Best Regards,

Tim



On 27 Jul 2018, at 15:37, BJ Hargrave via osgi-dev 
<osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>> wrote:

Well you, the developer, write the requirements (-runrequire) and the 
bnd-resolver-maven-plugin can resolve these requirements into a set of bundles 
(-runbundles). The resolver process will have access to the maven project 
dependencies (via a FileSetRepository) to resolve the requirements into a set 
of bundles.

See 
https://github.com/osgi/osgi.enroute/tree/master/examples/microservice/rest-service-test<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_osgi_osgi.enroute_tree_master_examples_microservice_rest-2Dservice-2Dtest&d=DwMFAg&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=Rihyw_3LUJqBIkJqdTlch1sx7hTj4SFIgZcUOqXenkQ&s=ZBZP6yD0tutl5lpyCR5casvD1BehHU-ifVUjwVi0_8s&e=>.
 This project has a bndrun with -runrequires and the pom configures the 
bnd-resolver-maven-plugin for the project. 
Seehttps://enroute.osgi.org/examples/020-examples-microservice.html#the-integration-testbndrun<https://urldefense.proofpoint.com/v2/url?u=https-3A__enroute.osgi.org_examples_020-2Dexamples-2Dmicroservice.html-23the-2Dintegration-2Dtestbndrun&d=DwMFAg&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=Rihyw_3LUJqBIkJqdTlch1sx7hTj4SFIgZcUOqXenkQ&s=CtvIwhwC44uNrMDt0UDTbLwH-8xjBlsiaNn8Mz6BLGU&e=>
 for some information on this.
--

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<mailto:hargr...@us.ibm.com>


----- Original message -----
From: "Matthews, Kevin" 
<kevin.matth...@firstdata.com<mailto:kevin.matth...@firstdata.com>>
To: BJ Hargrave <hargr...@us.ibm.com<mailto:hargr...@us.ibm.com>>
Cc: "osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>" 
<osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>>
Subject: RE: [osgi-dev] OSGI enroute bndrun file
Date: Fri, Jul 27, 2018 10:21 AM



Thanks BJ. So, there is a bnd plugin referencing the FileSetRepository using 
the new enroute to write bundle(s) run time requirements to the bndrun file? 
Because I still have add my bundle dependencies/versions in this file. I think 
there are bnd plugins that resolve and validates the component dependencies for 
wiring.

From: BJ Hargrave [mailto:hargr...@us.ibm.com]
Sent: Friday, July 27, 2018 10:04 AM
To: Matthews, Kevin
Cc: osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: RE: [osgi-dev] OSGI enroute bndrun file

Well enRoute is currently maven based and uses the Bnd maven plugins which 
themselves use the FileSetRepository. One of the links was to one of the Bnd 
maven plugins using it. So you don't need to do anything to use this support. 
It is part of the maven and gradle plugin's support.

--

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<mailto:hargr...@us.ibm.com>


----- Original message -----
From: "Matthews, Kevin" 
<kevin.matth...@firstdata.com<mailto:kevin.matth...@firstdata.com>>
To: BJ Hargrave <hargr...@us.ibm.com<mailto:hargr...@us.ibm.com>>, 
"osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>" 
<osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>>
Cc:
Subject: RE: [osgi-dev] OSGI enroute bndrun file
Date: Fri, Jul 27, 2018 8:31 AM

How do we use these java and groovy file in enroute OSGI project?
For, gradle project do we reference FileSetRepositoryConvention  as task in the 
build.gradle

From: BJ Hargrave [mailto:hargr...@us.ibm.com]
Sent: Thursday, July 26, 2018 3:30 PM
To: Matthews, Kevin; osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] OSGI enroute bndrun file

The most recent versions of the gradle and maven support will make the 
project's dependencies available as bundles to the bndrun files.

For example:
https://github.com/bndtools/bnd/blob/26db7e381621f87ac81810fffe86e0c2224a6af0/maven/bnd-export-maven-plugin/src/main/java/aQute/bnd/maven/export/plugin/ExportMojo.java#L107-L109<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bndtools_bnd_blob_26db7e381621f87ac81810fffe86e0c2224a6af0_maven_bnd-2Dexport-2Dmaven-2Dplugin_src_main_java_aQute_bnd_maven_export_plugin_ExportMojo.java-23L107-2DL109&d=DwMFAg&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=Rihyw_3LUJqBIkJqdTlch1sx7hTj4SFIgZcUOqXenkQ&s=i1me8wrXsSwK3aASag7jVVkkrInIcmErhbeWOaNU1ds&e=>

and

https://github.com/bndtools/bnd/blob/26db7e381621f87ac81810fffe86e0c2224a6af0/biz.aQute.bnd.gradle/src/aQute/bnd/gradle/FileSetRepositoryConvention.groovy#L33-L36<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bndtools_bnd_blob_26db7e381621f87ac81810fffe86e0c2224a6af0_biz.aQute.bnd.gradle_src_aQute_bnd_gradle_FileSetRepositoryConvention.groovy-23L33-2DL36&d=DwMFAg&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=Rihyw_3LUJqBIkJqdTlch1sx7hTj4SFIgZcUOqXenkQ&s=2tkFkcQCey_x48MjB_sjeCmYk_6iGS0wEeGhsjxnbcE&e=>

--

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<mailto:hargr...@us.ibm.com>


----- Original message -----
From: "Matthews, Kevin via osgi-dev" 
<osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>>
Sent by: osgi-dev-boun...@mail.osgi.org<mailto:osgi-dev-boun...@mail.osgi.org>
To: "osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>" 
<osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>>
Cc:
Subject: [osgi-dev] OSGI enroute bndrun file
Date: Thu, Jul 26, 2018 3:05 PM

Hello,

I would like to know will there be any change in the future to Enroute project 
as to how we add dependencies to .bdnrun Requirements project. It seems, if we 
create an OSGI project we have to add dependencies to maven or gradle pom.xml 
build.gradle then we have add dependencies to our composite application .bndrun 
file. Will there be in the future such as a maven plugin or gradle plugin to 
automactically add transitive dependies to the .bndrun file. Sometimes we have 
to maintain 2 files build management and run requirements file and just to wire 
components can take time.

Kevin Matthews
Senior Application Analyst
First Data, 3975 NW 120 Ave, Coral Springs, FL 33065
Office: 954-845-4222 | Mobile: 561-465-6694

kevin.matth...@firstdata.com<mailto:kevin.matth...@firstdata.com> | 
firstdata.com<http://firstdata.com/>

The information in this message may be proprietary and/or confidential, and 
protected from disclosure. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited. If you 
have received this communication in error, please notify First Data immediately 
by replying to this message and deleting it from your computer.
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwMFAg&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=Rihyw_3LUJqBIkJqdTlch1sx7hTj4SFIgZcUOqXenkQ&s=36XsSvP_jJPOsnVWTlNi594zsF5wIQTamqBW7e68hZE&e=>






_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org<mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwMFaQ&c=ewHkv9vLloTwhsKn5d4bTdoqsmBfyfooQX5O7EQLv5TtBZ1CwcvjU063xndfqI8U&r=wKHHp1xupEN1UoR2CPDlg9US2Vs3om5ld5YqSsWMQX8&m=y5udKCMQJcbMLRW8njO5eWSJ860Ut3Ba9mO-D8xvaN8&s=aqNZXLvY3CaXW-25p5go3HWMQbPQ_fsDc9p_hGyfXT4&e=>

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

Reply via email to