0 Replies Latest reply on Mar 19, 2014 3:16 PM by jee-developer

    Add another projectmodul to Micro-Deployment

    jee-developer Newbie

      Hi,

      i develope an JEE Enterprise Application with Maven. My Project has the following structure:

      • Exapmple-ear - Enterprise Module
      • Example-ejb - EJB Module
      • Example-war Web Module

       

      I want to write an integration test in the war module, to test the access of an CDI Managed Bean. The war module has access to the business logic and database over the ejb module. This module is declared as a dependency in the pom data of the war module.

       

      Now i wanted to create a micro-deployment for my Arquillian test, so i have to inject the ejb Module to my deployment. The idea is to use the ShrwinkWrap Resolver to get it vom the pom File. This was my try:

       

      JavaArchive jar = Maven.resolver().loadPomFromFile("pom.xml").resolve("de:Example-ejb:ejb:1.0").withoutTransitivity().asSingle(JavaArchive.class);

       

      But i got an exception, that it is not found in repository x, y and z, which are decalared int he pom file. I guess this code is only used for injection of third-party archives, that are in a repository?!

       

      So my question is how do i inject a module of my enterpise application, so that all EJB's from the business logic and ,for example, the persistence.xml file are available in the microdeployment?

       

      Edit: Solution was further discussed here: Questions about testing EAR maven multi module project