I am having a difficulty to understand the difference between the maven-resources-plugin
and the project.build.resources
tag, in maven.
Both seem to have the same purpose. The different goals of the maven-resources-plugin
[resources, testResources and copy-resources] can also be achieved using the resources tag as:
<resources>
<resource>
<directory>src/dir</directory>
<targetPath>dest/dir</targetPath>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/dir</directory>
</testResource>
And using <resources>
tag will effectively copy the specified files in source directory to destination directory, similar to copy-resources
goal of maven-resources-plugin
.
Then, is there any difference between them?
Will they differ in their functionality in any particular scenario?