You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Guillaume Nodet <gn...@gmail.com> on 2007/10/19 17:19:27 UTC

Re: OSGifying org.apache.geronimo.specs

So the question is wether these classes are meant to be seen by other
jars or if they are only used by the javax.mail package.  If they are
to be exported, then it should be

   <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</geronimo.osgi.export.pkg>

but if they should be of private use, we need to add the following property

   <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</geronimo.osgi.private.pkg>

I'm leaning toward the second option

On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
> Guillaume,
>
> I'm working on a project that requires the latest javamail specs, and
> I've discovered that the OSGI changes have caused the org.apache.*
> classes to be ommitted from the jar file, which essentially renders this
> package inoperable.  I was able to get those classes included by
> changing the <geronimo.osgi.export.pkg> definition to "*".  Is that the
> correct fix, or is something else more appropriate?
>
> Rick
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: OSGifying org.apache.geronimo.specs

Posted by Guillaume Nodet <gn...@gmail.com>.
The bundle plugin may also put classes from dependencies inside the
bundle.  If you put everything private, it will include all the
classes from the first level dependencies iirc.

On 10/19/07, Alan D. Cabrera <li...@toolazydogs.com> wrote:
> Why not just have this in the root pom
>
>              <geronimo.osgi.import.pkg>*</geronimo.osgi.import.pkg>
>              <geronimo.osgi.export.pkg>javax.*</
> geronimo.osgi.export.pkg>
>              <geronimo.osgi.private.pkg>*</geronimo.osgi.private.pkg>
>
> Then the modules' pom would be more simple because we could remove
> both <geronimo.osgi.export.pkg/> and < geronimo.osgi.private.pkg/>.
>
> Also, IIRC, you don't need to explicitly set the bundle's name and
> symbolic name since the default works quite nicely.
>
> Regards,
> Alan
>
> On Oct 19, 2007, at 8:19 AM, Guillaume Nodet wrote:
>
> > So the question is wether these classes are meant to be seen by other
> > jars or if they are only used by the javax.mail package.  If they are
> > to be exported, then it should be
> >
> >    <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</
> > geronimo.osgi.export.pkg>
> >
> > but if they should be of private use, we need to add the following
> > property
> >
> >    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</
> > geronimo.osgi.private.pkg>
> >
> > I'm leaning toward the second option
> >
> > On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
> >> Guillaume,
> >>
> >> I'm working on a project that requires the latest javamail specs, and
> >> I've discovered that the OSGI changes have caused the org.apache.*
> >> classes to be ommitted from the jar file, which essentially
> >> renders this
> >> package inoperable.  I was able to get those classes included by
> >> changing the <geronimo.osgi.export.pkg> definition to "*".  Is
> >> that the
> >> correct fix, or is something else more appropriate?
> >>
> >> Rick
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: OSGifying org.apache.geronimo.specs

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Why not just have this in the root pom

             <geronimo.osgi.import.pkg>*</geronimo.osgi.import.pkg>
             <geronimo.osgi.export.pkg>javax.*</ 
geronimo.osgi.export.pkg>
             <geronimo.osgi.private.pkg>*</geronimo.osgi.private.pkg>

Then the modules' pom would be more simple because we could remove  
both <geronimo.osgi.export.pkg/> and < geronimo.osgi.private.pkg/>.

Also, IIRC, you don't need to explicitly set the bundle's name and  
symbolic name since the default works quite nicely.

Regards,
Alan

On Oct 19, 2007, at 8:19 AM, Guillaume Nodet wrote:

> So the question is wether these classes are meant to be seen by other
> jars or if they are only used by the javax.mail package.  If they are
> to be exported, then it should be
>
>    <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</ 
> geronimo.osgi.export.pkg>
>
> but if they should be of private use, we need to add the following  
> property
>
>    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</ 
> geronimo.osgi.private.pkg>
>
> I'm leaning toward the second option
>
> On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
>> Guillaume,
>>
>> I'm working on a project that requires the latest javamail specs, and
>> I've discovered that the OSGI changes have caused the org.apache.*
>> classes to be ommitted from the jar file, which essentially  
>> renders this
>> package inoperable.  I was able to get those classes included by
>> changing the <geronimo.osgi.export.pkg> definition to "*".  Is  
>> that the
>> correct fix, or is something else more appropriate?
>>
>> Rick
>>
>
>
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>


Re: OSGifying org.apache.geronimo.specs

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
Good point.  In this case would we just export  
org.apache.geronimo.mail.handlers.* in addition to javax.*?


Regards,
Alan

On Oct 19, 2007, at 5:03 PM, Dain Sundstrom wrote:

> I'm not sure that would work for javamail.  Javamail has a strange  
> discovery system where implementation of protocols, such as smtp,  
> are loaded directly from the application class loader.  I believe  
> that if you hide the geronimo protocol implementations, javamail  
> won't work.
>
> -dain
>
> On Oct 19, 2007, at 8:19 AM, Guillaume Nodet wrote:
>
>> So the question is wether these classes are meant to be seen by other
>> jars or if they are only used by the javax.mail package.  If they are
>> to be exported, then it should be
>>
>>     
>> <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</ 
>> geronimo.osgi.export.pkg>
>>
>> but if they should be of private use, we need to add the following  
>> property
>>
>>    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</ 
>> geronimo.osgi.private.pkg>
>>
>> I'm leaning toward the second option
>>
>> On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
>>> Guillaume,
>>>
>>> I'm working on a project that requires the latest javamail specs,  
>>> and
>>> I've discovered that the OSGI changes have caused the org.apache.*
>>> classes to be ommitted from the jar file, which essentially  
>>> renders this
>>> package inoperable.  I was able to get those classes included by
>>> changing the <geronimo.osgi.export.pkg> definition to "*".  Is  
>>> that the
>>> correct fix, or is something else more appropriate?
>>>
>>> Rick
>>>
>>
>>
>> -- 
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>
>


Re: OSGifying org.apache.geronimo.specs

Posted by Guillaume Nodet <gn...@gmail.com>.
I need to check, but my assumtion was that these classes from the
javamail bundle and not from other bundles.  I will try next week and
fix the problem if any.

On 10/20/07, Dain Sundstrom <da...@iq80.com> wrote:
> I'm not sure that would work for javamail.  Javamail has a strange
> discovery system where implementation of protocols, such as smtp, are
> loaded directly from the application class loader.  I believe that if
> you hide the geronimo protocol implementations, javamail won't work.
>
> -dain
>
> On Oct 19, 2007, at 8:19 AM, Guillaume Nodet wrote:
>
> > So the question is wether these classes are meant to be seen by other
> > jars or if they are only used by the javax.mail package.  If they are
> > to be exported, then it should be
> >
> >    <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</
> > geronimo.osgi.export.pkg>
> >
> > but if they should be of private use, we need to add the following
> > property
> >
> >    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</
> > geronimo.osgi.private.pkg>
> >
> > I'm leaning toward the second option
> >
> > On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
> >> Guillaume,
> >>
> >> I'm working on a project that requires the latest javamail specs, and
> >> I've discovered that the OSGI changes have caused the org.apache.*
> >> classes to be ommitted from the jar file, which essentially
> >> renders this
> >> package inoperable.  I was able to get those classes included by
> >> changing the <geronimo.osgi.export.pkg> definition to "*".  Is
> >> that the
> >> correct fix, or is something else more appropriate?
> >>
> >> Rick
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: OSGifying org.apache.geronimo.specs

Posted by Dain Sundstrom <da...@iq80.com>.
I'm not sure that would work for javamail.  Javamail has a strange  
discovery system where implementation of protocols, such as smtp, are  
loaded directly from the application class loader.  I believe that if  
you hide the geronimo protocol implementations, javamail won't work.

-dain

On Oct 19, 2007, at 8:19 AM, Guillaume Nodet wrote:

> So the question is wether these classes are meant to be seen by other
> jars or if they are only used by the javax.mail package.  If they are
> to be exported, then it should be
>
>    <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</ 
> geronimo.osgi.export.pkg>
>
> but if they should be of private use, we need to add the following  
> property
>
>    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</ 
> geronimo.osgi.private.pkg>
>
> I'm leaning toward the second option
>
> On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
>> Guillaume,
>>
>> I'm working on a project that requires the latest javamail specs, and
>> I've discovered that the OSGI changes have caused the org.apache.*
>> classes to be ommitted from the jar file, which essentially  
>> renders this
>> package inoperable.  I was able to get those classes included by
>> changing the <geronimo.osgi.export.pkg> definition to "*".  Is  
>> that the
>> correct fix, or is something else more appropriate?
>>
>> Rick
>>
>
>
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/


Re: OSGifying org.apache.geronimo.specs

Posted by Guillaume Nodet <gn...@gmail.com>.
The second option would still include the classes inside the jar.  The
only difference is that these classes would be hidden when inside an
OSGi environment, while the javax.* classes would be visible.  In a
non-OSGi env, everything would be visible.
I've just committed a fix and the classes are now back in the jar.
I'd have to test it in an OSGi env...

On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
> They are used by the provider jar also, so it would need to be the first
> option, I believe.  This is how I ran into the problem originally.
>
> Rick
>
> Guillaume Nodet wrote:
> > So the question is wether these classes are meant to be seen by other
> > jars or if they are only used by the javax.mail package.  If they are
> > to be exported, then it should be
> >
> >    <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</geronimo.osgi.export.pkg>
> >
> > but if they should be of private use, we need to add the following property
> >
> >    <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</geronimo.osgi.private.pkg>
> >
> > I'm leaning toward the second option
> >
> > On 10/19/07, Rick McGuire <ri...@gmail.com> wrote:
> >
> >> Guillaume,
> >>
> >> I'm working on a project that requires the latest javamail specs, and
> >> I've discovered that the OSGI changes have caused the org.apache.*
> >> classes to be ommitted from the jar file, which essentially renders this
> >> package inoperable.  I was able to get those classes included by
> >> changing the <geronimo.osgi.export.pkg> definition to "*".  Is that the
> >> correct fix, or is something else more appropriate?
> >>
> >> Rick
> >>
> >>
> >
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/