Announcement Announcement Module
Collapse
No announcement yet.
Compiler errors when "spring-data-rest-webmvc" project is imported into STS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compiler errors when "spring-data-rest-webmvc" project is imported into STS

    After watching John Brisbin's "Spring Data REST: Easily export JPA entities directly to the web" SpringOne talk (http://www.youtube.com/watch?v=kaiH1HsacPs), I cloned the spring-data-rest-webmvc project from github, and imported it as a project into the latest STS/GGTS.

    Everything is fine except for two compiler errors which occur in org.springframework.data.rest.example.RestExporter WebInitializer: the "addListener()" and "addServlet()" calls are flagged as undefined.

    That would make sense if the gradle config pointed to a javax.servlet api earlier that 3.0. But I haven't changed anything in the build.gradle file, so the project should be linking to

    Code:
      // Servlet 3.0
      providedCompile "javax.servlet:javax.servlet-api:3.0.1"
    and should not be showing these 2 errors, unless something else is putting an earlier version onto the class path prior to the 3.0.1 version.

    Indeed, if I go through the libraries in the project's build path, I find that servlet-api-2.4.jar is included under the "Groovy Libraries" as shown in the following illustration in which numerous items have been elided to save space:

    Attachment

    The question is, how do I remove/exclude the servlet-api-2.4.jar included in the GroovyLibraries? I can't find anyway to do this in the IDE or project preferences.

    Thanks.
    Attached Files
    Last edited by pfurbacher; Apr 16th, 2013, 10:36 AM. Reason: deleted extra image

  • #2
    I just found a solution which I detail in the thread, Excluding-Groovy-dependencies-from-Gradle-projects-or-re-ordering-the-classpath.

    Comment

    Working...
    X