Announcement Announcement Module
Collapse
No announcement yet.
Libs from Gradle Eclipse plugin are on my runtime classpath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Libs from Gradle Eclipse plugin are on my runtime classpath

    Hi folks,
    I have a project setup with the SpringSource Gradle IDE. When I run the application from this project from within Eclipse I get the following output in the console:


    SLF4J: Found binding in [jar:file:/home/kevin/apps/eclipse/eclipse-jee-juno/eclipse/plugins/org.springsource.ide.eclipse.gradle.core_3.1.0.201 210040512-RELEASE/lib/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]


    I'm trying to resolve an issue with the wrong SLF4J binding being selected at runtime and I can't figure out why this SLF4J jar from within the gradle plugin is on the runtime classpath. Is this expected? Is there any way to prevent it from happening?

    Thanks,
    Kevin

  • #2
    Hi Kevin,

    I gather you are referring to the slf4j jar that shows up nested under the 'Gradle DSLD Support' in package/project explorer?

    These entries are added to provide some code-completion support for editing .gradle files. They are jars that are either part-of or used by Gradle. These files are needed for Groovy Eclipse to be able to work with your .gradle scripts inside your project.

    We know that conceptually it is really wrong to have these on your project's classpath, they should only be on the classpath for the build scripts. Unfortunately Eclipse projects don't have any mechanism to attach different classpaths to some files in a project. There can be only one classpath per Eclipse project.

    You can avoid these entries getting added by disabling 'DSL support' on your project.
    You can enable/disable this option when you import your project by unchecking the option 'Enable DSL Support' in the import wizard.

    Or, you can also disable it after import via the project context menu at 'Gradle >> Disable DSL Support'.

    After Disabling DSL support you will still be able to edit your .gradle scripts in STS, but you will get fewer code-completions in the editor.
    Last edited by Kris De Volder; Jan 7th, 2013, 03:36 PM.

    Comment


    • #3
      Hi Kris,
      Thanks for the response. I hadn't noticed them under the Gradle DSLD support library but that would explain why I see it in my console output.

      Thanks for the suggestion. That should solve my issue.

      Thanks,
      Kevin

      Comment

      Working...
      X