2 Replies Latest reply on Apr 10, 2013 7:48 PM by Andrew Rubinger

    Shrinkwrap + Maven

    David Landes Newbie

      I've been trying to find out how to solve this issue and I'm hoping that someone can help me out. I am using shrinkwrap-resolver-impl-maven version 2.0.0-beta-3 and I can't seem to include the dependencies from the parent pom.xml.

       

      parent pom.xml

          

      <dependency>
           <groupId>parent.dependency</groupId>
           <artifactId>awesome.sauce.jar</artifactId>
           <version>1.1.1</version>
      </dependency>
      

       

      There are no problems obtaining the dependencies from the child pom.xml with the following code.

       

      final File settingsXml = new File(new File(System.getProperty("user.home"), ".m2"), "settings.xml");
      File[] runtimeLibs = Maven.configureResolver().fromFile(settingsXml).loadPomFromFile("pom.xml").importRuntimeAndTestDependencies().as(File.class);
      ear.addAsLibraries(runtimeLibs);
      

       

      But, I seem to get the following error when I try to deploy it to jboss.

       

      java.lang.ClassNotFoundException: parent.depencency.awesome.sauce.jar from [Module "deployment.test.ear.child-jar.jar:main" from Service Module Loader]
      

       

      Any help would be most beneficial!