[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-398) Descriptors 2.0 module creates duplicate <alternatives/> entries (test case attached)
Craig Ringer (JIRA)
jira-events at lists.jboss.org
Fri Apr 13 06:09:47 EDT 2012
Craig Ringer created SHRINKWRAP-398:
---------------------------------------
Summary: Descriptors 2.0 module creates duplicate <alternatives/> entries (test case attached)
Key: SHRINKWRAP-398
URL: https://issues.jboss.org/browse/SHRINKWRAP-398
Project: ShrinkWrap
Issue Type: Bug
Components: ext-descriptors
Affects Versions: 1.0.0
Environment: java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
Linux ayaki.localdomain 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Craig Ringer
Attachments: ArquillianShrinkwrapDuplicateAlternatives.zip
Using: org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-impl-javaee:jar:2.0.0-alpha-2
The attached test case produces an invalid beans.xml with a duplicate <alternatives/> entry with the code:
BeansDescriptor beansXml = Descriptors.importAs(BeansDescriptor.class)
.from(new File("src/main/webapp/WEB-INF/beans.xml"))
.getOrCreateAlternatives();
'getOrCreate' is in fact always creating an alternatives entry.
Also: Since there can only ever be one <alternatives/> block, it's not clear what the difference between getOrCreateAlternatives() and createAlternatives() is. Is the latter supposed to *replace* any existing block?
The API for managing alternatives is in Descriptors 2.0 is IMO difficult to use and understand. Issues with examples pending.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the shrinkwrap-issues
mailing list