Announcement Announcement Module
No announcement yet.
How to reference Spring in Eclipse-PDE-Projects Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to reference Spring in Eclipse-PDE-Projects


    I'm new to Spring and the dependency management in Eclipse-PDE-Projects and I get in trouble by integrating Spring into a PDE-Project.

    That's my situation: we have a pde-project, where we want to use spring.
    So far we used maven to resolve jar-dependencies in our java-projects and we generated the appropriate eclipse-projects and classpath-files by running mvn eclipse:eclipse. To get a real pde-project as well I configured the maven-eclipse-plugin by adding the pde-configuration to our pom.

    Because we have to use some spring features in our pde project I also added the following dependency to the pom:

    We used that dependency in classic eclipse-java-projects as well, and it works very fine, because it correctly creates the classpath-entries for the eclipse-ide.

    Now if I call mvn eclipse:eclipse on the pde-project, the spring-classpath-entries in .classpath and the resourcelinks in .project are missing. I also tried to set the copy-dependencies-execution to the pom, described under,
    but the spring-dependency is missing as well. I only get a dependency to commons-logging-1.1.1.jar, linked into .project, .class and I suppose, maybe that's it related to the optional-tag I found in spring-2.5.5.pom. (??)

    By investigating the web, I found some further suggestions, that refer to some articles around spring dm and some explanations that try to integrate spring by eclipse-spring-plugins; e.g. So I downloaded the, imported the included osgi-jars, setup the plugin-dependencies. Although I solved the compile errors, now I get errors if I "validate the plugin-set" in the run configuration of the eclipse-pde-project. The concrete error is: "Missing constraint: Import Package: org.slf4j;version="[1.5.0,2.0.0)"

    Now I'm a little bit confused, how to resolve the spring dependency to the pde project in the correct way.

    So my first question is:
    What is the right way to resolve the dependency? By maven setting the spring-2.5.5.jar to the .classpath-file or by setting the eclipse-plugin-dependency in

    Further questions:
    - If I use the .classpath-way: How do I fully include the spring-2.5.5.jar correctly into the pde project, so that calling mvn eclipse:eclipse includes the complete spring-2.5.5.jar?
    - If I use the How do I setup the plugin-dependencies correctly?

    Thanks for your help