Manoj
Manoj

Reputation: 5867

How to add a folder to JBOSS EAP 6 Classpath

I tried below approach, but didnt succeed to retrieve my properties file into inputstream.

https://developer.jboss.org/wiki/HowToPutAnExternalFileInTheClasspath

My project : https://github.com/manojp1988/Learning/tree/master/Sample

Jboss folder structure:

enter image description here

Upvotes: 0

Views: 5659

Answers (2)

Manoj
Manoj

Reputation: 5867

I just figure out the issue.

If I put my jboss-deployment-structure.xml in WEB-INF of WAR, i have to specify and put my dependencies inside it.

If I put my jboss-deployment-structure.xml in META-INF of EAR, i have to specify and put my dependencies inside it.

Upvotes: 0

Federico Sierra
Federico Sierra

Reputation: 5208

You need add your module to your application classpath (step 3 of How to put an external file in the classpath):

Add your module to your application classpath in a jboss-deployment-structure.xml file

<?xml version="1.0" encoding="UTF-8"?>  
<jboss-deployment-structure>  
  <deployment>  
    <dependencies>  
      <module name="com.mycompany.configuration" />  
    </dependencies>  
  </deployment>  
</jboss-deployment-structure>  

This file must be placed either in the META-INF directory of your EAR file or the WEB-INF directory of your WAR file. See Class Loading in AS7 for more information.

or add your module to your application classpath using a MANIFEST.MF entry:

Manifest-Version: 1.0
Dependencies: com.mycompany.configuration

Upvotes: 1

Related Questions