Lars,

I think the problem is that you're trying to let both PDE and M2E manage project dependencies inside IDE simultaneously. This certainly does not work right now and I am not sure m2e will ever support this scenario.

There are, however, two setups that do work.

First, you can use PDE for all your IDE work (i.e. projects do not have maven nature and maven dependencies classpath container) and use Tycho to build these projects from command line "the maven way". This is how we develop m2e and I think it is a good approach if you develop eclipse plugins. Test code will have to move to separate projects, however.

Then you can Maven both in IDE and on command line and only use PDE to launch OSGi runtime from IDE. I had one test project set up this way and it seemed to work. I think this is very close to your current project configuration, only you need to remove pde classpath container from .classpath (.project files have to have pde nature!). I was using Tycho to generate bundle manifest (for obvious reasons ;-) ) but I don't see why this would not work with felix/bnd plugin.

Hope this helps.

--
Regards,
Igor

Lars Fischer wrote:
Hello,

how are others using m2eclipse and PDE projects?
regards
Lars

On Thu, 30 Oct 2008 10:41:21 +0100, "Lars Fischer"
<[EMAIL PROTECTED]> said:
Hello,

I work with projects that have the following settings:
- maven based build, eclipse used as ide with latest m2eclipse
- Projects use Maven for junit tests in the src/test/... folder. In a
  parent.pom junit is defined as dependency with scope "test".
- Projects are OSGi-bundles / eclipse plugins. Inside Eclipse, these
  projects are configured with PDE-enabled.
- Eclipse workspace uses an own target-platform with all needed runtime
  bundles. The target-platform is build by "maven-eclipse- plugin"
  using goal "install-plugins". There is no "junit bundle" in the
  target platform.

Sometimes I have trouble with this combination.

1.)  Eclipse sometimes ignores the maven settings. In this case the
test-
  packages contain some errors because junit-classes are not available
  for eclipse. The project settings "java Build Path" -> Libraries have
  no entry "maven dependencies". Looking at the .classpath file, I see
  this entry: <classpathentry kind="con"
  path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> After
  refreshing and cleaning the project, restarting eclipse solves this
  errors, but I would like to avoid that.

2. With PDE and m2eclipse "workspace resolution" enabled I get this
   error: "Build path contains duplicate entry: <a project
   dependency>". So I have to disable the worspace resolution. Is it
   possible that m2eclipse determines that a project already is added to
   the build path?


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to