[
https://jira.codehaus.org/browse/MASSEMBLY-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=358725#comment-358725
]
Kristian Rosenvold commented on MASSEMBLY-740:
----------------------------------------------
Unfortunately the descriptor parsing logic is generated code that actively
stops us from detecting this condition. This is one of those cases where code
generation makes a presumptively simple task extremely complex, causing all
sorts of leaks/workarounds in other code. Unfortunately there is no easy
workaround, so this is probably not going to be fixed any time soon.
> mismatched descriptors / descriptorRefs gives generic error
> -----------------------------------------------------------
>
> Key: MASSEMBLY-740
> URL: https://jira.codehaus.org/browse/MASSEMBLY-740
> Project: Maven Assembly Plugin
> Issue Type: Bug
> Reporter: Daniel Pocock
> Priority: Minor
> Fix For: backlog
>
>
> Basically, if pom.xml is misconfigured:
> <descriptorRefs>
> <descriptor>src/assembly/dist.xml</descriptor>
> </descriptorRefs>
> instead of using the correct container <descriptors>:
> <descriptors>
> <descriptor>src/assembly/dist.xml</descriptor>
> </descriptors>
> then the assembly plugin fails with the rather generic error:
> Error reading assemblies: Descriptor with ID 'src/assembly/dist.xml' not found
> It had started off as a valid and working configuration like this:
> <descriptorRefs>
> <descriptorRef>bin</descriptorRef>
> </descriptorRefs>
> and then only the <descriptorRef> element was changed to <descriptor> to use
> a custom dist.xml without realizing that descriptorRefs needs to be changed
> too.
> This is probably a very easy mistake for anybody to make the first time they
> customize the assembly plugin so it would be nice to show a more explicit
> error telling people not to mismatch <descriptorRefs> with <descriptor> and
> vice-versa.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)