-
1. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
bmajsak May 29, 2013 11:25 AM (in response to rzvikas)You can use Shrinkwrap Maven Resolver and scan your POM to add dependencies you need, for example:
final JavaArchive shrinkwrapAPI = Maven.resolver().loadPomFromFile("pom.xml") .resolve("org.jboss.shrinkwrap:shrinkwrap-api").asSingle(JavaArchive.class);
I think by exploring API you will find the best way for your use case. If not I'm here to help.
-
2. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas May 29, 2013 11:27 AM (in response to bmajsak)Do you know if we have similar resolver for Gradle ?
-
3. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
bmajsak May 29, 2013 11:29 AM (in response to rzvikas)Ah right, you have no POM Stupid me.
I think this might be helpful
-
4. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
mmatloka May 29, 2013 2:50 PM (in response to rzvikas)Hi,
Please watch the following jira ticket https://issues.jboss.org/browse/SHRINKRES-116
-
5. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas May 29, 2013 4:17 PM (in response to mmatloka)Thanks Guys.. I'll watch for this JIRA.
It is too complicated to do simple test injection test using arquillian. Do you know any other simple framework ?
-
6. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
wangliyu May 30, 2013 7:36 AM (in response to rzvikas)1 of 1 people found this helpfulIf the 3rd jars doesn't have beans.xml, you don't have to if you using Remote/Managed container, you can just put them into JBoss domain/lib, it will load in there, this way it will be faster to do the test.
I have done in JBAS6 Remote, I found the embed one is always trouble, if you have CDI jars (with beans.xml), embed container's Weld BeanManager try to scan and load anything twice, and you will get a lot unexpected excecptions.
-
7. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas Jun 1, 2013 11:47 PM (in response to wangliyu)Remote connector looks better but still can not find my other classes like my custom jar classes and even 3rd party jars classes like hibernate.jar classes etc
I have tried putting all 3rd party jars into
1) %JBOSS_HOME%/domain/lib folder
2) %JBOSS_HOME%/standalone\lib
This feature should be there if we are using jboss remote server to run our test then it should not be required to bundle all the jars as part of ShrinkWrap artifact.
-
8. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas May 31, 2013 9:42 AM (in response to rzvikas)hi Wang, Could you please let me know where did you add 3rd party jars in JBOSS_HOME
In my test I have included only mypackage which has classes referencing classes from 3rd party jars
@Deployment
public static JavaArchive createTestArchive() {
return ShrinkWrap.create(JavaArchive.class, "testjar")
.addPackages(true, "com.xyz.mypackage")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
-
9. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas Jun 3, 2013 2:19 PM (in response to rzvikas)Any comments on How can I add my 3rd party jars in my JBOSS so that I do not need to bundle it as part of my Arquillian / ShrinkWrap deployment ?
-
10. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
bmajsak Jun 4, 2013 7:01 AM (in response to rzvikas)1 of 1 people found this helpfulYou can add them as modules and refer to them in your app through jboss-deployment-structure.xml descriptor, here's an example with Hibernate.
-
11. Re: Arquillian - Gradle - JBOSS 7.2.0.Final - Testing simple injection with lot of 3rd party jars
rzvikas Oct 9, 2013 2:19 PM (in response to bmajsak)It worked well but I think there was some open JIRA about this to fix this problem properly. Do you know if this is already done or the JIRA link for the same ?