title: Teaching Eclipse To Deploy an Ant Generated WAR File With JBoss Tools
body: <p>I've been asked to migrate an older Ant-based web application. I'm building and trying to deploy using Eclipse Luna with JBoss Tools 3.0.1.Final. JBoss instance is EAP 6.3.0 (AS 7.1).</p>
  
  <p>The build tool, like I said, is Ant. And when I run <code>ant package</code>, a valid WAR file is created at /target/foo.war</p>
  
  <p>For some reason I'm having a heck of a time trying to explain to Eclipse and JBoss server that the foo.war file is what I want to deploy. </p>
  
  <p>To this end I've:</p>
  
  <ul>
  <li><p>Right-clicked on the project root and opened the Properties dialog.</p></li>
  <li><p>Declared custom Ant builder for the project by going to Builders and adding an Ant builder and disabling the default Java builder.</p></li>
  </ul>
  
  <p>Now Project -> Clean removes the target/ folder; Project -> Build results in a /target/foo.war file.</p>
  
  <p>So far so good.  At this point, I think all I need to do is declare that foo.war file as the Web Deployment Assembly?  If I go to Web Deployment Assembly and click Add, then add the target/foo.war file, it tries to add it as a project library (i.e. WEB-INF/lib/foo.war). So clearly that's wrong.</p>
  
  <p>I've also gone to the Server view, and tried numerous settings in the Deployment tab. The closest I've come to what I'm looking for is the Default Settings, but I haven't had any luck there, either.</p>
  
  <p>(When I start JBoss via the JBoss Tools in Eclipse, then pull up the management console on port 9990, I can upload and deploy the WAR that way with no issues.)</p>
  
  <p>I'm sure there's something completely obvious I'm missing. Could anyone help an IntelliJ user out? I have seen <a href="https://stackoverflow.com/a/4261178/3223711">https://stackoverflow.com/a/4261178/3223711</a>, but it seems to be missing the "last mile" in that the problem is not generating the WAR but in getting JBoss to actually pick it up and use it.</p>
  
  <p>Thanks!</p>