Simon created MASSEMBLY-877:

             Summary: give priority to module files when using 
jar-with-dependencies descriptor
                 Key: MASSEMBLY-877
             Project: Maven Assembly Plugin
          Issue Type: Improvement
          Components: component descriptor
            Reporter: Simon

Currently, when you create an uber jar using {{jar-with-dependencies}} 
descriptor if there is resource duplicates between current module and 
dependencies there is no guarantee the module one will be chosen.

E.g. :
 module A depends on module B.
 module A and module B contains a configuration file with the same name/ same 

If I build A using jar-with-dependencies descriptor I have no guarantee my 
assembly will contains the configuration file of A.

I think this is because jar-with-dependencies use 
<useProjectArtifact>true</useProjectArtifact> and so there is no priority 
between the module and its dependencies.

A solution could be to change the descriptor and use something like this : 

<assembly xmlns="";

        <!-- This descriptor behave like maven "jar-with-dependency" except it 
                that current module files have always priority on dependency 
files in case 
                of duplicate -->

As FileSet have priority on dependencySet, it should do the tricks.

Does it make sense ?

This message was sent by Atlassian JIRA

Reply via email to