[ 
https://issues.apache.org/jira/browse/JCRVLT-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16425570#comment-16425570
 ] 

Konrad Windszus commented on JCRVLT-279:
----------------------------------------

Actually the files from {{jcrRootSourceDirectory}} are first added to the ZIP 
before the embedded files are being added. The reason why the former take 
precedence is the {{ContentPackageArchiver}} s duplicate behaviour. By default 
this is {{Archiver.DUPLICATES_SKIP}} 
(https://codehaus-plexus.github.io/plexus-archiver/apidocs/org/codehaus/plexus/archiver/Archiver.html#setDuplicateBehavior(java.lang.String))
 which means that only the first entry is being considered. Instead we should 
switch to {{DUPLICATES_FAIL}} to explicitly throw an exception in that case.

> Emit warning/error in case embedded file/subpackage is overwritten by 
> jcrRootSourceDirectory
> --------------------------------------------------------------------------------------------
>
>                 Key: JCRVLT-279
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-279
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: package maven plugin
>    Affects Versions: package-maven-plugin-1.0.1
>            Reporter: Konrad Windszus
>            Priority: Minor
>
> Due to errorneous project setup it may sometimes happen that the 
> {{jcrRootSourceDirectory}} inadvertently contains the to be embedded file. 
> Since the {{jcrRootSourceDirectory}} is having a higher precedence all files 
> in there overwrite previously embedded files. In that case a warning/error 
> should be emitted. The same for sub packages.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to