4 Replies Latest reply on Aug 29, 2011 9:21 AM by Aslak Knutsen

    Adding all files from a directory to an archive

    Aliaksei Lahachou Newbie

      Hello World!

       

      I want to add a bunch of files from a directory in my project to the deployed archive, but I coudn't find any simple way to do it. In my case, I want to deploy a bunch of JSP's for testing as Web resources, but I can imagine that people may want package resources in JAR as well. Currently, I use addAsWebResource, but there are 2 things that I don't like about it:

       

      • I have to list every file I want to deploy;
      • ClassLoader is used to load resources (I think both points are somehow related )).

       

      Am I missing something? Or is there really no way to simply add all files from a directory?