title: Cannot find the class file for org.springframework.beans.factory.annotation.Autowire
body: <p>I'm trying to move my project to <code>Spring Boot 1.4.1.RELEASE</code> and can't compile the source code with a following error:</p>
  
  <pre><code>The project was not built since its build path is incomplete. Cannot find the class file for org.springframework.beans.factory.annotation.Autowire. Fix the build path then try building this project
  
  The type org.springframework.beans.factory.annotation.Autowire cannot be resolved. It is indirectly referenced from required .class files   
  </code></pre>
  
  <p>Where <code>org.springframework.beans.factory.annotation.Autowire</code> can be found ?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>I use Maven in order to build the project:</p>
  
  <p>parent pom:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;example&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;name&gt;Own Pleasure&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;springframework.boot.version&gt;1.4.1.RELEASE&lt;/springframework.boot.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;java.source.version&gt;1.8&lt;/java.source.version&gt;
          &lt;java.target.version&gt;1.8&lt;/java.target.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-snapshots&lt;/id&gt;
              &lt;name&gt;Spring Snapshots&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-snapshot&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-commons&lt;/artifactId&gt;
              &lt;version&gt;1.12.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
              &lt;version&gt;1.10.2.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
                  &lt;version&gt;${springframework.boot.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;modules&gt;
          &lt;module&gt;common&lt;/module&gt;
          &lt;module&gt;api&lt;/module&gt;
          &lt;module&gt;dashboard&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>common pom:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;artifactId&gt;example&lt;/artifactId&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;common&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;hibernate-jpa.version&gt;1.0.0.Final&lt;/hibernate-jpa.version&gt;
          &lt;querydsl.version&gt;4.1.4&lt;/querydsl.version&gt;
          &lt;commons-lang3.version&gt;3.5&lt;/commons-lang3.version&gt;
          &lt;commons-collections4.version&gt;4.1&lt;/commons-collections4.version&gt;
          &lt;togglz.version&gt;2.3.0.Final&lt;/togglz.version&gt;
          &lt;UserAgentUtils.version&gt;1.20&lt;/UserAgentUtils.version&gt;
          &lt;imgscalr-lib.version&gt;4.2&lt;/imgscalr-lib.version&gt;
  
          &lt;apt-maven-plugin.version&gt;1.1.3&lt;/apt-maven-plugin.version&gt;
          &lt;maven-resources-plugin.version&gt;2.5&lt;/maven-resources-plugin.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;!-- Hibernate --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
              &lt;version&gt;${hibernate-jpa.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Apache Commons --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-dbcp2&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-collections4&lt;/artifactId&gt;
              &lt;version&gt;${commons-collections4.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Liquibase --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.liquibase&lt;/groupId&gt;
              &lt;artifactId&gt;liquibase-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- PostgreSQL --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Boot --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security.oauth&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-oauth2&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- QueryDSL --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-apt&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;eu.bitwalker&lt;/groupId&gt;
              &lt;artifactId&gt;UserAgentUtils&lt;/artifactId&gt;
              &lt;version&gt;${UserAgentUtils.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Togglz --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.togglz&lt;/groupId&gt;
              &lt;artifactId&gt;togglz-spring-web&lt;/artifactId&gt;
              &lt;version&gt;${togglz.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.togglz&lt;/groupId&gt;
              &lt;artifactId&gt;togglz-spring-security&lt;/artifactId&gt;
              &lt;version&gt;${togglz.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Joda time --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;${commons-lang3.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.imgscalr/imgscalr-lib --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.imgscalr&lt;/groupId&gt;
              &lt;artifactId&gt;imgscalr-lib&lt;/artifactId&gt;
              &lt;version&gt;${imgscalr-lib.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
  
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;${project.basedir}/src/main/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                  &lt;directory&gt;${project.build.directory}/generated-resources&lt;/directory&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
  
          &lt;testResources&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;${project.basedir}/src/test/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/testResource&gt;
          &lt;/testResources&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.source.version}&lt;/source&gt;
                      &lt;target&gt;${java.target.version}&lt;/target&gt;
                      &lt;optimize&gt;true&lt;/optimize&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.source.version}&lt;/source&gt;
                      &lt;target&gt;${java.target.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${apt-maven-plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;process&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;target/generated-sources/java&lt;/outputDirectory&gt;
                              &lt;processor&gt;com.querydsl.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt;
                              &lt;options&gt;
                                  &lt;querydsl.entityAccessors&gt;true&lt;/querydsl.entityAccessors&gt;
                                  &lt;querydsl.useFields&gt;true&lt;/querydsl.useFields&gt;
                              &lt;/options&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven-resources-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                      &lt;nonFilteredFileExtensions&gt;
                          &lt;nonFilteredFileExtension&gt;ttf&lt;/nonFilteredFileExtension&gt;
                      &lt;/nonFilteredFileExtensions&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                      &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;phase&gt;generate-sources&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;add-source&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;sources&gt;
                                      &lt;source&gt;target/generated-sources/java&lt;/source&gt;
                                  &lt;/sources&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
  
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>