title: Correct way to declare multiple scope for Maven dependency?
body: <p>I have a dependency that I want to use in <code>test</code> scope (so that it is in the classpath when I am running unit tests), and in <code>runtime</code> scope (so that I can contain that in WAR/EAR/other packaging for deployment, but not affecting transitive dependency lookup for dependent artifacts).</p>
  
  <p>A real life example is SLF4J's implementation JARs (e.g. <code>Logback</code>).  I want it to exist in the classpath when I am running tests, and I want it to be included in my WAR/EAR, but I don't want project depending on my project to include that in transitive dependency lookup.</p>
  
  <p>I tried to use <code>&lt;scope&gt;test,runtime&lt;/scope&gt;</code> but Maven 3 produces a warning: </p>
  
  <pre><code>[WARNING] 'dependencies.dependency.scope' for org.slf4j:jcl-over-slf4j:jar 
  must be one of [provided, compile, runtime, test, system] but is 'test,runtime'. 
  </code></pre>
  
  <p>What is the right way for declaring the dependency scope in such a case?</p>