title: List of dependency jar files in Maven
body: <p>Using Maven 2, is there a way I can list out the jar dependencies as just the file names?</p>
  
  <pre><code>mvn dependency:build-classpath 
  </code></pre>
  
  <p>can list the jar files, but that will include the full path to their location in my local repository. What I need is essentially just a list of the file names (or the file names that the copy-dependencies goal copied).</p>
  
  <p>So the list I need would be something like</p>
  
  <pre><code>activation-1.1.jar,antlr-2.7.6.jar,aopalliance-1.0.jar etc...
  </code></pre>
  
  <p>ideally as a maven property, but I guess, a file such as build-classpath can generate will do.</p>
  
  <p>What I am trying to achieve is writing a <code>Bundle-ClassPath</code> to an otherwise manually maintained MANIFEST.MF file for a OSGi bundle. (You shouldn't need to understand this bit to answer the question.)</p>
  
  <p>To clarify: The question is <strong>not</strong> about how to write manifest headers into the MANIFEST.MF file in a jar (that is easily googleble). I am asking about how to get the data I want to write, namely the list shown above.</p>