Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to copy files from classpath with maven
    primarykey
    data
    text
    <p>I need to extract several XML configurations, which are placed in distinct artefacts, but in the same package in classpath. I need to do this, because then i merge them with XSLT transformation.</p> <p><strong>I don't want to specify name of each artefact in pom.</strong> The plugin should take whole classpath from all dependencies.</p> <p>I have found snippet with <code>maven-dependency-plugin</code>, which partially do what i need (<a href="http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html" rel="nofollow">http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html</a>)</p> <p>But i would like to specify just classpath, no arteract such as:</p> <pre><code> &lt;configuration&gt; &lt;artifactItems&gt; something like ALL &lt;/artifactItems&gt; &lt;includes&gt;my/xml/config/package/*settings.xml&lt;/includes&gt; &lt;outputDirectory&gt;${project.build.directory}/tmp&lt;/outputDirectory&gt; ... &lt;/configuration&gt; </code></pre> <p>Is it possible? and is <code>maven-dependency-plugin</code> the right choise?</p> <p><strong>EDIT : MODEL USECASE</strong></p> <p>i have 2 jars:</p> <ul> <li><code>a.jar</code> in which classpath is file <code>my/xml/config/package/a-settings.xml</code></li> <li><code>b.jar</code> in which classpath is file <code>my/xml/config/package/b-settings.xml</code></li> </ul> <p>i want to specify only <code>my/xml/config/package/*settings.xml</code> and be able to copy files <code>a-settings.xml</code> and <code>b-settings.xml</code> somwhere without specifiing, that they are in jars <code>a.jar</code> and <code>b.jar</code> (only that they are in dependencies classpath)</p> <p>Because it is possible, that in the future i will need to add <code>c.jar</code> with <code>c-settings.xml</code> and so on.. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload