title: Maven cannot compile Spring Security demo project
body: <p>I have a Maven demo project for which I use some Spring Security features.</p>
  
  <p>I could import the project fine into Eclipse STS and the editor shows no error related to dependencies.</p>
  
  <p>But a Maven command to compile on the command line fails.</p>
  
  <p>I get the following errors:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project learnintouch-web: Compilation failure: Compilation failure:
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[7,78] package org.springframework.security.config.annotation.authentication.builders does not exist
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[8,67] package org.springframework.security.config.annotation.web.builders does not exist
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[9,72] package org.springframework.security.config.annotation.web.configuration does not exist
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[10,72] package org.springframework.security.config.annotation.web.configuration does not exist
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[19,47] cannot find symbol
  [ERROR] symbol: class WebSecurityConfigurerAdapter
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[15,2] cannot find symbol
  [ERROR] symbol: class EnableWebSecurity
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[25,34] cannot find symbol
  [ERROR] symbol:   class AuthenticationManagerBuilder
  [ERROR] location: class com.thalasoft.learnintouch.web.config.WebSecurityConfiguration
  [ERROR] /home/stephane/dev/java/projects/learnintouch-web/src/main/java/com/thalasoft/learnintouch/web/config/WebSecurityConfiguration.java:[24,9] method does not override or implement a method from a supertype
  </code></pre>
  
  <p>Here is in the pom.xml the Spring Security dependencies:</p>
  
  <pre><code>&lt;org.springframework.security.version&gt;3.2.4.RELEASE&lt;/org.springframework.security.version&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
    &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.security.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
    &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.security.version}&lt;/version&gt;
    &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
    &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.security.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
    &lt;artifactId&gt;spring-security-taglibs&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.security.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>