3 Replies Latest reply on Apr 26, 2016 11:38 AM by James Perkins

    jboss-as-maven-plugin changing deployment folder

    Carlos Carbonell Newbie

      I'm using jboss-as-maven-plugin to deploy an application to my local JBoss EAP 6.1+ server using the following code:

      <plugin>

      <groupId>org.jboss.as.plugins</groupId>

      <artifactId>jboss-as-maven-plugin</artifactId>

      <version>7.7.Final</version>

      <configuration>

      <jboss-home>C:/Users/user/Software/jbdevstudio/runtimes/jboss-eap</jboss-home>

      </configuration>

      </plugin>

      My issue comes because the app is first deployed into this folder (A):

      C:\Users\user\Software\jbdevstudio\runtimes\jboss-eap\bin\content\myapp.war\

      And when the deployment finishes, it's being copied to this one (B):

      C:\Users\user\Software\jbdevstudio\runtimes\jboss-eap\standalone\tmp\vfs\temp\temp99a677decc64238a\content-2afbd3c37fb9c431\

      Then, when I try to read a file that is in the classpath:

      URL urlFilePath = this.getClass().getResource(fileName);

      I get a path that points to folder A, so creating an InputStream is throwing a FileNotFoundException since now that file is in folder B.

      Is there a workaround or a way to avoid the deployment being copied?