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:
- I was not able to merge Java record in my final archive, and the last collection is not incapable to deploy.
- I do not get much support for Java archives.
- 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
Post a Comment