you'll need to declare a dependency to 'org.apache.log4j'. You can do this by adding a manifest header like this:
Adding this dependency should enable your application to deploy but to be able to customize logging you'll need to package log4j with your deployment or as a separate deployment/module. The reason for this is that log4j needs to be initialized with your custom log4j.xml, and if you only specify a dependency to the module 'org.apache.log4j', log4j will have been initialized before your module is deployed and your custom logging configuration will not be considered. For an example of this you can take a look at this application, see the section "Custom logging" for details.