-
1. Re: JBoss AS 7.2 - Is there a way to exclude CDI/WELD an implied dependency?
pgmjsd Dec 26, 2013 1:20 PM (in response to pgmjsd)I tried adding the following exclusions to META-INF/jboss-deployment-structure.xml, but it's still starting Weld when deploying the EAR:
<module name="org.jboss.interceptor" slot="main"/> <module name="org.jboss.as.weld" slot="main"/> <module name="org.jboss.weld.core" slot="main"/> <module name="org.jboss.weld.api" slot="main"/> <module name="org.jboss.weld.spi" slot="main"/>
So the complete file looks like this:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <exclusions> <module name="javax.faces.api" slot="main"/> <module name="com.sun.jsf-impl" slot="main"/> <module name="org.hibernate" slot="main"/> <module name="org.hibernate.validator" slot="main"/> <module name="org.jboss.interceptor" slot="main"/> <module name="org.jboss.as.weld" slot="main"/> <module name="org.jboss.weld.core" slot="main"/> <module name="org.jboss.weld.api" slot="main"/> <module name="org.jboss.weld.spi" slot="main"/> </exclusions> <dependencies> <module name="org.apache.log4j" export="true"/> <module name="org.dom4j" export="true"/> <module name="org.slf4j" export="true"/> <module name="javax.faces.api" slot="1.2" export="true"/> <module name="com.sun.jsf-impl" slot="1.2" export="true"/> <module name="org.hibernate" slot="3" export="true"/> <module name="org.apache.commons.logging" export="true"/> </dependencies> </deployment> <sub-deployment name="pep-web.war"> <exclusions> <module name="javax.faces.api" slot="main"/> <module name="com.sun.jsf-impl" slot="main"/> <module name="org.hibernate" slot="main"/> <module name="org.hibernate.validator" slot="main"/> <module name="org.jboss.interceptor" slot="main"/> <module name="org.jboss.as.weld" slot="main"/> <module name="org.jboss.weld.core" slot="main"/> <module name="org.jboss.weld.api" slot="main"/> <module name="org.jboss.weld.spi" slot="main"/> </exclusions> <dependencies> <module name="org.hibernate" slot="3"/> <module name="javax.faces.api" slot="1.2"/> <module name="com.sun.jsf-impl" slot="1.2"/> </dependencies> </sub-deployment> </jboss-deployment-structure>
-
2. Re: JBoss AS 7.2 - Is there a way to exclude CDI/WELD an implied dependency?
ctomc Dec 27, 2013 12:58 PM (in response to pgmjsd)No need to complicate that much.
simply exclude weld subsystem to be applied to your deployment.
this config should do:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="weld" />
</exclude-subsystems>
</deployment>
<sub-deployment name="myapp.war">
<exclude-subsystems>
<subsystem name="weld" />
</exclude-subsystems>
</sub-deployment>
</jboss-deployment-structure>
-
3. Re: JBoss AS 7.2 - Is there a way to exclude CDI/WELD an implied dependency?
pgmjsd Dec 27, 2013 8:31 PM (in response to ctomc)Thanks, that is exactly what I was looking for! I'll give it a try on Monday.
-
4. Re: JBoss AS 7.2 - Is there a way to exclude CDI/WELD an implied dependency?
pgmjsd Dec 31, 2013 3:30 PM (in response to ctomc)Hm... looks like the 1.2 XSD thinks I should have some extra elements in there, like <module-alias>. My IDE is giving me a red-flag on the <deployment> and <sub-deployment> elements. I guess I could ignore that, or maybe I have the wrong XSD? I followed the link from JBossDTDs
Anyway, changing the XSD reference and adding the <exclude-subsystems> elements to both <deployment> and <subdeployment> sections worked! My Seam 2 app now starts up just fine in AS 7.2, even when guava.jar is in the EAR lib directory.