maven - ShrinkWrap load libraries from POM for JavaArchive -


I am working on the Multi Maven module project And I'm using unit tests to use Arquilion. So far, everything is fine because I am also adding dependencies to my test class with my modules and other dependent modules.

Example:

  .addPackages (true, "com.test.pk2") .addPackages (true, "com.test.pk1")   

Like to do this

To simplify your unit tests, I shrink wrapping the Maven dependency resolver I

  File [] crLibs = Maven.resolver (). LoadPomFromFile ("pom.xml"). ImportRuntimeAndTestDependencies (). AsFile ();   

But I ran into some issues:

  1. I was not able to merge Java record in my final archive, and the last collection is not incapable to deploy.
  2. I do not get much support for Java archives.
  3. If I try to add jar files to the final collection, I was running in java.lang.IncompatibleClassChangeError.

    Am I missing anything or what is wrong with it, can anyone help with it?

    More on Technologies: Shrinkwrap 2.0.0 Glassfish 3.1.2.2 Maven 2.2.1

    JavaScript [] Dependency = Maven.configureResolver (). Offline () LoadPopFileFile (POM) .importRuntimeDependencies () .resolve () WithTransitivity () As (JavaArchive.class);

    I solved this way and it is working now.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -