The validation cannot be moved to the parser, because it is also possible to completely circumvent the parser by supplying your own Bootstrap impl (see WELD-560)
The problem in your case is that Weld SE merges all the beans.xml files it find on the classpath and returns it as a single BeansXml object.
So if anything, your problem could be fixed by having the parser remove duplicates when merging (but according to the javadoc of Bootstrap.parse() duplicates should not be removed - don't know why, though).
The validation cannot be moved to the parser, because it is also possible to completely circumvent the parser by supplying your own Bootstrap impl (see
WELD-560)The problem in your case is that Weld SE merges all the beans.xml files it find on the classpath and returns it as a single BeansXml object.
So if anything, your problem could be fixed by having the parser remove duplicates when merging (but according to the javadoc of Bootstrap.parse() duplicates should not be removed - don't know why, though).