You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Charles Moulliard <ch...@gmail.com> on 2013/12/23 15:20:15 UTC

Maven Felix bundle / merge of files META-INF/Services

Hi,

I'm facing issues to generate a bundle (= merge of ElasticSearch + Lucene
artifacts). Why : They both share same files under this directory
META-INF/services :

org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.DocValuesFormat
org.apache.lucene.codecs.PostingsFormat

and org.apache.lucene.codecs.PostingsFormat file content diverges

Lucene

org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat

ElasticSearch

org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
org.elasticsearch.search.suggest.completion.Completion090PostingsFormat

I'm using split-package / maven-shade but the result generated
(merge-first, merge-last, first or last) does not allow to merge both
files. Is there a trick/solution ?
The pom file that I use  to generate the elasticsearch bundle is available
here : https://gist.github.com/8097375

Regards,

-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Maven Felix bundle / merge of files META-INF/Services

Posted by David Bosschaert <da...@gmail.com>.
Oh, and one more thing - if you're merging these two into a single
bundle, you should just be able to merge the contents of the
META-INF/services files with the same name...

On 23 December 2013 14:34, David Bosschaert <da...@gmail.com> wrote:
> Hi Charles,
>
> If these files are just for use with ServiceLoader you might not want
> to export the packages at all and look at the OSGi Service Loader
> Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
> implements that spec) for a solution?
>
> Cheers,
>
> David
>
> [1] Chapter 133 in OSGi Enterprise R5 http://www.osgi.org/Download/Release5
> [2] http://aries.apache.org/modules/spi-fly.html
>
> On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
>> Hi,
>>
>> I'm facing issues to generate a bundle (= merge of ElasticSearch + Lucene
>> artifacts). Why : They both share same files under this directory
>> META-INF/services :
>>
>> org.apache.lucene.codecs.Codec
>> org.apache.lucene.codecs.DocValuesFormat
>> org.apache.lucene.codecs.PostingsFormat
>>
>> and org.apache.lucene.codecs.PostingsFormat file content diverges
>>
>> Lucene
>>
>> org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
>> org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
>>
>> ElasticSearch
>>
>> org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
>> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
>> org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
>>
>> I'm using split-package / maven-shade but the result generated
>> (merge-first, merge-last, first or last) does not allow to merge both
>> files. Is there a trick/solution ?
>> The pom file that I use  to generate the elasticsearch bundle is available
>> here : https://gist.github.com/8097375
>>
>> Regards,
>>
>> --
>> Charles Moulliard
>> Apache Committer / Architect @RedHat
>> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

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


Re: Maven Felix bundle / merge of files META-INF/Services

Posted by Charles Moulliard <ch...@gmail.com>.
Find a solution which is perhaps temporary (= workaround) by adding
manually using maven-shade the merged files.


On Mon, Dec 23, 2013 at 4:36 PM, Charles Moulliard <ch...@gmail.com> wrote:

> Yep. Otherwise, I will deploy lucene-core as a bundle and not like now
> repackaged under servicemix-elasticsearch bundle
>
>
> On Mon, Dec 23, 2013 at 4:18 PM, David Bosschaert <
> david.bosschaert@gmail.com> wrote:
>
>> Ah, so basically all you're looking for is some Maven magic to merge
>> the split-package classes into a single package and to merge the files
>> in META-INF/services?
>>
>> On 23 December 2013 14:40, Charles Moulliard <ch...@gmail.com> wrote:
>> > I currently use Aries SPI for this bundle (Require & Provide-Capability)
>> > and that works excepted that some classes are not retrieved as the file
>> > generated by split-package does not include both classes (from lucene,
>> from
>> > elasticsearch)
>> >
>> >
>> > On Mon, Dec 23, 2013 at 3:34 PM, David Bosschaert <
>> > david.bosschaert@gmail.com> wrote:
>> >
>> >> Hi Charles,
>> >>
>> >> If these files are just for use with ServiceLoader you might not want
>> >> to export the packages at all and look at the OSGi Service Loader
>> >> Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
>> >> implements that spec) for a solution?
>> >>
>> >> Cheers,
>> >>
>> >> David
>> >>
>> >> [1] Chapter 133 in OSGi Enterprise R5
>> >> http://www.osgi.org/Download/Release5
>> >> [2] http://aries.apache.org/modules/spi-fly.html
>> >>
>> >> On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > I'm facing issues to generate a bundle (= merge of ElasticSearch +
>> Lucene
>> >> > artifacts). Why : They both share same files under this directory
>> >> > META-INF/services :
>> >> >
>> >> > org.apache.lucene.codecs.Codec
>> >> > org.apache.lucene.codecs.DocValuesFormat
>> >> > org.apache.lucene.codecs.PostingsFormat
>> >> >
>> >> > and org.apache.lucene.codecs.PostingsFormat file content diverges
>> >> >
>> >> > Lucene
>> >> >
>> >> > org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
>> >> > org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
>> >> >
>> >> > ElasticSearch
>> >> >
>> >> >
>> org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
>> >> >
>> >>
>> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
>> >> >
>> org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
>> >> >
>> >> > I'm using split-package / maven-shade but the result generated
>> >> > (merge-first, merge-last, first or last) does not allow to merge both
>> >> > files. Is there a trick/solution ?
>> >> > The pom file that I use  to generate the elasticsearch bundle is
>> >> available
>> >> > here : https://gist.github.com/8097375
>> >> >
>> >> > Regards,
>> >> >
>> >> > --
>> >> > Charles Moulliard
>> >> > Apache Committer / Architect @RedHat
>> >> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Architect @RedHat
>> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Maven Felix bundle / merge of files META-INF/Services

Posted by Charles Moulliard <ch...@gmail.com>.
Yep. Otherwise, I will deploy lucene-core as a bundle and not like now
repackaged under servicemix-elasticsearch bundle


On Mon, Dec 23, 2013 at 4:18 PM, David Bosschaert <
david.bosschaert@gmail.com> wrote:

> Ah, so basically all you're looking for is some Maven magic to merge
> the split-package classes into a single package and to merge the files
> in META-INF/services?
>
> On 23 December 2013 14:40, Charles Moulliard <ch...@gmail.com> wrote:
> > I currently use Aries SPI for this bundle (Require & Provide-Capability)
> > and that works excepted that some classes are not retrieved as the file
> > generated by split-package does not include both classes (from lucene,
> from
> > elasticsearch)
> >
> >
> > On Mon, Dec 23, 2013 at 3:34 PM, David Bosschaert <
> > david.bosschaert@gmail.com> wrote:
> >
> >> Hi Charles,
> >>
> >> If these files are just for use with ServiceLoader you might not want
> >> to export the packages at all and look at the OSGi Service Loader
> >> Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
> >> implements that spec) for a solution?
> >>
> >> Cheers,
> >>
> >> David
> >>
> >> [1] Chapter 133 in OSGi Enterprise R5
> >> http://www.osgi.org/Download/Release5
> >> [2] http://aries.apache.org/modules/spi-fly.html
> >>
> >> On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I'm facing issues to generate a bundle (= merge of ElasticSearch +
> Lucene
> >> > artifacts). Why : They both share same files under this directory
> >> > META-INF/services :
> >> >
> >> > org.apache.lucene.codecs.Codec
> >> > org.apache.lucene.codecs.DocValuesFormat
> >> > org.apache.lucene.codecs.PostingsFormat
> >> >
> >> > and org.apache.lucene.codecs.PostingsFormat file content diverges
> >> >
> >> > Lucene
> >> >
> >> > org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
> >> > org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
> >> >
> >> > ElasticSearch
> >> >
> >> > org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
> >> >
> >>
> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
> >> >
> org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
> >> >
> >> > I'm using split-package / maven-shade but the result generated
> >> > (merge-first, merge-last, first or last) does not allow to merge both
> >> > files. Is there a trick/solution ?
> >> > The pom file that I use  to generate the elasticsearch bundle is
> >> available
> >> > here : https://gist.github.com/8097375
> >> >
> >> > Regards,
> >> >
> >> > --
> >> > Charles Moulliard
> >> > Apache Committer / Architect @RedHat
> >> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
> >
> > --
> > Charles Moulliard
> > Apache Committer / Architect @RedHat
> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Maven Felix bundle / merge of files META-INF/Services

Posted by David Bosschaert <da...@gmail.com>.
Ah, so basically all you're looking for is some Maven magic to merge
the split-package classes into a single package and to merge the files
in META-INF/services?

On 23 December 2013 14:40, Charles Moulliard <ch...@gmail.com> wrote:
> I currently use Aries SPI for this bundle (Require & Provide-Capability)
> and that works excepted that some classes are not retrieved as the file
> generated by split-package does not include both classes (from lucene, from
> elasticsearch)
>
>
> On Mon, Dec 23, 2013 at 3:34 PM, David Bosschaert <
> david.bosschaert@gmail.com> wrote:
>
>> Hi Charles,
>>
>> If these files are just for use with ServiceLoader you might not want
>> to export the packages at all and look at the OSGi Service Loader
>> Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
>> implements that spec) for a solution?
>>
>> Cheers,
>>
>> David
>>
>> [1] Chapter 133 in OSGi Enterprise R5
>> http://www.osgi.org/Download/Release5
>> [2] http://aries.apache.org/modules/spi-fly.html
>>
>> On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
>> > Hi,
>> >
>> > I'm facing issues to generate a bundle (= merge of ElasticSearch + Lucene
>> > artifacts). Why : They both share same files under this directory
>> > META-INF/services :
>> >
>> > org.apache.lucene.codecs.Codec
>> > org.apache.lucene.codecs.DocValuesFormat
>> > org.apache.lucene.codecs.PostingsFormat
>> >
>> > and org.apache.lucene.codecs.PostingsFormat file content diverges
>> >
>> > Lucene
>> >
>> > org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
>> > org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
>> >
>> > ElasticSearch
>> >
>> > org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
>> >
>> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
>> > org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
>> >
>> > I'm using split-package / maven-shade but the result generated
>> > (merge-first, merge-last, first or last) does not allow to merge both
>> > files. Is there a trick/solution ?
>> > The pom file that I use  to generate the elasticsearch bundle is
>> available
>> > here : https://gist.github.com/8097375
>> >
>> > Regards,
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Architect @RedHat
>> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

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


Re: Maven Felix bundle / merge of files META-INF/Services

Posted by Charles Moulliard <ch...@gmail.com>.
I currently use Aries SPI for this bundle (Require & Provide-Capability)
and that works excepted that some classes are not retrieved as the file
generated by split-package does not include both classes (from lucene, from
elasticsearch)


On Mon, Dec 23, 2013 at 3:34 PM, David Bosschaert <
david.bosschaert@gmail.com> wrote:

> Hi Charles,
>
> If these files are just for use with ServiceLoader you might not want
> to export the packages at all and look at the OSGi Service Loader
> Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
> implements that spec) for a solution?
>
> Cheers,
>
> David
>
> [1] Chapter 133 in OSGi Enterprise R5
> http://www.osgi.org/Download/Release5
> [2] http://aries.apache.org/modules/spi-fly.html
>
> On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
> > Hi,
> >
> > I'm facing issues to generate a bundle (= merge of ElasticSearch + Lucene
> > artifacts). Why : They both share same files under this directory
> > META-INF/services :
> >
> > org.apache.lucene.codecs.Codec
> > org.apache.lucene.codecs.DocValuesFormat
> > org.apache.lucene.codecs.PostingsFormat
> >
> > and org.apache.lucene.codecs.PostingsFormat file content diverges
> >
> > Lucene
> >
> > org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
> > org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
> >
> > ElasticSearch
> >
> > org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
> >
> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
> > org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
> >
> > I'm using split-package / maven-shade but the result generated
> > (merge-first, merge-last, first or last) does not allow to merge both
> > files. Is there a trick/solution ?
> > The pom file that I use  to generate the elasticsearch bundle is
> available
> > here : https://gist.github.com/8097375
> >
> > Regards,
> >
> > --
> > Charles Moulliard
> > Apache Committer / Architect @RedHat
> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Maven Felix bundle / merge of files META-INF/Services

Posted by David Bosschaert <da...@gmail.com>.
Hi Charles,

If these files are just for use with ServiceLoader you might not want
to export the packages at all and look at the OSGi Service Loader
Mediator spec [1] or the Apache Aries SPI-Fly project [2] (which
implements that spec) for a solution?

Cheers,

David

[1] Chapter 133 in OSGi Enterprise R5 http://www.osgi.org/Download/Release5
[2] http://aries.apache.org/modules/spi-fly.html

On 23 December 2013 14:20, Charles Moulliard <ch...@gmail.com> wrote:
> Hi,
>
> I'm facing issues to generate a bundle (= merge of ElasticSearch + Lucene
> artifacts). Why : They both share same files under this directory
> META-INF/services :
>
> org.apache.lucene.codecs.Codec
> org.apache.lucene.codecs.DocValuesFormat
> org.apache.lucene.codecs.PostingsFormat
>
> and org.apache.lucene.codecs.PostingsFormat file content diverges
>
> Lucene
>
> org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
> org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
>
> ElasticSearch
>
> org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
> org.elasticsearch.index.codec.postingsformat.ElasticSearch090PostingsFormat
> org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
>
> I'm using split-package / maven-shade but the result generated
> (merge-first, merge-last, first or last) does not allow to merge both
> files. Is there a trick/solution ?
> The pom file that I use  to generate the elasticsearch bundle is available
> here : https://gist.github.com/8097375
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

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