0 Replies Latest reply on Jun 3, 2012 10:27 AM by jmnarloch

    Artifact packager


      I would like to start a discusion on a additional for the Arquillian. There was already a idea for the Seam extension and similary for the Spring one to enable configuring the packaged bundles.

      I see the need of such feature, considering the Spring extension for example, by default only two artifacts are beeing auto package: spring-context and spring-web that fullfills only simple scenearios of testing injected beans. Spring is beeing divided in vast number of artifact so packaging them all with each deployment dosen't seem to have much sense either.

      So in real world situations it makes much more sense for the user to disable the auto packaging and add all the required artifacts for each deployment.


      I would propose a similar solution the the one described in Seam topic but in different form, instead letting each extension handle the artifact on it own I would rather add a new "core" service configured through arquillian.xml. The so called "packager" would not be limited to maven artifacts but could be also configured to add files from the file system. The neat thing would be provide the "packager" API so that each extension could register default set of required artifacts like for example jboss-seam-jsf or spring-context. The user could then add the additional artifacts for the tests with the help of arquillian.xml.


      Example of configuration (the naming of the tags are need to be agreed):



      <?xml version="1.0" encoding="UTF-8"?>

      <arquillian xmlns="http://jboss.org/schema/arquillian"







              <!-- Adds the maven artifact -->

              <artifact name="org.springframework:spring-context:3.1.1.RELEASE"/>


              <!-- Adds the file from file system -->

              <file path="/target/mylib.jar" />


              <!-- A shortcut for imporitng the pom dependencies may have additional properties like i.e. "exclusions" -->

              <importMavenDependencies />