0 Replies Latest reply on Sep 25, 2013 12:26 PM by Richard Emerson

    Testing a Maven webapp project in Jetty without a Deployment?

    Richard Emerson Newbie

      Hi,

       

      I have a Maven project which builds a webapp.  Jetty-maven-plugin is cleverly able to run an embedded Jetty instance directly on the webapp project, without building a .war file.  The Jetty plugin has all the information it needs in the pom.xml to create a Jetty context that runs the webapp directly from the checked-out (and compiled) project on disk.  Instead of packing dependency jars into a .war it points straight at the ones in the local Maven repository, and instead of copying the project's web resources and web.xml into a .war it points straight at /src/main/webapp etc.  This is great for running quick test cycles.

       

      Ideally I'd like to do the same thing with Arquillian (and maybe Shrinkwrap): instead of using the Shrinkwrap MavenImporter to run an embedded Maven build to produce a complete WebArchive for my @Deployment (which is slow and painful, especially inside IDEs), I want the Jetty container extension to run Jetty directly on my project.

       

      It seems like this should be possible, but I have no idea where to start plugging this kind of behaviour into Arquillian (and/or Shrinkwrap).

       

      There are some hints in an earlier discussion, "Can't @Deployment methods be optional?" at https://community.jboss.org/message/623715#623715 -- but I don't understand what a Shrinkwrap "Descriptor" really represents, or what it should look like (would I need to provide a new implementation of Descriptor?)

       

      I guess the Jetty container extension would then need to understand the new kind of deployment Descriptor... does that sound right?  Alternatively, could the Jetty container extension do this by itself?  Perhaps I would need to write a whole other Jetty container extension?

       

      Any and all advice gratefully received...

       

      Many thanks,

      Richard