[arquillian-issues] [JBoss JIRA] (ARQ-841) Should not scan for classes in Archive if it contains no beans.xml
Karim de Fombelle (JIRA)
jira-events at lists.jboss.org
Sat Jan 19 18:44:21 EST 2013
[ https://issues.jboss.org/browse/ARQ-841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749035#comment-12749035 ]
Karim de Fombelle edited comment on ARQ-841 at 1/19/13 6:42 PM:
----------------------------------------------------------------
Similar issue observed with Arquillian 1.0.3.Final / arquillian-weld-se-embedded-1.1 1.0.0.CR5 / weld-core 1.1.10.Final / Shrinkwrap 2.0.0-alpha-1
Test case below:
{code}
@RunWith(Arquillian.class)
public class ArquillianBeanXmlTest {
@Inject
private TestBean testBean;
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class)
.addClass(TestBean.class);
//.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");//sounds useless
}
//test is successful whereas it is expected to fail
@Test
public void testBeanInjected() {
assertNotNull(testBean);
}
}
{code}
And bean:
{code}
package org.jboss.arquillian.junit;
public class TestBean {
}
{code}
The pom is attached.
was (Author: kdefombelle):
Similar issue observed with Arquillian 1.0.3.Final / arquillian-weld-se-embedded-1.1 1.0.0.CR5 / weld-core 1.1.10.Final / Shrinkwrap 2.0.0-alpha-1
Test case below:
{code}
@RunWith(Arquillian.class)
public class ArquillianBeanXmlTest {
@Inject
private TestBean testBean;
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class)
.addClass(TestBean.class);
//.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");//sounds useless
}
//test is successful whereas it is expected to fail
@Test
public void testBeanInjected() {
assertNotNull(testBean);
}
}
{code}
And bean:
{code}
package org.jboss.arquillian.junit;
public class TestBean {
}
{code}
The pom is attached.
> Should not scan for classes in Archive if it contains no beans.xml
> ------------------------------------------------------------------
>
> Key: ARQ-841
> URL: https://issues.jboss.org/browse/ARQ-841
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Weld Containers
> Affects Versions: weld_1.0.0.CR3
> Reporter: Aslak Knutsen
> Labels: starter
> Fix For: weld_1.1.0.next
>
> Attachments: pom.xml
>
>
> A deployment with no beans.xml should not result in Beans being registered in the Weld Container.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list