Stuart McCulloch wrote:
On 11/09/2008, Brad Cox, Ph.D. <[EMAIL PROTECTED]> wrote:
Here's one of the key poms.
I noticed something else in this pom that would cause issues
with Eclipse/PDE - the dependencies are embedded inside a
"target/dependency" directory inside the bundle.
when the bundle is unpacked (<unpackBundle> is enabled)
under target/classes, this directory will actually end up as:
<project>/target/classes/target/dependency
however, Eclipse/PDE expects to see them in this location
<project>/target/dependency
Didn't follow you here. Are you describing a mistake I made in
<Embed-Directory>target/dependency</Embed-Directory>, or a
bug/incompatibility in the various plugins?
By Eclipse/PDE, do you mean one of the various "Java Builder" options?
Never really understood those but in flailing about I dragged "Maven
Incremental Builder" to the top and left it there lately. There's also a
"Maven Project Builder" in there too (bottom), a "Java Builder", a
"Plugin Manifiest Builder" and an "Extension Point Schema Builder", in
slots 2-4. All checked currently.
ie. relative to the project - also, because Eclipse can clean
the classes directory itself (when doing a rebuild) you might
find these dependencies go missing - which would explain
why you have issues building in Eclipse but not in Maven
I've been using mvn dependency:copy-dependencies to copy stuff to
dependencies after cleans, but don't necessarily use them. That just
gave me other options to try when nothing else would work.
FWIW I have a modified version of the maven-eclipse-plugin
that properly handles embedded dependencies by munging
the classpath in the Eclipse/PDE manifest - so the jars will
be found, and won't be accidentally removed by Eclipse
just try using:
mvn org.ops4j:maven-pax-plugin:eclipse
it will create .project, .classpath and MANIFEST.MF files
this plugin is part of the Pax-Construct tools that attempt
to remove some of the pain in creating OSGi projects that
work in both Maven and Eclipse
another approach is to use the maven-dependency-plugin
to copy dependencies to the correct path expected by the
PDE tooling...
The path its expecting is target/dependencies, right? So
<Embed-Directory>target/dependency</Embed-Directory> and mvn
dependency:copy-dependencies should suffice to use maven+eclipse, once I
fix the other problems? Hope so.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]