2 Replies Latest reply on Jul 29, 2011 7:33 AM by Aliaksei Lahachou

    How can i add a jar to my war?

    gg cc Newbie



      I am trying to run my test with arquillian in jboss 6.0.


      Everything is working fine now but i would like to do another thing.


      I am using gson library and i would to like to add the jar to my test.war


      How can i do it?


      AddAsLibrary? AddAsWebInfResource???


      Thanks in advance.

        • 1. Re: How can i add a jar to my war?
          gg cc Newbie

          WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war").






                                                          addAsResource(new File("src/test/resources/persistence.xml"), ArchivePaths.create("META-INF/persistence.xml"));


          I would like to change the addPackages and to put only addJar or something similar....is it possible?



          • 2. Re: How can i add a jar to my war?
            Aliaksei Lahachou Newbie

            You may use Maven dependency resolver. For example:


            WebArchive web = ShrinkWrap.create(WebArchive.class)