title: Maven Jetty run JNDI configuration
body: <p>My project structure looks like this:</p>
  <pre><code>parent POM 
  |-- app-core
  |-- app-model
  |-- app-services
  `-- app-web
  </code></pre>
  <p>In my <code>pom.xml</code> for  <code>app-web</code>:</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
      &lt;version&gt;6.1.10&lt;/version&gt;
      &lt;configuration&gt;
      &lt;webDefaultXml&gt;src/test/resources/webdefault.xml&lt;/webDefaultXml&gt;
      &lt;/configuration&gt;
   &lt;/plugin&gt;
  </code></pre>
  <p>Hot deployment works properly and have no issues with <code>mvn jetty:run</code></p>
  <p><strong>Question</strong> : app-core uses springs how can I configure this JNDI for <strong>Jetty maven plugin</strong>  in this multi-module hierarchy which should be accessible in app-core module</p>
  <p><strong>Update :</strong></p>
  <p>Have added <strong>pom.xml</strong> like this</p>
  <pre><code>  &lt;plugin&gt;
      &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
      &lt;version&gt;6.1.10&lt;/version&gt;
      &lt;configuration&gt;
      &lt;webDefaultXml&gt;src/main/resources/webdefault.xml&lt;/webDefaultXml&gt;
      &lt;jettyConfig&gt;src/main/resources/jetty.xml&lt;/jettyConfig&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  <p>And my jetty.xml looks like this :</p>
  <pre><code>  &lt;Configure class=&quot;org.mortbay.jetty.webapp.WebAppContext&quot;&gt;
  &lt;New id=&quot;icatDB&quot; class=&quot;org.mortbay.jetty.plus.naming.Resource&quot;&gt;
      &lt;Arg&gt;jdbc/testDB&lt;/Arg&gt;
      &lt;Arg&gt;
  &lt;New class=&quot;net.sourceforge.jtds.jdbcx.JtdsDataSource&quot;&gt;
      &lt;Set name=&quot;serverName&quot;&gt;localhost&lt;/Set&gt;
      &lt;Set name=&quot;databaseName&quot;&gt;test&lt;/Set&gt;
      &lt;Set name=&quot;user&quot;&gt;sa&lt;/Set&gt;
      &lt;Set name=&quot;password&quot;&gt;&lt;/Set&gt;
  &lt;/New&gt;
  &lt;/Arg&gt;
  &lt;/New&gt;
   &lt;/Configure&gt;
  </code></pre>
  <p>After that when i run mvn jetty:run I get this error</p>
  <pre><code>Failure: Object is not of type class org.mortbay.jetty.webapp.WebAppContext
  </code></pre>