-
1. Re: Question about how "jboss-deployment-structure.xml" works
wdfink Feb 23, 2012 2:07 AM (in response to markus78)Do you add 'org.apache.log4j' to the global-modules of the standalone/domain configuration? By default log4j is not loaded.
-
2. Re: Question about how "jboss-deployment-structure.xml" works
markus78 Feb 23, 2012 2:11 AM (in response to wdfink)No I don't add log4j in any global module, log4j gets loaded anyway this changed somewhere between CR1b and 7.1.Final , im on Final version.
But the main question for me is the one about the deployment-structure, why do I have to specify each subdeployment when I have the "toplevel" exclusion inplace.
-
3. Re: Question about how "jboss-deployment-structure.xml" works
markus78 Feb 28, 2012 6:00 AM (in response to markus78)Im bumping this, Is it really neccesary to specify each subdeployment to exclude log4j from my ear?
-
4. Re: Question about how "jboss-deployment-structure.xml" works
swd847 Feb 28, 2012 4:32 PM (in response to markus78)At the moment yes. Can you file a JIRA and I will look at fixing this?
-
5. Re: Question about how "jboss-deployment-structure.xml" works
markus78 Feb 29, 2012 1:13 AM (in response to swd847)Sure, I created the issue https://issues.jboss.org/browse/AS7-3955
-
6. Re: Question about how "jboss-deployment-structure.xml" works
zhouyaguo Aug 28, 2013 5:02 AM (in response to markus78)A late reply, but hope it helps:
Alternative is that you can hack the code as follows:
diff --git a/server/src/main/java/org/jboss/as/server/deployment/module/ModuleSpecProcessor.java b/server/src/main/java/org/jboss/as/server/deployment/module/ModuleSpecProcessor.java
index b4a168e..798a638 100644
--- a/server/src/main/java/org/jboss/as/server/deployment/module/ModuleSpecProcessor.java
+++ b/server/src/main/java/org/jboss/as/server/deployment/module/ModuleSpecProcessor.java
@@ -91,6 +91,11 @@ public class ModuleSpecProcessor implements DeploymentUnitProcessor {
// Add internal resource roots
final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
+
+ // make org.apache.log4j module excluded by default. we always take along our own log facade and log configuration file, so we should tell AS not to take over logging of ear or war
+ // Yaguo Zhou
+ moduleSpec.addExclusion(ModuleIdentifier.create("org.apache.log4j"));
+
final List<ResourceRoot> resourceRoots = new ArrayList<ResourceRoot>();
if (ModuleRootMarker.isModuleRoot(mainRoot)) {
resourceRoots.add(mainRoot);
so that we don't need jboss-deployment-structure.xml anymore in your deployment.
If you don't want AS to scan logging configuration file in your deployment, remember to set -Dorg.jboss.as.logging.per-deployment=false