title: Add external libraries in a maven web application in NetBeans
body: <p>I want to add an external .jar containing an API to a project created with the template maven-web application in NetBeans.
  It seems that in a project created with such template the Libraries folder doesn't exist (you don't find it both if you go to Project Properties and if you look under the project file structure).</p>
  
  <p>I managed to add the library by copying the jar into the project and editing the pom.xml file like this:</p>
  
  <blockquote>
  <pre><code>   &lt;dependency&gt;
      &lt;groupId&gt;Bbg&lt;/groupId&gt;
      &lt;artifactId&gt;BbgAPI&lt;/artifactId&gt;
      &lt;scope&gt;system&lt;/scope&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;!-- &lt;systemPath&gt;C:\blp\BPipe\APIv3\JavaAPI\v3.7.1.1\bin\blpapi3.jar&lt;/systemPath&gt; --&gt;
      &lt;systemPath&gt;${basedir}\lib\blpapi3.jar&lt;/systemPath&gt;
   &lt;/dependency&gt;
  </code></pre>
  </blockquote>
  
  <p>The code compiles file but I get an error at Runtime:</p>
  
  <p>java.lang.NoClassDefFoundError: com/bloomberglp/blpapi/SessionOptions</p>
  
  <p>My guess is that the JVM cannot find the class definition in the classpath.
  Typically, when adding external libraries to a standard java project in NetBeans (via the Libraries section in Project Properties) the classpath is automatically updated, but in this case (by manually editing the pom.xml) it seems that this has not happened.</p>
  
  <p>Do you know how I can patch the classpath to make the classes visible at runtime?
  In general, do you know why this project template doesn't allow to add external libraries in the standard way?</p>
  
  <p>Thanks</p>