Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does maven-resources-plugin copy files multiple times (appfuse-basic-spring-archetype v2.1.0)
    primarykey
    data
    text
    <p>When successfully running <code>&gt;mvn package</code> on an appfuse-basic-spring-archetype v2.1.0 project, the console output displays:</p> <pre><code>[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 </code></pre> <p>I direct your attention to the last 3 lines (Copying 16...). I ran <code>&gt;mvn -X package</code> to get DEBUG output, which shows that the resources plugin claims to be first filtering the 16 files and then copying them twice.</p> <p>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.</p> <p>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. :-)</p> <p>EDIT 3/19/2012 cdhabecker: more detail</p> <p>In the maven output with the -X option, I found this:</p> <pre><code>[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.5:resources' with basic configurator --&gt; [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 -- </code></pre> <p>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).</p> <p>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.</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.
    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