When successfully running >mvn package
on an appfuse-basic-spring-archetype v2.1.0 project, the console output displays:
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ ScanillionAppTier02 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 20 resources
[INFO] Copying 16 resources
[INFO] Copying 16 resources
[INFO] Copying 16 resources
I direct your attention to the last 3 lines (Copying 16...). I ran >mvn -X package
to get DEBUG output, which shows that the resources plugin claims to be first filtering the 16 files and then copying them twice.
Even more copies happen within the forked hibernate3-maven-plugin:hbm2ddl portion of the build; in that section, the output shows the 16 files being filtered once and copied 4 times.
Again, the build works, so I could have (should have?) counted my blessings, averted my eyes, and got on with my project. Alas, I went down this rat hole and it's going to bug me until I get an answer. Help a guy get some sleep. :-)
EDIT 3/19/2012 cdhabecker: more detail
In the maven output with the -X option, I found this:
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.5:resources' with basic configurator -->
[DEBUG] (f) buildFilters = []
[DEBUG] (f) encoding = UTF-8
[DEBUG] (f) escapeWindowsPaths = true
[DEBUG] (s) includeEmptyDirs = false
[DEBUG] (s) outputDirectory = C:\eclipse\workspace\foo\target\classes
[DEBUG] (s) overwrite = false
[DEBUG] (f) project = MavenProject: com.foo:foo:0.0.1-SNAPSHOT @ C:\eclipse\workspace\foo\pom.xml
[LOOK] (s) resources = [Resource {targetPath: null, filtering: true, FileSet {directory: C:\eclipse\workspace\foo\src\main\resources, PatternSet [includes: {}, excludes: {ApplicationResources*.properties}]}},
[LOOK] Resource {targetPath: null, filtering: true, FileSet {directory: C:\eclipse\workspace\foo\target\resources, PatternSet [includes: {}, excludes: {}]}},
[LOOK] Resource {targetPath: null, filtering: false, FileSet {directory: C:\eclipse\workspace\foo\target\resources, PatternSet [includes: {}, excludes: {}]}},
[LOOK] Resource {targetPath: null, filtering: false, FileSet {directory: C:\eclipse\workspace\foo\target\resources, PatternSet [includes: {}, excludes: {}]}}]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@eddac
[DEBUG] (f) supportMultiLineFiltering = false
[DEBUG] (f) useBuildFilters = true
[DEBUG] (s) useDefaultDelimiters = true
[DEBUG] -- end configuration --
If you look at the lines marked [LOOK], you'll see that maven-resources thinks that it has 4 tasks (the filter of 20 files, the filter of 16 files, and the 2 redundant copies of those 16 files).
So now I suspect that something (e.g., native2ascii-maven-plugin or other plugins or the maven build plan generator) is registering those tasks with maven-resources-plugin and that nothing in the system is bothering to notice that some of those tasks are redundant.