You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by DERIES Sebastien <se...@thalesgroup.com> on 2019/01/15 10:30:41 UTC

maven-bundle-plugin multiple blueprint folders

Hi Felix users !

First I wish you the best for this new year !

Then, I have a question about the maven-bundle-plugin and the bundle-blueprint manifest header.
Our application is built using the maven-bundle-plugin.

Our bundles currently instanciate beans using many blueprint XML files. The bean definitions are stored in the following file structure :
OSGI-INF
->blueprint
-----> file1.xml
-----> file2.xml
-----> ...
-----> fileN.xml

The maven-bundle-plugin generates for us a perfect MANIFEST.MF file, with this structure.

However, having such a flat file structure is not easily readable. I was wondering if maven-bundle-plugin could automatically generate a MANIFEST.MF with the right bundle-blueprint header corresponding to a file structure like this:

OSGI-INF
->blueprint
-----> folder1
------------> file1.xml
------------> file2.xml
-----> folder2
------------> file1.xml
------------> file2.xml
-----> folder3
------------> file1.xml
------------> file2.xml

I tested this file structure with our current maven-bundle-plugin options and it currently does not work. Is there a way to configure the maven-bundle-plugin to have inside the manifest :
bundle-blueprint: blueprint/folder1, blueprint/folder2, blueprint/folder3

Thank you!

Cheers.

Sebastien


Re: maven-bundle-plugin multiple blueprint folders

Posted by Raymond Auge <ra...@liferay.com>.
maven-bundle-plugin will process those macros. The only doubt I have is
whether maven-bundle-plugin has all the paths configured properly for bnd.
I'd start with the assumption that it is and just try it and see if it
works.

- Ray

On Wed, Jan 16, 2019 at 9:05 AM Neil Bartlett <nj...@gmail.com> wrote:

> In bnd you could use macros, such as the -findpath macro (
> https://bnd.bndtools.org/macros/findpath.html).
>
> However I'm not sure if maven-bundle-plugin will process these.
>
> Neil
>
> On Wed, Jan 16, 2019 at 1:27 PM DERIES Sebastien <
> sebastien.deries@thalesgroup.com> wrote:
>
> > Hi Neil,
> > thank you for your answer!
> >
> > Do you know if there is a way to configure the maven-bundle-plugin to
> > automatically generate the bundle-blueprint header as you described (with
> > the "/"):
> > OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
> > OSGI-INF/blueprint/folder3/
> >
> > If such a configuration exists, it would discover automatically the
> > folders where blueprint XML files are, and list then in the header.
> >
> > Regards.
> >
> > Sebastien.
> >
> > -----Message d'origine-----
> > De : Neil Bartlett [mailto:njbartlett@gmail.com]
> > Envoyé : mercredi 16 janvier 2019 10:26
> > À : users
> > Objet : Re: maven-bundle-plugin multiple blueprint folders
> >
> > See OSGi Compendium specification, section 121.3.4. The Bundle-Blueprint
> > header is a list of paths and only the last component of each path can
> be a
> > wildcard. However if a path ends in a slash then it is inferred to mean
> > *.xml under that path.
> >
> > Therefore you can define your Bundle-Blueprint header as:
> > OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
> > OSGI-INF/blueprint/folder3/
> > (etc).
> >
> > Regards,
> > Neil
> >
> > On Tue, Jan 15, 2019 at 10:30 AM DERIES Sebastien <
> > sebastien.deries@thalesgroup.com> wrote:
> >
> > > Hi Felix users !
> > >
> > > First I wish you the best for this new year !
> > >
> > > Then, I have a question about the maven-bundle-plugin and the
> > > bundle-blueprint manifest header.
> > > Our application is built using the maven-bundle-plugin.
> > >
> > > Our bundles currently instanciate beans using many blueprint XML files.
> > > The bean definitions are stored in the following file structure :
> > > OSGI-INF
> > > ->blueprint
> > > -----> file1.xml
> > > -----> file2.xml
> > > -----> ...
> > > -----> fileN.xml
> > >
> > > The maven-bundle-plugin generates for us a perfect MANIFEST.MF file,
> with
> > > this structure.
> > >
> > > However, having such a flat file structure is not easily readable. I
> was
> > > wondering if maven-bundle-plugin could automatically generate a
> > MANIFEST.MF
> > > with the right bundle-blueprint header corresponding to a file
> structure
> > > like this:
> > >
> > > OSGI-INF
> > > ->blueprint
> > > -----> folder1
> > > ------------> file1.xml
> > > ------------> file2.xml
> > > -----> folder2
> > > ------------> file1.xml
> > > ------------> file2.xml
> > > -----> folder3
> > > ------------> file1.xml
> > > ------------> file2.xml
> > >
> > > I tested this file structure with our current maven-bundle-plugin
> options
> > > and it currently does not work. Is there a way to configure the
> > > maven-bundle-plugin to have inside the manifest :
> > > bundle-blueprint: blueprint/folder1, blueprint/folder2,
> blueprint/folder3
> > >
> > > Thank you!
> > >
> > > Cheers.
> > >
> > > Sebastien
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: maven-bundle-plugin multiple blueprint folders

Posted by Neil Bartlett <nj...@gmail.com>.
In bnd you could use macros, such as the -findpath macro (
https://bnd.bndtools.org/macros/findpath.html).

However I'm not sure if maven-bundle-plugin will process these.

Neil

On Wed, Jan 16, 2019 at 1:27 PM DERIES Sebastien <
sebastien.deries@thalesgroup.com> wrote:

> Hi Neil,
> thank you for your answer!
>
> Do you know if there is a way to configure the maven-bundle-plugin to
> automatically generate the bundle-blueprint header as you described (with
> the "/"):
> OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
> OSGI-INF/blueprint/folder3/
>
> If such a configuration exists, it would discover automatically the
> folders where blueprint XML files are, and list then in the header.
>
> Regards.
>
> Sebastien.
>
> -----Message d'origine-----
> De : Neil Bartlett [mailto:njbartlett@gmail.com]
> Envoyé : mercredi 16 janvier 2019 10:26
> À : users
> Objet : Re: maven-bundle-plugin multiple blueprint folders
>
> See OSGi Compendium specification, section 121.3.4. The Bundle-Blueprint
> header is a list of paths and only the last component of each path can be a
> wildcard. However if a path ends in a slash then it is inferred to mean
> *.xml under that path.
>
> Therefore you can define your Bundle-Blueprint header as:
> OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
> OSGI-INF/blueprint/folder3/
> (etc).
>
> Regards,
> Neil
>
> On Tue, Jan 15, 2019 at 10:30 AM DERIES Sebastien <
> sebastien.deries@thalesgroup.com> wrote:
>
> > Hi Felix users !
> >
> > First I wish you the best for this new year !
> >
> > Then, I have a question about the maven-bundle-plugin and the
> > bundle-blueprint manifest header.
> > Our application is built using the maven-bundle-plugin.
> >
> > Our bundles currently instanciate beans using many blueprint XML files.
> > The bean definitions are stored in the following file structure :
> > OSGI-INF
> > ->blueprint
> > -----> file1.xml
> > -----> file2.xml
> > -----> ...
> > -----> fileN.xml
> >
> > The maven-bundle-plugin generates for us a perfect MANIFEST.MF file, with
> > this structure.
> >
> > However, having such a flat file structure is not easily readable. I was
> > wondering if maven-bundle-plugin could automatically generate a
> MANIFEST.MF
> > with the right bundle-blueprint header corresponding to a file structure
> > like this:
> >
> > OSGI-INF
> > ->blueprint
> > -----> folder1
> > ------------> file1.xml
> > ------------> file2.xml
> > -----> folder2
> > ------------> file1.xml
> > ------------> file2.xml
> > -----> folder3
> > ------------> file1.xml
> > ------------> file2.xml
> >
> > I tested this file structure with our current maven-bundle-plugin options
> > and it currently does not work. Is there a way to configure the
> > maven-bundle-plugin to have inside the manifest :
> > bundle-blueprint: blueprint/folder1, blueprint/folder2, blueprint/folder3
> >
> > Thank you!
> >
> > Cheers.
> >
> > Sebastien
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

RE: maven-bundle-plugin multiple blueprint folders

Posted by DERIES Sebastien <se...@thalesgroup.com>.
Hi Neil, 
thank you for your answer!

Do you know if there is a way to configure the maven-bundle-plugin to automatically generate the bundle-blueprint header as you described (with the "/"):
OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
OSGI-INF/blueprint/folder3/

If such a configuration exists, it would discover automatically the folders where blueprint XML files are, and list then in the header.

Regards.

Sebastien.

-----Message d'origine-----
De : Neil Bartlett [mailto:njbartlett@gmail.com] 
Envoyé : mercredi 16 janvier 2019 10:26
À : users
Objet : Re: maven-bundle-plugin multiple blueprint folders

See OSGi Compendium specification, section 121.3.4. The Bundle-Blueprint
header is a list of paths and only the last component of each path can be a
wildcard. However if a path ends in a slash then it is inferred to mean
*.xml under that path.

Therefore you can define your Bundle-Blueprint header as:
OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
OSGI-INF/blueprint/folder3/
(etc).

Regards,
Neil

On Tue, Jan 15, 2019 at 10:30 AM DERIES Sebastien <
sebastien.deries@thalesgroup.com> wrote:

> Hi Felix users !
>
> First I wish you the best for this new year !
>
> Then, I have a question about the maven-bundle-plugin and the
> bundle-blueprint manifest header.
> Our application is built using the maven-bundle-plugin.
>
> Our bundles currently instanciate beans using many blueprint XML files.
> The bean definitions are stored in the following file structure :
> OSGI-INF
> ->blueprint
> -----> file1.xml
> -----> file2.xml
> -----> ...
> -----> fileN.xml
>
> The maven-bundle-plugin generates for us a perfect MANIFEST.MF file, with
> this structure.
>
> However, having such a flat file structure is not easily readable. I was
> wondering if maven-bundle-plugin could automatically generate a MANIFEST.MF
> with the right bundle-blueprint header corresponding to a file structure
> like this:
>
> OSGI-INF
> ->blueprint
> -----> folder1
> ------------> file1.xml
> ------------> file2.xml
> -----> folder2
> ------------> file1.xml
> ------------> file2.xml
> -----> folder3
> ------------> file1.xml
> ------------> file2.xml
>
> I tested this file structure with our current maven-bundle-plugin options
> and it currently does not work. Is there a way to configure the
> maven-bundle-plugin to have inside the manifest :
> bundle-blueprint: blueprint/folder1, blueprint/folder2, blueprint/folder3
>
> Thank you!
>
> Cheers.
>
> Sebastien
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

Re: maven-bundle-plugin multiple blueprint folders

Posted by Neil Bartlett <nj...@gmail.com>.
See OSGi Compendium specification, section 121.3.4. The Bundle-Blueprint
header is a list of paths and only the last component of each path can be a
wildcard. However if a path ends in a slash then it is inferred to mean
*.xml under that path.

Therefore you can define your Bundle-Blueprint header as:
OSGI-INF/blueprint/folder1/, OSGI-INF/blueprint/folder2/,
OSGI-INF/blueprint/folder3/
(etc).

Regards,
Neil

On Tue, Jan 15, 2019 at 10:30 AM DERIES Sebastien <
sebastien.deries@thalesgroup.com> wrote:

> Hi Felix users !
>
> First I wish you the best for this new year !
>
> Then, I have a question about the maven-bundle-plugin and the
> bundle-blueprint manifest header.
> Our application is built using the maven-bundle-plugin.
>
> Our bundles currently instanciate beans using many blueprint XML files.
> The bean definitions are stored in the following file structure :
> OSGI-INF
> ->blueprint
> -----> file1.xml
> -----> file2.xml
> -----> ...
> -----> fileN.xml
>
> The maven-bundle-plugin generates for us a perfect MANIFEST.MF file, with
> this structure.
>
> However, having such a flat file structure is not easily readable. I was
> wondering if maven-bundle-plugin could automatically generate a MANIFEST.MF
> with the right bundle-blueprint header corresponding to a file structure
> like this:
>
> OSGI-INF
> ->blueprint
> -----> folder1
> ------------> file1.xml
> ------------> file2.xml
> -----> folder2
> ------------> file1.xml
> ------------> file2.xml
> -----> folder3
> ------------> file1.xml
> ------------> file2.xml
>
> I tested this file structure with our current maven-bundle-plugin options
> and it currently does not work. Is there a way to configure the
> maven-bundle-plugin to have inside the manifest :
> bundle-blueprint: blueprint/folder1, blueprint/folder2, blueprint/folder3
>
> Thank you!
>
> Cheers.
>
> Sebastien
>
>