title: Maven: Deploy on Save of EAR in Netbeans only works when dependency project is open
body: <p>The deploy on save option of my EAR project is not working and I don't understand why. Here is my structure:</p>
  
  <pre><code>myproject-ear, packaging: EAR
  ---&gt;myproject-core, packaging: JAR (ejbs)
  ---&gt;myproject-web, packaging: WAR (.xhtml pages, some javascript and CSS)
  </code></pre>
  
  <p>I'm using maven and I have the war references the JAR as a provided dependency.</p>
  
  <p>The thing is I have a Nexus repository to handle my JAR versioning, I do not develop with my JAR project open. But if I close my JAR project and then deploy the application the fast deployment simply stops working on glassfish (it doesn't even generate a gfdeploy on my EAR target folder, it instead copies all files to the glassfish directory).</p>
  
  <p>Here are my (simplified) pom files:</p>
  
  <p>Father project:</p>
  
  <pre><code>&lt;artifactId&gt;myproject&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;myproject&lt;/name&gt;
  
  &lt;modules&gt;
      &lt;module&gt;myproject-web&lt;/module&gt;
      &lt;module&gt;myproject-ear&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p>EAR project (uses maven-ear-plugin):</p>
  
  <pre><code>&lt;parent&gt;
      &lt;artifactId&gt;myproject&lt;/artifactId&gt;
      &lt;groupId&gt;mygroupid&lt;/groupId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;myproject-ear&lt;/artifactId&gt;
  &lt;packaging&gt;ear&lt;/packaging&gt;
  
  &lt;name&gt;myproject-ear&lt;/name&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mygroupid&lt;/groupId&gt;
          &lt;artifactId&gt;myproject-core&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mygroupid&lt;/groupId&gt;
          &lt;artifactId&gt;myproject-web&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;war&lt;/type&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>WAR project (uses maven-war-plugin):</p>
  
  <pre><code>&lt;parent&gt;
      &lt;artifactId&gt;myproject&lt;/artifactId&gt;
      &lt;groupId&gt;mygroupid&lt;/groupId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;myproject-web&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;name&gt;myproject-web&lt;/name&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mygroupid&lt;/groupId&gt;
          &lt;artifactId&gt;myproject-core&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>