[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [pde-build-dev] PDE.build & maven classpath computation
|
FYI, I have incorporated the MavenGenerator into the maven-pde-plugin, but I needed to make a few tweaks to the code. I also need to cleanup my code so I don't embarrass myself and set the permissions on a new svn repo and then you all can check it out. Assuming no one bothers me in the next couple of time units then I can get this out.
Wb
On 7/5/06, Andrew Niefer <aniefer@xxxxxxxxxx> wrote:
Tom,
For the compiler, in pde.build we use
the batch compiler via the JDTCompilerAdapter (which extends Ant's DefaultCompilerAdapter)
which calls Main.compile. The JDTCompilerAdapter also handles us
providing access rules to the compiler. Unfortunately I don't know
anything about setting up the compiler using a class loader.
MavenGenerator does currently find all
the jars under the given directory. While testing, I pointed it to
a subdir of the repo (/org/eclipse). MavenGenerator is just an example
and we will want a better way to come up with the list of jars to consider
in the state. I'm not sure that getting them from maven's list of
dependencies is the answer since this implies recording dependencies in
the pom while we are trying to base them on the manifest.
-Andrew
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
>
>
>
>
_______________________________________________
pde-build-dev mailing list
pde-build-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-build-dev
_______________________________________________
pde-build-dev mailing list
pde-build-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-build-dev