My problem is that i want to extract files from a .jar
file with maven but only if the files do not exist in the output directory. So if i have a file /src/META-INF/beans.xml
then i only want the persistence.xml
extracted, etc.
Sadly the maven-plugin irgnores all combinations with <overWrite>false</overWrite>
that i tried.
Question: Any idea what i am doing wrong? Is it possible?
<build>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack</id>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId> ... </groupId>
<artifactId> ... </artifactId>
<version>${project.version}</version>
<outputDirectory>${basedir}/src/META-INF</outputDirectory>
<includes>beans.xml,persistence.xml</includes>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
<overWriteIfNewer>false</overWriteIfNewer>
<overWrite>false</overWrite>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteReleases>false</overWriteReleases>
</configuration>
</execution>
</executions>
</plugin>
...
</build>