title: "The import org.springframework cannot be resolved."
body: <p>Here is my POM.xml file:</p>
  
  <pre><code>&lt;project&gt;
      &lt;properties&gt;
          &lt;jdk.version&gt;1.6&lt;/jdk.version&gt;
          &lt;spring.version&gt;3.2.2.RELEASE&lt;/spring.version&gt;
          &lt;spring.batch.version&gt;2.2.0.RELEASE&lt;/spring.batch.version&gt;
          &lt;mysql.driver.version&gt;5.1.25&lt;/mysql.driver.version&gt;
          &lt;junit.version&gt;4.11&lt;/junit.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;!-- Spring Core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring jdbc, for database --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring XML to/back object --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- MySQL database driver --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;${mysql.driver.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Batch dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.batch&lt;/groupId&gt;
              &lt;artifactId&gt;spring-batch-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.batch.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.batch&lt;/groupId&gt;
              &lt;artifactId&gt;spring-batch-infrastructure&lt;/artifactId&gt;
              &lt;version&gt;${spring.batch.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Batch unit test --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.batch&lt;/groupId&gt;
              &lt;artifactId&gt;spring-batch-test&lt;/artifactId&gt;
              &lt;version&gt;${spring.batch.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;${junit.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;spring-batch&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;downloadJavadocs&gt;false&lt;/downloadJavadocs&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;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${jdk.version}&lt;/source&gt;
                      &lt;target&gt;${jdk.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><br>
  And below there is my java class:</p>
  
  <pre class="lang-java prettyprint-override"><code>import org.springframework.batch.core.Job;
  import org.springframework.batch.core.JobExecution;
  import org.springframework.batch.core.JobParameters;
  import org.springframework.batch.core.launch.JobLauncher;
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  public class App {
      public static void main(String[] args) {
          String[] springConfig  =
              {
                  "spring/batch/jobs/job-hello-world.xml"
              };
          ApplicationContext context =
              new ClassPathXmlApplicationContext(springConfig);
          JobLauncher jobLauncher = (JobLauncher) context.getBean("jobLauncher");
          Job job = (Job) context.getBean("helloWorldJob");
          try {
              JobExecution execution = jobLauncher.run(job, new JobParameters());
              System.out.println("Exit Status : " + execution.getStatus());
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>I am getting an error in import statements in my App.java classnd this is the message:</p>
  
  <blockquote>
    <p><em>"The import org.springframework cannot be resolved."</em></p>
  </blockquote>
  
  <p>I clearly mentioned the dependencies in POM.xml, but my java class still cannot pick the dependency from there.</p>