title: Forcing maven spring boot project to use older version of a dependency instead of a new version from another dependency
body: <p>I'm running in to a problem where I cannot start a spring boot server due to the same problem listed in this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/40389512/how-to-set-up-spring-boot-and-log4j2-properly">How to set up Spring Boot and log4j2 properly?</a></p>
  
  <p>I am encountering this scenario because the spring boot project has a dependency on a jar that includes elasticsearch, which includes a new version of slf4j that isn't compatible with spring boot</p>
  
  <p>I tried the recommended solution by implementing every exclusion in the elasticsearch project dependency definition possible, but for some reason the new version keeps being picked up.  I cannot seem to force the spring boot project to ignore the logging packages used by the elasticsearch project.</p>
  
  <p>Here is my pom for the spring-boot project, see the dependency for problematic.project.import : <a href="http://pastebin.com/Yeq2qk9Y" rel="nofollow noreferrer">http://pastebin.com/Yeq2qk9Y</a></p>
  
  <p>Here is the pom for the project that is being imported into the spring boot project: <a href="http://pastebin.com/gknmf6Tt" rel="nofollow noreferrer">http://pastebin.com/gknmf6Tt</a></p>
  
  <p>The error I am getting is: </p>
  
  <pre><code>Caused by: java.lang.NoSuchMethodError: org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(Lorg/apache/logging/log4j/core/config/ConfigurationSource;)Lorg/apache/logging/log4j/core/config/Configuration;
  at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.loadConfiguration(Log4J2LoggingSystem.java:165)
  at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.loadDefaults(Log4J2LoggingSystem.java:148)
  at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:75)
  at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:50)
  </code></pre>
  
  <p>Any tips on how to get this issue cleared?  Is this possible for two versions of this set of libraries to be loaded, each module ignorant to the version they don't need?</p>