Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-build-dev] PDE.build & maven classpath computation

Thanks!

I started taking a look at the way the Eclipse compiler is currently
offered as an option in Maven. This is purely as a replacement of
Sun's javac. It is implemented as a Plexus component (Plexus is
Maven's component framework).

See: https://svn.codehaus.org/plexus/trunk/plexus-components/plexus-compiler/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java

While the Eclipse docs talk about calling the batch compiler by
invoking org.eclipse.jdt.internal.compiler.batch.Main.compile, the
Plexus wrapper sets up some kind of environment and calls the Compiler
class directly. The classes that make up the classpath are put into a
classloader and this classloader is passed to the compiler. Can
anybody tell me (or  point me at some info on) how to pass the correct
classpath configuration in this setting ?

Also, I browsed through your MavenGenerator. Do I understand correctly
that this will find all jars in the local repository for each compile
? Maven can provide you with a list of the relevant jars from its list
of dependencies.

Tom


On 6/29/06, Andrew Niefer <aniefer@xxxxxxxxxx> wrote:

Hi All,

Attached is a bundle we can use as a starting point for integrating
pde.build style classpath computation with maven.


ClasspathComputer3_0.java was extracted from pde.build and simplified for
this exercise.  In the future we may want to restore whatever parts of the
removed functionality make sense for maven.  The main focus of the
simplification of the assumption that we will only be building one thing at
a time in maven, that is all our dependencies will exist in the repository
as opposed to being built at the same time as us.  This class also generates
access rules that can be passed to the JDT compiler.
MavenState.java was based on the PDEState from pde.build.  It is a wrapper
to the osgi state.
MavenGenerator is a simple example entry point that adds jar to the state
and builds the classpath for a given bundle.

The next step would be to make this into a maven plugin that can interact
with the maven project..

This bundle depends on the org.eclipse.osgi bundle.  Find attached a pom.xml
that can be used to fetch and build org.eclipse.osgi.  (Although the pom.xml
is not 100% , the bundle's version in the manifest will need tweaking).

-Andrew


_______________________________________________
pde-build-dev mailing list
pde-build-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-build-dev






Back to the top