title: How to exclude INDEX.LIST from maven generated jar-with-dependencies?
body: <p>I need to package an application as an executable jar; its properties files will be located outside it, in the same directory. In the end, I will have something like that in the filesystem:</p>
  
  <pre>
   .
   app.jar
   file1.properties
   file2.properties
  </pre>
  
  <p>But, after packaging it, the application cannot access the properties files. After some research, I think I know what is causing it, but I am not being able to instruct Maven to perform as I want.</p>
  
  <p>I am using maven-assembly-plugin to build a jar-with-dependencies, as show below:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.4&lt;/version&gt;
      &lt;configuration&gt;
          &lt;archive&gt;
              &lt;index&gt;false&lt;/index&gt;                
              &lt;manifest&gt;
                  &lt;mainClass&gt;main.Main&lt;/mainClass&gt;
              &lt;/manifest&gt;
              &lt;manifestEntries&gt;
                  &lt;Class-Path&gt;.&lt;/Class-Path&gt; 
              &lt;/manifestEntries&gt;
          &lt;/archive&gt;
          &lt;descriptorRefs&gt;
              &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
          &lt;/descriptorRefs&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;make-assembly&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;single&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>When I try to run the jar, I get an exception that indicates that the properties outside the jar file are not being loaded.</p>
  
  <p>In main.Main class, I put the following code, just to test accessibiliy from outside the jar:</p>
  
  <pre><code>ClassLoader cl = ClassLoader.getSystemClassLoader();
  URL systemResource = ClassLoader.getSystemResource("file1.properties");
  System.out.println("File 1 " + systemResource);
  systemResource = ClassLoader.getSystemResource("insideJarFile.xml");
  System.out.println("insideJarFile.xml " + systemResource);
  </code></pre>
  
  <p><code>insideJarFile.xml</code> is a file that is packaged inside the jar. This is the result of the code above:</p>
  
  <pre><code>File 1 null
  insideJarFile.xml jar:file:/D:/test/application-jar-with-dependencies.jar!/insideJarFile.xml
  </code></pre>
  
  <p>Researching for a few hours hinted me that the cause could be the INDEX.LIST file. I opened the jar file in 7-zip and I found it there, inside META-INF folder. I deleted it from inside the jar and executed it again; the result was:</p>
  
  <pre><code>File 1 file:/D:/test/file1.properties
  insideJarFile.xml jar:file:/D:/test/application-jar-with-dependencies.jar!/insideJarFile.xml
  </code></pre>
  
  <p>Question: how I tell maven to not create the INDEX.LIST file? I tried <code>&lt;index&gt;false&lt;/index&gt;</code> but it did not work.</p>
  
  <p>TIA, </p>
  
  <p>FQL</p>