I've got an issue with a maven project where I am distributing dlls from the src/main/resources/lib folder.
The project is built as a single jar with dependencies using the maven-assembly-plugin.
Unfortunately, the maven process is corrupting my dll libraries during the copy process so that they are no longer useful to the application.
I've had a look at such concepts as resource filtering.
Here's my relevant pom.xml
Does anyone have any ideas?
I think I need to do something like this but so far it's not working for me.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/main/resources/lib</directory>
<filtering>false</filtering>
</resource>
</resources>
<archive>
<manifest>
<mainClass>de.bochumuniruhr.psy.bio.behaviourcoder.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
My final solution (based on the answers below):
Thank you for the great answers. I ended up going with the answer that doesn't require extending the configuration of the maven-resources-plugin. I placed my binary files in the src/main/resources/unfiltered-resources
folder as I needed to filter my other resources.
Here is a link to the source code.
Below is my final working pom at the time of writing.
<build>
<finalName>BehaviourCoder_${git.build.time}_${git.commit.id.describe-short}</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}/src/main/unfiltered-resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<injectAllReactorProjects>true</injectAllReactorProjects>
<dateFormat>yyyy-MM-dd_HHmmss</dateFormat>
<dateFormatTimeZone>UTC</dateFormatTimeZone>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>de.bochumuniruhr.psy.bio.behaviourcoder.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>