[arquillian-issues] [JBoss JIRA] (ARQ-659) Testclass is missing in test.ear when bundling EnterpriseArchive with Arquillian.
Hanspeter Gisler (Updated) (JIRA)
jira-events at lists.jboss.org
Fri Nov 18 17:10:40 EST 2011
[ https://issues.jboss.org/browse/ARQ-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hanspeter Gisler updated ARQ-659:
---------------------------------
Description:
if shrink wrapping in the following way:
{code}
@Deployment
public static EnterpriseArchive createTestArchive() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class,"test.jar").addClasses(
SomeClass1.class,
SomeClass2.class)
.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
File file = new File("src/test/resources/arquillian-application.xml");
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
.artifact("org.demo.test:util:1.0-SNAPSHOT").resolveAs(GenericArchive.class))
.setApplicationXML(file)
.addAsLibraries(jar)
return ear;
}
{code}
then the actual test class (the one extending Arquillian.class) is nowhere to be found in {code}test.ear{code}.
This means a "no class def found" exception is beeing thrown by the container upon test execution after deployment.
was:
if shrink wrapping in the following way:
{code}
@Deployment
public static EnterpriseArchive createTestArchive() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class,"test.jar").addClasses(
Client.class,
SenseObject.class,
FQName.class,
ProhibitedCharacterFoundException.class,
ToManySeparatorsException.class)
.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
File file = new File("src/test/resources/arquillian-application.xml");
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
.artifact("org.demo.test:util:1.0-SNAPSHOT").resolveAs(GenericArchive.class))
.setApplicationXML(file)
.addAsLibraries(jar)
return ear;
}
{code}
then the actual test class (the one extending Arquillian.class) is nowhere to be found in {code}test.ear{code}.
This means a "no class def found" exception is beeing thrown by the container upon test execution after deployment.
> Testclass is missing in test.ear when bundling EnterpriseArchive with Arquillian.
> ----------------------------------------------------------------------------------
>
> Key: ARQ-659
> URL: https://issues.jboss.org/browse/ARQ-659
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Integration Test Suite
> Affects Versions: 1.0.0.CR2
> Environment: Windows 64bit, Netbeans 7.07, Glassfish 3.1.1, Maven 3.03, testng 6.3, arquillian resolver 1.1.0-alpha-1
> Reporter: Hanspeter Gisler
> Labels: Arquillian, EAR, EnterpriseArchive
>
> if shrink wrapping in the following way:
> {code}
> @Deployment
> public static EnterpriseArchive createTestArchive() {
> JavaArchive jar = ShrinkWrap.create(JavaArchive.class,"test.jar").addClasses(
> SomeClass1.class,
> SomeClass2.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
>
> File file = new File("src/test/resources/arquillian-application.xml");
>
> EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
> .addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
> .artifact("org.demo.test:util:1.0-SNAPSHOT").resolveAs(GenericArchive.class))
> .setApplicationXML(file)
> .addAsLibraries(jar)
> return ear;
> }
> {code}
> then the actual test class (the one extending Arquillian.class) is nowhere to be found in {code}test.ear{code}.
> This means a "no class def found" exception is beeing thrown by the container upon test execution after deployment.
--
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 arquillian-issues
mailing list