Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 443
gMale Avatar asked Apr 07 '10 23:04

gMale


People also ask

What is Maven Assembly plugin?

The Assembly Plugin for Maven enables developers to combine project output into a single distributable archive that also contains dependencies, modules, site documentation, and other files. Your project can easily build distribution "assemblies" using one of the prefabricated assembly descriptors.

What is assembly descriptor in Maven?

So in order for you to customize the way the Assembly Plugin creates your assemblies, you need to know how to use the Assembly Descriptor. This descriptor specifies the type of assembly archive to create, the contents of the assembly, and the ways in which dependencies or its modules are bundled with an assembly.

What is goal single in Maven?

This goal is suitable either for binding to the lifecycle or calling directly from the command line (provided all required files are available before the build starts, or are produced by another goal specified before this one on the command line).


2 Answers

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

like image 85
vocaro Avatar answered Sep 19 '22 15:09

vocaro


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.

like image 24
Attila Avatar answered Sep 21 '22 15:09

Attila