1 Reply Latest reply on Sep 16, 2014 4:53 AM by kpiwko

    dependency on another maven project in eclipse workspace

    jjfraney

      We use arquillian to pre-deploy a dependent application before running the target tests.

      So, in the target test class, we have two @Deployment declarations  For the dependent, we use:

           @Deployment(name = "model", order = 1, testable = false)

      and to deploy the classes under test, we use:

           @Deployment(name = "api", order = 2)

      and

           @OperateOnDeployment("api")

       

      Works well, but I have a wish.

       

      I know how to pull the "model" deployment from my maven repository.  I'm using:

           PomEquippedResolveStage stage = Maven.resolver(().loadPomFromFile("pom.xml")

           EnterpriseArchive[] jars = stage.resolve("....:..:ear:?).withoutTransitivity.as(EnterpriseArchive.class)

       

      I would like to pull "model" deployment from my local eclipse workspace.  Consider that "model" and "api" are two different mult-module projects which I have imported into eclipse, and I have a coding task that requires modification to both.  Typically, I make the changes to "model", and run 'mvn deploy' to build and copy the dependent archive into my local repo, then I can make modifications to "api" and run the tests.  This works fine, unless I forget this manual step.

       

      So, I would wish for an automatic mechanism.  To generalize: I have a project and its dependency in my eclipse workspace.  I would like to rerun my project's arquillian tests, after modifying the dependency, and without having to manually 'mvn deploy'.

       

      Currently using arquillian 1.1.1 and shrinkwrap resolvers 2.0.1, eclipse luna, and mvn 3.2.1.

       

      Thanks,

      John