title: Using image resources in a jar using maven
body: <p>I have a java/maven project that uses tango icons, so I'm using the following dependency:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.freedesktop.tango&lt;/groupId&gt;
      &lt;artifactId&gt;tango-icon-theme&lt;/artifactId&gt;
      &lt;version&gt;0.8.90&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>And the following code, which would work ok before I moved the proyect to maven:</p>
  
  <pre><code>imageIcon = new ImageIcon(this.getClass().getResource(org/freedesktop/tango/22x22/actions/address-book-new.png));
  </code></pre>
  
  <p>However, it now results in NullPointerException for some reason.
  The generated jar does not contain the images, nor reference them in any way, but classes in other jars are.</p>
  
  <p>I've investigated a lot, but I've found most people bundle their images with their source. This isn't my case.</p>
  
  <p>What do I need to do for maven to reference and/or package these images propertly?
  How can I get maven to build a standalone runnable jar (this is a swing application).</p>