Jean-Sebastien Delfino wrote:
Raymond Feng wrote:
Hi,
The problem is for other projects under the tools folder, for example,
maven-ant-generator depends on maven-compiler-plugin which in turn
depends on tuscany-eclipse-compiler. So it fails when you do a
top-down build unless you have ever built the tuscany-eclipse-compiler
alone.
Thanks,
Raymond
It's a more general issue with Maven, which in a multi-module project
Maven doesn't build a plugin module before the modules that depend on
it, and that's why Luciano's fix attempt didn't work.
We'd see the same problem with our maven-wsdl2java plugin if it was not
already published in a Maven repository.
I can see two solutions to this:
(a) publish a snapshot of the plugin
(b) add a 'setup' profile to the top pom to build it and run that
profile first
So, that plugin should eventually consider OSGi imports/exports at build
time.
I see two ways to do it:
- Make JavaCompiler use an OSGi ClassLoader instead of a URLClassLoader;
- Make ClassLoaderNameEnvironment honor the OSGi imports/exports.
The solution needs to be light and fast to not burden the build.
Any thoughts about a simpler way to implement this?
--
Jean-Sebastien