title: How do I use exploded jar dependencies?
body: <p>I've made a spring web application. It works with the jars in the lib folder but i need some of them unpacked. I know unpacking isn't the best way of doing things but I need it unpacked.</p>
  
  <p>I created the jars myself. I need to be able to access module specific property files. Also before you ask, I've already looked at putting them externally and moving them to the war folder but both methods were not useable in this case due to some functionality. I'm working with an old badly made program. So my options are limited.</p>
  
  <p>I'm trying to make some of my dependencies exploded. I've managed to explode a jar and put it in the 'WEB-INF\classes\&lt; modulename>' in my deployed war using:</p>
  
  <pre><code>&lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.8&lt;/version&gt;
            &lt;executions&gt;
              &lt;execution&gt;
                &lt;id&gt;unpack&lt;/id&gt;
                &lt;phase&gt;process-resources&lt;/phase&gt;
                &lt;goals&gt;
                  &lt;goal&gt;unpack&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;configuration&gt;
                  &lt;artifactItems&gt;
                    &lt;artifactItem&gt;
                      &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                      &lt;artifactId&gt;module1&lt;/artifactId&gt;
                      &lt;version&gt;${project.version}&lt;/version&gt;
                      &lt;type&gt;jar&lt;/type&gt;
                      &lt;outputDirectory&gt;${project.build.outputDirectory}/module1&lt;/outputDirectory&gt;
                      &lt;overWrite&gt;false&lt;/overWrite&gt;
                    &lt;/artifactItem&gt;
                    &lt;artifactItem&gt;
                      &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                      &lt;artifactId&gt;module2&lt;/artifactId&gt;
                      &lt;version&gt;${project.version}&lt;/version&gt;
                      &lt;type&gt;jar&lt;/type&gt;
                      &lt;outputDirectory&gt;${project.build.outputDirectory}/module2&lt;/outputDirectory&gt;
                      &lt;overWrite&gt;false&lt;/overWrite&gt;
                    &lt;/artifactItem&gt;
                  &lt;/artifactItems&gt;
                  &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt;
                &lt;/configuration&gt;
              &lt;/execution&gt;
            &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I've set the original dependency to provided scope as noted in this post: </p>
  
  <p><a href="https://stackoverflow.com/questions/1368088/building-a-war-project-with-unzipped-jar-dependency">Building a WAR project with unzipped JAR dependency?</a></p>
  
  <p>However it doesn't seem to recognize the exploded folders. So what am i forgetting here? Do they have to be located somewhere else? Or do i need to put some reference to the new folders?</p>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT: I've asked the moderator to delete this topic. Since i've solved it using the above topic. And since there hasn't been an answer to the question yet.</p>