How do I suppress maven assembly plugin skipping files that are already added? Or allow overwrite?

For weeks, I've been wrestling with maven, getting it to deploy our project "properly."

I'm almost done but I have one stubborn little problem:

When I use the maven assembly plugin with the "directory" goal as in

mvn assembly:directory

I get LOTS of console output like the following:

[INFO] tomcat/conf already added, skipping
[INFO] tomcat/conf/Catalina already added, skipping
[INFO] tomcat/conf/Catalina/localhost already added, skipping
[INFO] tomcat/webapps already added, skipping

I've written my own assembly descriptor that basically copies several FileSets into various sub-directories within our deploy directory. Messages like the ones above appear whenever a file from one FileSet is being copied to a location in which another FileSet has already created the basic directory structure (and some "default" files that can be overwritten).

So, I'm having a hard time figuring out:

How do I either 1) Suppress these messages (but only the "already added" messages) or 2) allow for overwrite?


The info messages are coming from the Plexus Archiver. There is an open bug report on this issue:

http://jira.codehaus.org/browse/PLXCOMP-129


The Plexus bug mentioned by vocaro has been fixed. Using the maven-assembly-plugin with version 2.4 (highest at time of writing) does not print the verbose messages.


It is probably better to use maven-resources-plugin with copy-resources goal to pull together the directories you need into one place. Create an execution for your basic directory structure and add subsequent executions for the customized parts. Setting the overwrite property of the goal to true will ensure that the custom files will overwrite the defaults.

Then in your assembly descriptors use the fileset you've just made.

链接地址: http://www.djcxy.com/p/5034.html

上一篇: 我如何告诉Maven使用最新版本的依赖关系?

下一篇: 如何禁止已添加的Maven Assembly插件跳过文件?