You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Peter Kriens <pe...@aqute.biz> on 2009/03/26 00:03:15 UTC
Re: [maven-bundle-plugin] how do I export-package a resource directory?
The spec does not allow exports of META-INF because it is not a valid
package name ...
Kind regards,
Peter Kriens
On 25 mrt 2009, at 11:19, Stuart McCulloch wrote:
> 2009/3/25 David Bosschaert <da...@gmail.com>
>
>> Thanks for the quick response, Stuart.
>>
>> Unfortunately, moving it to the _exportcontents sections gives me the
>> same error.
>> I'm currently on version 2.0.0, but I also tried this with 1.4.3...
>>
>
> looks like a bnd issue (I know Peter discourages export of META-INF)
> if you want to ignore the error for now and generate your bundle use:
>
> <_failok>true</_failok>
>
> in your bnd instructions as a workaround, and open a new JIRA issue :)
>
>
>> Cheers,
>>
>> David
>>
>> 2009/3/25 Stuart McCulloch <mc...@gmail.com>:
>>> 2009/3/25 David Bosschaert <da...@gmail.com>
>>>
>>>> Hi all,
>>>>
>>>> For the CXF-DOSGi single-bundle distribution I need to export-
>>>> package
>>>> a directory that just contains resources. In my pom [1], the
>>>> directory
>>>> with the resources is copied into my bundle from an embedded bundle
>>>> using the following directive first:
>>>> <Include-Resource>
>>>> @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/cxf/*
>>>> </Include-Resource>
>>>> Then I just want to export the package using the following:
>>>> <Export-Package>
>>>> META-INF.cxf
>>>> </Export-Package>
>>>> Note, my pom also contains some _exportcontents directives...
>>>>
>>>> However, I'm getting the following error:
>>>> [ERROR] Error building bundle
>>>>
>>>>
>> org.apache.cxf.dosgi:cxf-dosgi-ri-singlebundle-distribution:bundle:
>> 1.0-SNAPSHOT
>>>> : Exporting packages that are not on the Bundle-Classpath[Jar:dot,
>>>> Jar:lib/geronimo-annotation_1.0_spec-1.1.1.jar, ... lots more
>>>> jars...]: [META-INF.cxf]
>>>>
>>>> Anyone an idea on how I can get META-INF.cxf in my exported package
>> list?
>>>>
>>>
>>> Hi David,
>>>
>>> which version of the bundleplugin are you using?
>>>
>>> also why not put the META-INF.cxf package in the _exportcontents
>>> section,
>>> because
>>> you're already copying it into the bundle using the Include-Resource
>>> instruction?
>>>
>>> Thanks!
>>>>
>>>> David
>>>>
>>>> [1]
>>>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/distribution/single-bundle/pom.xml
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>
>>> --
>>> Cheers, Stuart
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> Cheers, Stuart
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: [maven-bundle-plugin] how do I export-package a resource
directory?
Posted by David Bosschaert <da...@gmail.com>.
That makes sense, Richard. In my situation what is served out of this
location is some XML schemas that are used during XML file processing.
So what I could do is create an extender that registers an OSGi
service, which can serve schemas. I could then register an XML schema
handler (like an entity handler) that knows about this OSGi service
and hooks in with the XML processing that way...
I'll add it to the list :)
Thanks!
David
2009/3/26 Richard S. Hall <he...@ungoverned.org>:
> It seems like this sort of situation usually calls for something like the
> extender pattern.
>
> -> richard
>
> On 3/26/09 7:26 AM, David Bosschaert wrote:
>>
>> I understand that its better to avoid META-INF altogether, but in my
>> case I have to deal with code that's already there. This code is used
>> both in the OSGi context as well as outside of OSGi.
>> Besides, it's not so bad, because the directory that I need to export
>> is META-INF/cxf, so there isn't really anyone else exporting it...
>>
>> Is there any other way to export a directory containing resources
>> besides Export-Package? The resource is looked up in the code via the
>> ClassLoader.getResourceAsStream() API...
>>
>> David
>>
>> 2009/3/25 Peter Kriens<pe...@aqute.biz>:
>>
>>>
>>> The spec does not allow exports of META-INF because it is not a valid
>>> package name ...
>>>
>>> Kind regards,
>>>
>>> Peter Kriens
>>>
>>> On 25 mrt 2009, at 11:19, Stuart McCulloch wrote:
>>>
>>>
>>>>
>>>> 2009/3/25 David Bosschaert<da...@gmail.com>
>>>>
>>>>
>>>>>
>>>>> Thanks for the quick response, Stuart.
>>>>>
>>>>> Unfortunately, moving it to the _exportcontents sections gives me the
>>>>> same error.
>>>>> I'm currently on version 2.0.0, but I also tried this with 1.4.3...
>>>>>
>>>>>
>>>>
>>>> looks like a bnd issue (I know Peter discourages export of META-INF)
>>>> if you want to ignore the error for now and generate your bundle use:
>>>>
>>>> <_failok>true</_failok>
>>>>
>>>> in your bnd instructions as a workaround, and open a new JIRA issue :)
>>>>
>>>>
>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> David
>>>>>
>>>>> 2009/3/25 Stuart McCulloch<mc...@gmail.com>:
>>>>>
>>>>>>
>>>>>> 2009/3/25 David Bosschaert<da...@gmail.com>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> For the CXF-DOSGi single-bundle distribution I need to export-package
>>>>>>> a directory that just contains resources. In my pom [1], the
>>>>>>> directory
>>>>>>> with the resources is copied into my bundle from an embedded bundle
>>>>>>> using the following directive first:
>>>>>>> <Include-Resource>
>>>>>>> @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/cxf/*
>>>>>>> </Include-Resource>
>>>>>>> Then I just want to export the package using the following:
>>>>>>> <Export-Package>
>>>>>>> META-INF.cxf
>>>>>>> </Export-Package>
>>>>>>> Note, my pom also contains some _exportcontents directives...
>>>>>>>
>>>>>>> However, I'm getting the following error:
>>>>>>> [ERROR] Error building bundle
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> org.apache.cxf.dosgi:cxf-dosgi-ri-singlebundle-distribution:bundle:1.0-SNAPSHOT
>>>>>
>>>>>>>
>>>>>>> : Exporting packages that are not on the Bundle-Classpath[Jar:dot,
>>>>>>> Jar:lib/geronimo-annotation_1.0_spec-1.1.1.jar, ... lots more
>>>>>>> jars...]: [META-INF.cxf]
>>>>>>>
>>>>>>> Anyone an idea on how I can get META-INF.cxf in my exported package
>>>>>>>
>>>>>
>>>>> list?
>>>>>
>>>>>>
>>>>>> Hi David,
>>>>>>
>>>>>> which version of the bundleplugin are you using?
>>>>>>
>>>>>> also why not put the META-INF.cxf package in the _exportcontents
>>>>>> section,
>>>>>> because
>>>>>> you're already copying it into the bundle using the Include-Resource
>>>>>> instruction?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> [1]
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/distribution/single-bundle/pom.xml
>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cheers, Stuart
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Cheers, Stuart
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: [maven-bundle-plugin] how do I export-package a resource directory?
Posted by "Richard S. Hall" <he...@ungoverned.org>.
It seems like this sort of situation usually calls for something like
the extender pattern.
-> richard
On 3/26/09 7:26 AM, David Bosschaert wrote:
> I understand that its better to avoid META-INF altogether, but in my
> case I have to deal with code that's already there. This code is used
> both in the OSGi context as well as outside of OSGi.
> Besides, it's not so bad, because the directory that I need to export
> is META-INF/cxf, so there isn't really anyone else exporting it...
>
> Is there any other way to export a directory containing resources
> besides Export-Package? The resource is looked up in the code via the
> ClassLoader.getResourceAsStream() API...
>
> David
>
> 2009/3/25 Peter Kriens<pe...@aqute.biz>:
>
>> The spec does not allow exports of META-INF because it is not a valid
>> package name ...
>>
>> Kind regards,
>>
>> Peter Kriens
>>
>> On 25 mrt 2009, at 11:19, Stuart McCulloch wrote:
>>
>>
>>> 2009/3/25 David Bosschaert<da...@gmail.com>
>>>
>>>
>>>> Thanks for the quick response, Stuart.
>>>>
>>>> Unfortunately, moving it to the _exportcontents sections gives me the
>>>> same error.
>>>> I'm currently on version 2.0.0, but I also tried this with 1.4.3...
>>>>
>>>>
>>> looks like a bnd issue (I know Peter discourages export of META-INF)
>>> if you want to ignore the error for now and generate your bundle use:
>>>
>>> <_failok>true</_failok>
>>>
>>> in your bnd instructions as a workaround, and open a new JIRA issue :)
>>>
>>>
>>>
>>>> Cheers,
>>>>
>>>> David
>>>>
>>>> 2009/3/25 Stuart McCulloch<mc...@gmail.com>:
>>>>
>>>>> 2009/3/25 David Bosschaert<da...@gmail.com>
>>>>>
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> For the CXF-DOSGi single-bundle distribution I need to export-package
>>>>>> a directory that just contains resources. In my pom [1], the directory
>>>>>> with the resources is copied into my bundle from an embedded bundle
>>>>>> using the following directive first:
>>>>>> <Include-Resource>
>>>>>> @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/cxf/*
>>>>>> </Include-Resource>
>>>>>> Then I just want to export the package using the following:
>>>>>> <Export-Package>
>>>>>> META-INF.cxf
>>>>>> </Export-Package>
>>>>>> Note, my pom also contains some _exportcontents directives...
>>>>>>
>>>>>> However, I'm getting the following error:
>>>>>> [ERROR] Error building bundle
>>>>>>
>>>>>>
>>>>>>
>>>> org.apache.cxf.dosgi:cxf-dosgi-ri-singlebundle-distribution:bundle:1.0-SNAPSHOT
>>>>
>>>>>> : Exporting packages that are not on the Bundle-Classpath[Jar:dot,
>>>>>> Jar:lib/geronimo-annotation_1.0_spec-1.1.1.jar, ... lots more
>>>>>> jars...]: [META-INF.cxf]
>>>>>>
>>>>>> Anyone an idea on how I can get META-INF.cxf in my exported package
>>>>>>
>>>> list?
>>>>
>>>>> Hi David,
>>>>>
>>>>> which version of the bundleplugin are you using?
>>>>>
>>>>> also why not put the META-INF.cxf package in the _exportcontents
>>>>> section,
>>>>> because
>>>>> you're already copying it into the bundle using the Include-Resource
>>>>> instruction?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>> David
>>>>>>
>>>>>> [1]
>>>>>>
>>>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/distribution/single-bundle/pom.xml
>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>> --
>>>>> Cheers, Stuart
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>>> --
>>> Cheers, Stuart
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: [maven-bundle-plugin] how do I export-package a resource
directory?
Posted by David Bosschaert <da...@gmail.com>.
I understand that its better to avoid META-INF altogether, but in my
case I have to deal with code that's already there. This code is used
both in the OSGi context as well as outside of OSGi.
Besides, it's not so bad, because the directory that I need to export
is META-INF/cxf, so there isn't really anyone else exporting it...
Is there any other way to export a directory containing resources
besides Export-Package? The resource is looked up in the code via the
ClassLoader.getResourceAsStream() API...
David
2009/3/25 Peter Kriens <pe...@aqute.biz>:
> The spec does not allow exports of META-INF because it is not a valid
> package name ...
>
> Kind regards,
>
> Peter Kriens
>
> On 25 mrt 2009, at 11:19, Stuart McCulloch wrote:
>
>> 2009/3/25 David Bosschaert <da...@gmail.com>
>>
>>> Thanks for the quick response, Stuart.
>>>
>>> Unfortunately, moving it to the _exportcontents sections gives me the
>>> same error.
>>> I'm currently on version 2.0.0, but I also tried this with 1.4.3...
>>>
>>
>> looks like a bnd issue (I know Peter discourages export of META-INF)
>> if you want to ignore the error for now and generate your bundle use:
>>
>> <_failok>true</_failok>
>>
>> in your bnd instructions as a workaround, and open a new JIRA issue :)
>>
>>
>>> Cheers,
>>>
>>> David
>>>
>>> 2009/3/25 Stuart McCulloch <mc...@gmail.com>:
>>>>
>>>> 2009/3/25 David Bosschaert <da...@gmail.com>
>>>>
>>>>> Hi all,
>>>>>
>>>>> For the CXF-DOSGi single-bundle distribution I need to export-package
>>>>> a directory that just contains resources. In my pom [1], the directory
>>>>> with the resources is copied into my bundle from an embedded bundle
>>>>> using the following directive first:
>>>>> <Include-Resource>
>>>>> @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/cxf/*
>>>>> </Include-Resource>
>>>>> Then I just want to export the package using the following:
>>>>> <Export-Package>
>>>>> META-INF.cxf
>>>>> </Export-Package>
>>>>> Note, my pom also contains some _exportcontents directives...
>>>>>
>>>>> However, I'm getting the following error:
>>>>> [ERROR] Error building bundle
>>>>>
>>>>>
>>>
>>> org.apache.cxf.dosgi:cxf-dosgi-ri-singlebundle-distribution:bundle:1.0-SNAPSHOT
>>>>>
>>>>> : Exporting packages that are not on the Bundle-Classpath[Jar:dot,
>>>>> Jar:lib/geronimo-annotation_1.0_spec-1.1.1.jar, ... lots more
>>>>> jars...]: [META-INF.cxf]
>>>>>
>>>>> Anyone an idea on how I can get META-INF.cxf in my exported package
>>>
>>> list?
>>>>>
>>>>
>>>> Hi David,
>>>>
>>>> which version of the bundleplugin are you using?
>>>>
>>>> also why not put the META-INF.cxf package in the _exportcontents
>>>> section,
>>>> because
>>>> you're already copying it into the bundle using the Include-Resource
>>>> instruction?
>>>>
>>>> Thanks!
>>>>>
>>>>> David
>>>>>
>>>>> [1]
>>>>>
>>>
>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/distribution/single-bundle/pom.xml
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>
>>>> --
>>>> Cheers, Stuart
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>> --
>> Cheers, Stuart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org