2 Replies Latest reply on Apr 13, 2012 6:00 AM by benfarr

    Expand WAR or EAR files in jBoss AS 7 in deploy process

    balizeiro

      I'm deploying a WebService project into a jBoss AS7, and everything goes OK except that jBoss doesn't expand my WAR or EAR file.

      Already tried copying the file to the "jboss-as-7.1.0.Final\standalone\deployments" folder and using the WebConsole, but in both cases the result was the same.

      If I deploy from within Eclipse everything runs OK.

      I need it to expand my file because in the application initialization I scan the class directories looking for the correct class to instantiate using reflection.

      As a simple test I added a System.out with the execution path

         MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath();

      and it returns the following path

         C:\jboss-as-7.1.0.Final\bin\content\ServerEAR.ear\Server.war\WEB-INF\classes

      witch doesn't exist. So I did a search for the class name and fount it at

         C:\jboss-as-7.1.0.Final\standalone\tmp\vfs\deployment5a9e98d5c43716c3\Server.war-e31a657d2bc3bd0f\WEB-INF\classes\r30

      Isn't it possible to force JBoss to extract the files to the deployment folder? Or how can I get the previous path at run time?

       

      Thanks in advance