title: Artifactory: Can I avoid embedded redundancies for War and Zip artifacts?
body: <p>Let's consider the following scenario</p>
  
  <ul>
  <li><code>foo-common</code> is project which builds a 20mb jar (<code>foo-common-0.0.1.jar</code>)</li>
  <li><code>foo-app1</code> is an application which embeds <code>foo-common-0.0.1.jar</code> in a <code>zip</code> artifact</li>
  <li><code>foo-app2</code> is an application which embeds <code>foo-common-0.0.1.jar</code> in a <code>war</code> artifact</li>
  <li><code>foo-common</code>, <code>foo-app1</code> and <code>foo-app2</code> are all deployed to artifactory</li>
  <li><code>foo-app1</code> and <code>foo-app2</code> are managed by different teams and live in separate source repositories</li>
  </ul>
  
  <p>This causes disk space issues on artifactory because all 3 artifacts include the 20mb <code>foo-common-0.0.1.jar</code> which ends up taking up 60mb space on disk.</p>
  
  <p>Is there a smarter solution? Is there a way that <code>foo-common</code>, <code>foo-app1</code> and <code>foo-app2</code> can all live in artifactory without duplicating <code>foo-common-0.0.1.jar</code>? I'm thinking along the lines of artifactory being smarter and inspecting uploaded wars and zips for embedded jars which already exist in artifactory. Possibly by comparing file hashes or making use of maven dependency information.</p>