title: TwelveMonkeys 3.1.1 || 3.1.2 not working with maven-dependency-plugin
body: <p>I am trying to use <a href="https://github.com/haraldk/TwelveMonkeys" rel="nofollow" title="TwelveMonkeys">TwelveMonkeys</a> in my application to deal with thumbnail generation. Also, I am using <code>maven-dependency-plugin</code> to unpack all dependencies and create a FAT jar. Though, plugin work quite well in normal scenarios, but simply not working when used with maven-dependency-plugin. Here is my POM XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.prakhar&lt;/groupId&gt;
      &lt;artifactId&gt;demo&lt;/artifactId&gt;
      &lt;name&gt;demo&lt;/name&gt;
  
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;organization&gt;
          &lt;!-- Used as the 'Vendor' for JNLP generation --&gt;
          &lt;name&gt;Your Organisation&lt;/name&gt;
      &lt;/organization&gt;
  
      &lt;properties&gt;
          &lt;slf4j.version&gt;1.6.1&lt;/slf4j.version&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
  
              &lt;plugin&gt;
                  &lt;!-- Get the dependencies jar files to a common place, for jar signing --&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;unpack-dependencies&lt;/id&gt;
                          &lt;phase&gt;prepare-package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;unpack-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;!-- &lt;includeArtifactIds&gt;commons-net,imageio-bmp,imageio-jpeg,imageio-tiff,imageio-pnm,imageio-psd,imageio-iff,imageio-pcx,imageio-pict,imageio-sgi,imageio-tga,imageio-icns,imageio-thumbsdb,imageio-core,imageio-metadata,common-lang,common-io,common-image&lt;/includeArtifactIds&gt; --&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/classes&lt;/outputDirectory&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencies&gt;
  
          &lt;!-- MigLayout --&gt;
  
  
  
          &lt;!-- Apache Commons --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Logging  --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
              &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Twelve Monkeys dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-bmp&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-jpeg&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-tiff&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-pnm&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-psd&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-iff&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-pcx&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-pict&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-sgi&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-tga&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-icns&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.twelvemonkeys.imageio&lt;/groupId&gt;
              &lt;artifactId&gt;imageio-thumbsdb&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>And, here is my function:</p>
  
  <pre><code>private static void convertToJpg(File file) {
      try {
          BufferedImage image = ImageIO.read(file);
  
          int width = 300, height = 200; // new width/height
  
          BufferedImageOp resampler = new ResampleOp(width, height, ResampleOp.FILTER_LANCZOS); // A good default filter, see class documentation for more info
          BufferedImage thumbnailImg = resampler.filter(image, null);
  
          FileImageOutputStream fios = new FileImageOutputStream(new File(file.getAbsolutePath() + ".png"));
  
          if (!ImageIO.write(thumbnailImg, "PNG", fios)) {
              System.out.println("ERROR: Unable to convert image " + file.getAbsolutePath());
          } else {
              System.out.println("SUCCESS: Image " + file.getAbsolutePath() + ".png converted successfully");
          }
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Here is the exception I am getting:</p>
  
  <pre><code>java.lang.NullPointerException: Input == null
      at com.twelvemonkeys.image.ResampleOp.filter(Unknown Source)
  </code></pre>
  
  <p>If anybody have any idea of how might be solved, please state.</p>