On 07/02/2008, Marshall Schor <[EMAIL PROTECTED]> wrote:
>
> Hi Stuart -
>
> Thanks!
>
> In the meanwhile I found some posts that seem to say that when you have
> a "library plugin", the things that depend on this should instead have
> their dependencies listed as depending on the parts of the library that
> were being embedded.
>
> I changed my dependencies in the POM to do this, and removed the
> dependency on the library plugin, and then the Eclipse things seemed to
> work OK (without needing the exported="true" flags, of course).
>
> Do you think this is a good approach?
That's certainly a reasonable approach, because in OSGi you
don't really mind who's supplying a package when you deploy.
So if it's easier to use 'raw' dependencies during development
then that's fine.
I think the issue that you saw wrt. exported classpath entries
happens when you embed dependencies inside a plug-in and
want to provide those packages to other plug-ins...
the PDE tooling doesn't seem to support this properly, which
is why those extra exported flags are then needed (it should
just need the Bundle-ClassPath and Export-Package entries
to know what to export on the plug-in project classpath)
So using the raw dependencies can make life much simpler :)
I had earlier taken a look at pax - I see it is at the 0.6.4 release
> level - is that "stable" enough for other projects to rely on?
We have several people using it for day-to-day development
and I personally think it's stable (hope to do a RC very soon)
But the easiest thing is to just try it out and see if it fits the
way you develop - it generates standard maven2 projects
and the pax-plugin isn't actually essential during the actual
build (it's more of a convenience)
in fact by removing the pax-plugin from the main pom.xml
and moving the <extensions>true</extensions> flag to the
bundleplugin entry in "poms/pom.xml" you have a working
project with no dependencies on the pax tools at all*
(* of course this also means you miss out on all the
cool deployment & project management support ;)
The mailing list for the pax tools is [EMAIL PROTECTED]
HTH
Thanks. -Marshall
>
> Stuart McCulloch wrote:
> > On 05/02/2008, Marshall Schor <[EMAIL PROTECTED]> wrote:
> >
> >> I read http://felix.apache.org/site/maven-bundle-plugin-bnd.html and
> >> used the information there to get a "library plugin" to build, that
> >> holds jars from other projects, as an Eclipse plug-in.
> >>
> >> I followed the suggestions in the section of the above documentation
> >> titled Eclipse/PDE Integration. Everything seemed to work OK, but
> other
> >> plugins which depended on this library plugin couldn't see the classes,
> >> when the plug-in project was "open". I finally discovered that the
> >> eclipse:eclipse run I did on this project had set up links to the
> >> referenced jars, (because I didn't run eclipse:eclipse from a super
> >> POM), and then put in classpath entries for those links. The classpath
> >> entries in the .classpath file looked like:
> >>
> >> <classpathentry kind="lib"
> >>
> >> path="target/dependency/uimaj-examples-2.3.0-incubating-SNAPSHOT.jar"/>
> >>
> >> To get this to work, I had to change these to
> >>
> >> <classpathentry exported="true" kind="lib"
> >>
> >> path="target/dependency/uimaj-examples-2.3.0-incubating-SNAPSHOT.jar"/>
> >>
> >> which I could do in the editor, or by going to the project properties,
> >> picking Java Build Path, and picking the right-most tab - order and
> >> export, and checking the "export" box.
> >>
> >> Is this lack of setting the exported="true" flag in this case a bug in
> >> eclipse:eclipse, or am I approaching this in the wrong way?
> >>
> >
> >
> > Hi Marshall,
> >
> > yes, this is more of an issue with the maven-eclipse-plugin rather than
> > the maven-bundle-plugin, so you should really ask this question over
> > on the maven mailing list
> >
> > btw, I do have a modified version of the eclipse mojo that does do this
> > additional export, it's part of the maven-pax-plugin from Pax-Construct:
> >
> > http://www.ops4j.org/projects/pax/construct
> > ( quickstart, general documentation )
> >
> >
> http://www.ops4j.org/projects/pax/construct/maven-pax-plugin/index.html
> > ( usual maven plugin documentation )
> >
> > it also tries to avoid using project links, etc. to make things more
> > portable
> >
> > HTH
> >
> > I did scan the eclipse:eclipse (maven-eclipse-plugin) source to see if I
> >
> >> could see where they might deal with exported="true", but didn't get
> any
> >> hits.
> >>
> >> Thanks for any insights.
> >>
> >> -Marshall Schor (Committer on the UIMA incubator project, trying to get
> >> our Eclipse plugin builds to be more maven - standardized)
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Cheers, Stuart