You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Alex Karasulu <ak...@apache.org> on 2010/12/03 00:16:28 UTC

[BUILD] Dealing with "provided" scope dependencies when generating eclipse descriptors with Maven

Hi,

I just built the trunk, generated eclipse descriptors and imported the
projects into eclipse only to notice that the "provided" scope dependencies
(felix gogo, jansi, and jline stuff from fusesource.org) were not included
in the class path for eclipse projects.

I guess this is a necessary evil when dealing with provided framework
dependencies in various environments. I just have a couple questions
regarding this:

(1) Do we consider jansi and jline jars as "provided" because we're
considering karaf as the environment? Trying to figure out why these were
marked as provided in some modules.

(2) Any idea why the OSGi core dependency is of "provided" scope yet it is
being included in the eclipse descriptors generated by Maven but these jline
and jansi deps are not?

(3)  What do other eclipse users on the dev team do to handle these missing
dependencies in the generated eclipse descriptors?

Regards,
-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
To set up a meeting with me: http://tungle.me/AlexKarasulu

Re: [BUILD] Dealing with "provided" scope dependencies when generating eclipse descriptors with Maven

Posted by Achim Nierbeck <bc...@googlemail.com>.
(3) I'm using the m2eclipse plugin for all the maven dependencies.
This basically handles all the issues you have. And another advantage you
can
build it as maven build integrated into eclipse. BTW, I think m2eclipse
is integrated into STS :)

2010/12/3 Ioannis Canellos <io...@gmail.com>

> (3) I am mostly everything but eclipse user (netbeans,intellij). However, I
> think that I managed to import karaf trunk to eclipse when sts 2.5 was
> released with no problems.
>
>
> On Fri, Dec 3, 2010 at 1:25 AM, Guillaume Nodet <gn...@gmail.com> wrote:
>
> > On Thu, Dec 2, 2010 at 15:16, Alex Karasulu <ak...@apache.org>
> wrote:
> > > Hi,
> > >
> > > I just built the trunk, generated eclipse descriptors and imported the
> > > projects into eclipse only to notice that the "provided" scope
> > dependencies
> > > (felix gogo, jansi, and jline stuff from fusesource.org) were not
> > included
> > > in the class path for eclipse projects.
> > >
> > > I guess this is a necessary evil when dealing with provided framework
> > > dependencies in various environments. I just have a couple questions
> > > regarding this:
> > >
> > > (1) Do we consider jansi and jline jars as "provided" because we're
> > > considering karaf as the environment? Trying to figure out why these
> were
> > > marked as provided in some modules.
> >
> > No, I think they are marked as provided because they are actually
> > embedded in the shell/console bundle.
> > I also sometime have problems in the ide which does not really use the
> > created bundle, so i think one way around that might be to have maven
> > extract the content of those jars in the target/classes, so that the
> > ide can actually pick it up.
> >
> > I think I've already done such thing in some project ....
> >
> > > (2) Any idea why the OSGi core dependency is of "provided" scope yet it
> > is
> > > being included in the eclipse descriptors generated by Maven but these
> > jline
> > > and jansi deps are not?
> >
> > The osgi-core dependency is marked as provided because it will
> > actually be provided by the framework in all cases.
> > Not sure really why is it treated differently though, maybe because
> > the dependency is added on most of the modules directly ?
> >
> > >
> > > (3)  What do other eclipse users on the dev team do to handle these
> > missing
> > > dependencies in the generated eclipse descriptors?
> >
> > I'll let others answer.  I'm using intelij since a long time now, but
> > now that it's free, i don't feel compelled to switch back to Eclipse.
> >
> > >
> > > Regards,
> > > --
> > > Alex Karasulu
> > > My Blog :: http://www.jroller.com/akarasulu/
> > > Apache Directory Server :: http://directory.apache.org
> > > Apache MINA :: http://mina.apache.org
> > > To set up a meeting with me: http://tungle.me/AlexKarasulu
> > >
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >
>
>
>
> --
> *Ioannis Canellos*
> http://iocanel.blogspot.com
>
> Integration Engineer @ Upstream S.A. <http://www.upstreamsystems.com>
>

Re: [BUILD] Dealing with "provided" scope dependencies when generating eclipse descriptors with Maven

Posted by Ioannis Canellos <io...@gmail.com>.
(3) I am mostly everything but eclipse user (netbeans,intellij). However, I
think that I managed to import karaf trunk to eclipse when sts 2.5 was
released with no problems.


On Fri, Dec 3, 2010 at 1:25 AM, Guillaume Nodet <gn...@gmail.com> wrote:

> On Thu, Dec 2, 2010 at 15:16, Alex Karasulu <ak...@apache.org> wrote:
> > Hi,
> >
> > I just built the trunk, generated eclipse descriptors and imported the
> > projects into eclipse only to notice that the "provided" scope
> dependencies
> > (felix gogo, jansi, and jline stuff from fusesource.org) were not
> included
> > in the class path for eclipse projects.
> >
> > I guess this is a necessary evil when dealing with provided framework
> > dependencies in various environments. I just have a couple questions
> > regarding this:
> >
> > (1) Do we consider jansi and jline jars as "provided" because we're
> > considering karaf as the environment? Trying to figure out why these were
> > marked as provided in some modules.
>
> No, I think they are marked as provided because they are actually
> embedded in the shell/console bundle.
> I also sometime have problems in the ide which does not really use the
> created bundle, so i think one way around that might be to have maven
> extract the content of those jars in the target/classes, so that the
> ide can actually pick it up.
>
> I think I've already done such thing in some project ....
>
> > (2) Any idea why the OSGi core dependency is of "provided" scope yet it
> is
> > being included in the eclipse descriptors generated by Maven but these
> jline
> > and jansi deps are not?
>
> The osgi-core dependency is marked as provided because it will
> actually be provided by the framework in all cases.
> Not sure really why is it treated differently though, maybe because
> the dependency is added on most of the modules directly ?
>
> >
> > (3)  What do other eclipse users on the dev team do to handle these
> missing
> > dependencies in the generated eclipse descriptors?
>
> I'll let others answer.  I'm using intelij since a long time now, but
> now that it's free, i don't feel compelled to switch back to Eclipse.
>
> >
> > Regards,
> > --
> > Alex Karasulu
> > My Blog :: http://www.jroller.com/akarasulu/
> > Apache Directory Server :: http://directory.apache.org
> > Apache MINA :: http://mina.apache.org
> > To set up a meeting with me: http://tungle.me/AlexKarasulu
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
*Ioannis Canellos*
http://iocanel.blogspot.com

Integration Engineer @ Upstream S.A. <http://www.upstreamsystems.com>

Re: [BUILD] Dealing with "provided" scope dependencies when generating eclipse descriptors with Maven

Posted by Guillaume Nodet <gn...@gmail.com>.
On Thu, Dec 2, 2010 at 15:16, Alex Karasulu <ak...@apache.org> wrote:
> Hi,
>
> I just built the trunk, generated eclipse descriptors and imported the
> projects into eclipse only to notice that the "provided" scope dependencies
> (felix gogo, jansi, and jline stuff from fusesource.org) were not included
> in the class path for eclipse projects.
>
> I guess this is a necessary evil when dealing with provided framework
> dependencies in various environments. I just have a couple questions
> regarding this:
>
> (1) Do we consider jansi and jline jars as "provided" because we're
> considering karaf as the environment? Trying to figure out why these were
> marked as provided in some modules.

No, I think they are marked as provided because they are actually
embedded in the shell/console bundle.
I also sometime have problems in the ide which does not really use the
created bundle, so i think one way around that might be to have maven
extract the content of those jars in the target/classes, so that the
ide can actually pick it up.

I think I've already done such thing in some project ....

> (2) Any idea why the OSGi core dependency is of "provided" scope yet it is
> being included in the eclipse descriptors generated by Maven but these jline
> and jansi deps are not?

The osgi-core dependency is marked as provided because it will
actually be provided by the framework in all cases.
Not sure really why is it treated differently though, maybe because
the dependency is added on most of the modules directly ?

>
> (3)  What do other eclipse users on the dev team do to handle these missing
> dependencies in the generated eclipse descriptors?

I'll let others answer.  I'm using intelij since a long time now, but
now that it's free, i don't feel compelled to switch back to Eclipse.

>
> Regards,
> --
> Alex Karasulu
> My Blog :: http://www.jroller.com/akarasulu/
> Apache Directory Server :: http://directory.apache.org
> Apache MINA :: http://mina.apache.org
> To set up a meeting with me: http://tungle.me/AlexKarasulu
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com