title: Why does jasperreports-maven-plugin needs itext:itext:jar:4.2.0?
body: <p>Since today we can't build our jasper file any more.  We use the jasperreports-maven-plugin for this.  </p>
  
  <p>In maven 2.2.1, this was configured like this:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.0-beta-2&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;goals&gt;
            &lt;goal&gt;compile-reports&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
            &lt;sourceDirectory&gt;${basedir}/src/main/resources/reports&lt;/sourceDirectory&gt;
            &lt;outputDirectory&gt;&gt;${project.build.directory}/classes/reports&lt;/outputDirectory&gt;
          &lt;/configuration&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
          &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
          &lt;version&gt;5.5.1&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
        &lt;sourceDirectory&gt;C:\Windows\TEMP/src/main/resources/reports&lt;/sourceDirectory&gt;
        &lt;outputDirectory&gt;C:\Windows\TEMP\target/classes/reports&lt;/outputDirectory&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>But, as said, since today, we got this build error:</p>
  
  <pre><code>...
  Downloading: http://repo1.maven.org/maven2/itext/itext/4.2.0/itext-4.2.0.jar
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] Failed to resolve artifact.
  
  Missing:
  ----------
  1) itext:itext:jar:4.2.0
  
    Try downloading the file manually from the project website.
  
    Then, install it using the command:
    mvn install:install-file -DgroupId=itext -DartifactId=itext -Dversion=4.2.0 -Dpackaging=jar -Dfile=/path/to/file
  
    Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=itext -DartifactId=itext -Dversion=4.2.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
  
    Path to dependency:
      1) org.codehaus.mojo:jasperreports-maven-plugin:maven-plugin:1.0-beta-2
      2) jasperreports:jasperreports:jar:1.2.0
      3) itext:itext:jar:4.2.0
  </code></pre>
  
  <p>I think another question (<a href="https://stackoverflow.com/questions/31314373/dependency-error-in-jasper-reports-from-itext/">Dependency error in jasper-reports from itext</a>) is related to his.  And I tried the solution of Meher to use maven 3.2.3.  This seems to be a solution, but we can't upgrade (now) to this maven version.  So I need another solution to resolve this issue.  Any ideas?  I already tried to exclude dependencies and use fixed versions, but I haven't managed to succeed my build.  What I mean is this:</p>
  
  <pre><code>&lt;!-- Compile jasper reports --&gt;
  &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.0-beta-2&lt;/version&gt;
      &lt;configuration&gt;
          &lt;sourceDirectory&gt;${basedir}/src/main/resources/reports&lt;/sourceDirectory&gt;
          &lt;outputDirectory&gt;${project.build.directory}/classes/reports&lt;/outputDirectory&gt;
      &lt;/configuration&gt;
  
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;compile-reports&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt; 
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0-beta-2&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
                      &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;                              
                  &lt;/exclusion&gt;                            
              &lt;/exclusions&gt;
          &lt;/dependency&gt; 
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
              &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
              &lt;version&gt;5.5.1&lt;/version&gt; 
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.lowagie&lt;/groupId&gt;
                      &lt;artifactId&gt;itext&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.lowagie&lt;/groupId&gt;
              &lt;artifactId&gt;itext&lt;/artifactId&gt;
              &lt;version&gt;2.1.7&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Why is the plugin still searching for itext:itext:jar:4.2.0?  Any ideas or suggestions to solve this?</p>
  
  <p>Thanks!</p>