title: Add log4j maven dependency to war without having it in compile time
body: <p>Our application uses slf4j, but has dependency to </p>
  
  <ol>
  <li>slf4j api</li>
  <li>slf4j over log4j</li>
  <li>log4j</li>
  </ol>
  
  <p>The problem is that very often IDE imports classes from log4j and not from slf4j.
  Ideally, i want to have only slf4j api as a maven dependency for my application and pack slf4j binding with log4j only at the time i building a war.</p>
  
  <p>I found several solutions so far:</p>
  
  <ol>
  <li>Add libs to WEB-INF/lib folder. This is bad, because i have no maven dependency control and have to store binary in my repo which is not the best thing to do.</li>
  <li>Use maven-war plugin with overlays. But as i understand adding dependency to overlay will require to declare dependency (at least as compile)</li>
  </ol>
  
  <p>Is it ok to have only dependency for slf4j api? How to package other dependencies to war without declaring them as project dependencies?</p>
  
  <p>Thanks!</p>