title: application.xml is not generated correctly while saying "Run On Server" using Weblogic (beadep)
body: <p>I always encounter the following situation while <strong>"Run On Server"</strong> on my mavenized <strong>EAR</strong> project.</p>
  
  <h2>Situation</h2>
  
  <p>If I take the following steps on my EAR project:</p>
  
  <ul>
  <li>mvn clean install </li>
  <li>Run on Server</li>
  </ul>
  
  <p>... will lead to:</p>
  
  <p>The <em>application.xml</em> generated by <strong>Maven</strong> will be correct:</p>
  
  <pre><code>&lt;application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"&gt;
    &lt;display-name&gt;com.company.fbps.api.impl.ear&lt;/display-name&gt;
    &lt;module&gt;
      &lt;ejb&gt;com.company.fbps.api.impl.ejb-0.0.1-SNAPSHOT.jar&lt;/ejb&gt;
    &lt;/module&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>While the EJB project "com.company.fbps.api.impl.ejb" is a maven dependency of the EAR project:</p>
  
  <p>(in "com.company.fbps.api.impl.ejb" pom.xml)</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.company.fbps.api.impl.ejb&lt;/groupId&gt;
      &lt;artifactId&gt;com.company.fbps.api.impl.ejb&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;type&gt;ejb&lt;/type&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>... but the <em>application.xml</em> generated by <strong>Run on Server</strong> is incorrect:</p>
  
  <p>The <em>Oracle WebLogic Server Plugin</em> will generate a <em>application.xml</em> to:</p>
  
  <p><code>
  ...\.metadata\.plugins\org.eclipse.core.resources\.projects\com.company.fbps.api.impl.ear\beadep\fbp_local_test\com.company.fbps.api.impl.ear\split_src
  </code></p>
  
  <p>.... having the <strong>wrong EJB jar name</strong>:</p>
  
  <pre><code>&lt;application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"&gt;
    &lt;display-name&gt;com.company.fbps.api.impl.ear&lt;/display-name&gt;
    &lt;module&gt;
      &lt;ejb&gt;com.company.fbps.api.impl.ejb.jar&lt;/ejb&gt;
    &lt;/module&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>So in this process some integration is not aware of the fact that Maven generates a different <strong>ejb.jar</strong> name and this is not used for "Run on Server".</p>
  
  <h2>Workaround</h2>
  
  <p>I found a workaround to get it somehow running.
  If you say <code>"Maven - Update Project Configuration ..."</code> before <code>"Run on Server"</code> it works once.
  But will be corrupt again after the next build.</p>
  
  <h2>Used Plugins</h2>
  
  <ul>
  <li>Oracle WebLogic Server Tools for Eclipse 11.1.1.8.0</li>
  <li>m2e - Maven Integration for Eclipse 1.0.100.20110804-1717</li>
  </ul>
  
  <h2>Question</h2>
  
  <p>Do you have any idea how to correct this situation without using my workaround?</p>