We are using log4j for application logging and maven for application packaging. As we have 3-4 application being deployed as a part of an EAR the size of the EAR is large. We were trying to go with the 'Skinny War's' approach but faced a problem with log4j. We used to log application logs in different file for each application but with Skinny WAR's as the classes of log4j are being loaded only once, only one log file is being created and log of each application is being appended to the same log file.
We thought of the famous solution of packaging log4j.jar in each WAR but then we'll have to move every jar file which needs the log4j in WAR ex. spring jar's this essentially will increase the EAR size.
Is there any alternate solution to this problem ? Any suggestion would be a great help.
Thanks.
Resolved the issue with RepositorySelectors. Check this