1 Reply Latest reply on Apr 21, 2012 5:55 AM by Stephen Coy

    Where's the best place to put a resource in an EAR on JBoss AS 7?

    Steven Boscarine Apprentice

      Hello All,

      I am porting an ear from JBoss EAP 4.3 to JBoss AS 7 (and then EAP 6, once it's available).

       

      Our application has multiple wars that need to access a config file.  We use the following syntax:

      getClass().getClassLoader().getResource(CONFIG_FILE);
      

      and put the config file in our Maven project under /${ear-project-root}/src/main/application/APP-INF/classes. 

       

      Under src/main/application/META-INF/application.xml, we have:

        <module>
          <java>APP-INF/classes</java>
        </module
      

       

      This used to work in 4.3, but now I get:

      JBAS014775:New missing/unsatisfied dependencies: service jboss.deployment.subunit."app.ear".APP-INF/classes.STRUCTURE (missing) dependents: [service jboss.deployment.unit."app.ear".PARSE]
      

      I can see in the target directory that there's definitely an APP-INF/classes with files in it.

       

      I just need a folder where I can stick configs and have multiple wars access them.  I don't much care where it is.

       

      Any advice on how to create a shared config folder in an ear?

       

      Thanks in advance,

      Steven