Aslak Knutsen created ARQ-858:
---------------------------------
Summary: Should validate that a TestClass does not contain multiple same
named Archives with the same Target
Key: ARQ-858
URL:
https://issues.jboss.org/browse/ARQ-858
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Base Implementation
Affects Versions: 1.0.0.CR8
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Fix For: 1.0.0.Final
The backing container implementations can in most cases not handle a automatic redeploy of
a same named archive and will in some cases silently ignore the call. In most cases this
is a programming error from the developer that cause confusion.
If redeploy support is requested as a feature, a proper API/SPI should be put in place.
{code:title=Not Allowed}
@Deployment(name = "X")
return ShrinkWrap.create(JavaArchive.class, "test.jar")
@Deployment(name = "Y")
return ShrinkWrap.create(JavaArchive.class, "test.jar")
{code}
This will cause "java.lang.IllegalArgumentException: Can not add multiple
org.jboss.shrinkwrap.api.Archive archive deployments with the same archive name test.jar
that target the same target _DEFAULT_"
{code:title=Allowed}
@Deployment(name = "X") @TargetsContainer("X")
return ShrinkWrap.create(JavaArchive.class, "test.jar")
@Deployment(name = "Y") @TargetsContainer("Y")
return ShrinkWrap.create(JavaArchive.class, "test.jar")
{code}
--
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