title: Netbeans with Maven - Adding dependency libraries
body: <p>I am currently trying to build a Java Project with several dependencies. I have created it as a Maven Web Application and I have added all the necessary dependencies. Yet, the imports are not getting resolved.</p>
  
  <p>In the link below, I have attached a screenshot of my Netbeans wherein in the right panel, the import errors are visible. In the left panel, I have highlighted the libraries that I have added. Could anyone please tell me why this is happening ? Any help would be very much appreciated. Thank you :)</p>
  
  <p><a href="http://img20.imageshack.us/img20/5558/screenshotat20120312121.png" rel="nofollow">http://img20.imageshack.us/img20/5558/screenshotat20120312121.png</a></p>
  
  <p>POM FILE CONTENTS : </p>
  
  <pre><code>&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/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.mycompany&lt;/groupId&gt;
  &lt;artifactId&gt;nutchTest2&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;nutchTest2 Java EE 6 Webapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;java.net2&lt;/id&gt;
          &lt;name&gt;Repository hosting the jee6 artifacts&lt;/name&gt;
          &lt;url&gt;http://download.java.net/maven/2&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;1.6.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jvnet.hudson.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
          &lt;version&gt;0.19.1-hudson-3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.saucelabs.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-htmlunit-driver&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;solrj&lt;/groupId&gt;
          &lt;artifactId&gt;solr-solrj-1.3.0.jar&lt;/artifactId&gt;
          &lt;version&gt;1.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;solr&lt;/groupId&gt;
          &lt;artifactId&gt;solr-common-1.3.0-sources&lt;/artifactId&gt;
          &lt;version&gt;1.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;3.8.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  &lt;build&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;version&gt;2.0.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1-beta-1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;finalName&gt;nutchTest2&lt;/finalName&gt;
  &lt;/build&gt;
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;endorsed&lt;/id&gt;
          &lt;activation&gt;
              &lt;property&gt;
                  &lt;name&gt;sun.boot.class.path&lt;/name&gt;
              &lt;/property&gt;
          &lt;/activation&gt;
          &lt;build&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;version&gt;2.0.2&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;!-- javaee6 contains upgrades of APIs contained within the JDK itself.
                               As such these need to be placed on the bootclasspath, rather than classpath of the
                               compiler.
                               If you don't make use of these new updated API, you can delete the profile.
                               On non-SUN jdk, you will need to create a similar profile for your jdk, with the similar property as sun.boot.class.path in Sun's JDK.--&gt;
                          &lt;compilerArguments&gt;
                              &lt;bootclasspath&gt;${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}&lt;/bootclasspath&gt;
                          &lt;/compilerArguments&gt;
                      &lt;/configuration&gt;
                      &lt;dependencies&gt;
                          &lt;dependency&gt;
                              &lt;groupId&gt;javax&lt;/groupId&gt;
                              &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                              &lt;version&gt;6.0&lt;/version&gt;
                          &lt;/dependency&gt;
                      &lt;/dependencies&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  
  &lt;/project&gt;
  </code></pre>