title: Adding a Web Project as a jar in an Eclipse Deployment Assembly
body: <p>The site I'm working on now is made up of several java projects and a main web project <code>A</code> which references them. The IDE I'm using is Eclipse Helios.</p>
  
  <p>What I'm trying to accomplish is adding a new project <code>B</code> to the stack. The project is also referenced by the main one, but is in itself a Web Project. When I add <code>B</code> to the Deployment Assembly of <code>A</code>, when publishing, Eclipse automatically packages it as a war and deploys it to the server's <code>WEB-INF/lib</code>. </p>
  
  <p>I want it to be deployed as a jar, but also keep the project's web nature, as it has some features (and tests) that are run on it. I have ant tasks in place for building a jar out of <code>B</code>, but I don't know how to use them in Eclipse. Also, I'm not sure if it's possible to make Eclipse deploy a jar out of a web project.</p>
  
  <p>I can add the jar manually (as an archive from the workspace), but that would mean that whenever someone cleans all projects, the jar for <code>B</code> would get deleted and not generated, as the build only compiles the classes and the deploy packages them into the war.</p>
  
  <p>P.S. <em>I know the design is poor, but changing it is out of the question as I don't have the authority :).</em></p>