2 Replies Latest reply: Oct 17, 2008 11:17 AM by Kabir Khan RSS

Mavenised build and Eclipse

Kabir Khan Master

The thirdparty folder has now been removed. This means Eclipse now picks up the thirdparty files from your local maven repository so you need to set up a M2_REPO classpath variable in Eclipse to point to that.

If you update versions of dependencies in the root pom.xml you need to run

mvn eclipse:eclipse

to regenerate the Eclipse .classpath files to point to those new versions. This uses the dependency information in the pom.xml's to generate the classpath settings. I have commited the ones resulting from my local run. If you refresh from subversion and you do not yet have the versions referenced in the .classpath files in your local repository, you need to run

mvn install

from the root of your aop checkout which will populate your local maven repository.

Another thing is that having your eclipse workspace in your aop checkout folder will no longer work, since the eclipse plugin uses different names for the projects than previously. There might be other ways around this, but the way I have got around this for this and other projects is to create the workspace in jboss-aop/eclipse and to have the subversion checkout in jboss-aop/subversion.

Some of the folders/files need to be excluded from the build for compilation errors of things that cannot be found. These are:

jboss-aop-aspects/src/test/org/jboss/test/asynch
jboss-aop/src/main/org/jboss/aop/hook/JRockitClassPreProcessor.java

The eclipse plugin does not exclude these. I have manually excluded these in the .classpath files. Paul, is there a way to have the eclipse plugin exclude these when generating the .classpath files?

  • 1. Re: Mavenised build and Eclipse
    Paul Gier Master

    I don't know of a way to exclude certain files using the command line plugin. Maybe you can try using m2eclipse instead of the command line plugin.

  • 2. Re: Mavenised build and Eclipse
    Kabir Khan Master

    Well it's not really a big deal excluding those files. But do you know if it is possible to make the eclipse plugin to make Eclipse output the classes somewhere else than target/classes? It is a bit annoying having them there since every time I do a "mvn clean", a full rebuild is needed in eclipse.

    I tried
    $mvn eclipse:eclipse -DbuildOutputDirectory=eclipse-output
    but that did not seem to have any effect