0 Replies Latest reply on Aug 13, 2015 9:39 PM by om.singh.is

    jboss-deployment-structure configuration to allow EAR jars preferred

    om.singh.is

      I have jars within my ear lib which need to be preferred over the application server similar jars like xalan, xerces etc. Weblogic allows this to done as below and the application works fine now in weblogic - with the configuration below


      <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.oracle.com/technology/weblogic/920/weblogic-application.xsd">
        
      <xml>
        
      <parser-factory>
        
      <saxparser-factory> org.apache.xerces.jaxp.SAXParserFactoryImpl </saxparser-factory>
        
      <document-builder-factory> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl </document-builder-factory>
        
      <transformer-factory> org.apache.xalan.processor.TransformerFactoryImpl </transformer-factory>
        
      </parser-factory>
        
      </xml>
        
      <prefer-application-packages>
        
      <package-name>org.opensaml.*</package-name>
        
      <package-name>org.apache.xerces.*</package-name>
        
      <package-name>org.apache.xalan.*</package-name>
        
      </prefer-application-packages>
      </weblogic-application>


      I need to do the same with jboss so that it excluded the similar jars which are present within its own library. I have tried the below

      <?xml version="1.0" encoding="UTF-8"?>  
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">  
        
      <ear-subdeployments-isolated>true</ear-subdeployments-isolated>  
        
      <deployment> 
        
      <dependencies> 
        
      <module name="deployment.javaee.api" /> 
        
      </dependencies>  
        
      <exclusions> 
        
      <module name="javaee.api" /> 
        
      </exclusions> 
        
      </deployment>  
        
      <module name="deployment.javaee.api"> 
        
      <dependencies> 
        
      <module name="javaee.api" export="true"> 
        
      <imports> 
        
      <exclude path="org/opensaml/**" /> 
        
      <exclude path="org/apache/xerces/**" />
        
      <exclude path="org/apache/xalan/**" />
        
      </imports> 
        
      </module> 
        
      </dependencies> 
        
      </module>  
      </jboss-deployment-structure>


      Still it seems to pick up the jboss jars for xerces , xalan and opensaml. In case you have done such things before in JBOSS, your suggestion will be really appreciated.