title: Overlay BIRT runtime into correct WAR locations
body: <p>I'm trying to get Maven to assemble a WAR with the BIRT runtime in a useful location within the WAR.</p>
  
  <p>The BIRT runtime is in the pom.xml as</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.eclipse.birt&lt;/groupId&gt;
    &lt;artifactId&gt;report-engine&lt;/artifactId&gt;
    &lt;version&gt;2.3.2&lt;/version&gt;
    &lt;type&gt;zip&lt;/type&gt;
    &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>The desired outcome of overlaying this is something like</p>
  
  <pre><code>ReportEngine/lib/*           -&gt; WEB-INF/lib 
  ReportEngine/configuration/* -&gt; WEB-INF/platform/configuration 
  ReportEngine/plugins/*       -&gt; WEB-INF/platform/plugins 
  </code></pre>
  
  <p>My overlay configuration looks like</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
    &lt;configuration&gt;
      &lt;overlays&gt;
        &lt;overlay&gt;
          &lt;groupId&gt;org.eclipse.birt&lt;/groupId&gt;
          &lt;artifactId&gt;report-engine&lt;/artifactId&gt;
          &lt;type&gt;zip&lt;/type&gt;
          &lt;includes&gt;
            &lt;include&gt;ReportEngine/lib/*&lt;/include&gt;
          &lt;/includes&gt;
          &lt;targetPath&gt;WEB-INF/lib&lt;/targetPath&gt;
        &lt;/overlay&gt;
        &lt;overlay&gt;
          &lt;groupId&gt;org.eclipse.birt&lt;/groupId&gt;
          &lt;artifactId&gt;report-engine&lt;/artifactId&gt;
          &lt;type&gt;zip&lt;/type&gt;
          &lt;includes&gt;
            &lt;include&gt;ReportEngine/configuration/*&lt;/include&gt;
            &lt;include&gt;ReportEngine/plugins/*&lt;/include&gt;
          &lt;/includes&gt;
          &lt;targetPath&gt;WEB-INF/platform&lt;/targetPath&gt;
        &lt;/overlay&gt;
      &lt;/overlays&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Of course, when running <code>mvn war:exploded</code> I'm seeing</p>
  
  <pre><code>ReportEngine/lib/*           -&gt; WEB-INF/lib/ReportEngine/lib/ 
  ReportEngine/configuration/* -&gt; WEB-INF/platform/configuration/ReportEngine/lib/ 
  ReportEngine/plugins/*       -&gt; WEB-INF/platform/plugins/ReportEngine/lib/
  </code></pre>
  
  <p>This relates, same sort of problem, no answer
  <a href="http://www.coderanch.com/t/447258/Ant-Maven-Other-Build-Tools/Maven-war-dependencies-moving-files" rel="nofollow noreferrer">http://www.coderanch.com/t/447258/Ant-Maven-Other-Build-Tools/Maven-war-dependencies-moving-files</a></p>
  
  <p>Bonus points for pointing out how I can tidy this up a bit by having it all work from within <code>WEB-INF/birt-runtime</code></p>
  
  <p>Edit:</p>
  
  <p>The reason for the locations specified above are that they match those indicated in <a href="http://wiki.eclipse.org/Servlet_Example_%28BIRT%29_2.1" rel="nofollow noreferrer">http://wiki.eclipse.org/Servlet_Example_%28BIRT%29_2.1</a> and when I fritz with the Tomcat installation to mimic this, it all seems to work. It would be ideal if I could simply overlay the zip into WEB-INF/birt-runtime and then set the engine config appropriately, but I've not found that to work as yet.</p>
  
  <p>Eg:</p>
  
  <pre><code>engineConfig = new EngineConfig();
  engineConfig.setEngineHome("WEB-INF/birt-runtime");
  engineConfig.setPlatformContext(new PlatformServletContext(servletContext));
  </code></pre>