<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Just a stab in the dark here, but have you tried using a "provided"
scope? That keeps it from being added to your war, or whatever, and
says that it will be provided by the runtime environment.<br>
<br>
<dependency><br>
<groupId>commons-logging</groupId><br>
<artifactId>commons-logging</artifactId><br>
<br>
<!-- use provided scope on real JCL. --><br>
<!-- ensures it's not inadvertently pulled in, --><br>
<!-- so that we can use jcl-over-slf4j. --><br>
<br>
<version>1.1.1</version><br>
<br>
<scope>provided</scope><br>
</dependency><br>
<br>
<dependency><br>
<groupId>commons-logging</groupId><br>
<artifactId>commons-logging-api</artifactId><br>
<br>
<!-- use provided scope on real JCL. --><br>
<!-- ensures it's not inadvertently pulled in, --><br>
<!-- so that we can use jcl-over-slf4j. --><br>
<br>
<version>1.1</version><br>
<br>
<scope>provided</scope><br>
</dependency><br>
<br>
<br>
On 2011-08-12 07:20, Douglas Ferguson wrote:
<blockquote
cite="mid:B954151C-070A-40EC-B8FD-B13FA49EA8F3@gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>I'm migrating a spring project from a hybrid of log4j and
commons logging. I'd like to make sure that developer don't
inadvertently use commons-logging or log4j directly</div>
<div><br>
</div>
<div>I ran the migrator. It worked great</div>
<div><br>
</div>
<div>I added exclusions to my pom, <font class="Apple-style-span"
color="#f60000">but eclipse still finds the commons-logging
jar</font> and when a run maven dependency:tree it still shows
up:</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>[INFO] +-
org.springframework.ws:spring-ws-core:jar:2.0.0.RELEASE:compile</div>
<div>[INFO] | +- wsdl4j:wsdl4j:jar:1.6.1:compile</div>
<div>[INFO] | \-
commons-logging:commons-logging:jar:1.1.1:compile</div>
</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><dependency></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><groupId>org.springframework.ws</groupId></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><artifactId>spring-ws-core</artifactId></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><version>${spring-ws-version}</version></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><type>jar</type></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><scope>compile</scope></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><exclusions></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><exclusion></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><groupId>commons-logging</groupId></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><artifactId>commons-logging</artifactId></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></exclusion></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></exclusions><span
class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></dependency></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I also added this so that any dependencies that are using
commons-logging will be ok</div>
<div><br>
</div>
<div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>dependency<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span> </span><span
style="color: #009494"><</span>groupId<span style="color:
#009494">></span><span style="color: #000000">org.slf4j</span><span
style="color: #009494"></</span>groupId<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span> </span><span
style="color: #009494"><</span>artifactId<span
style="color: #009494">></span><span style="color:
#000000">jcl-over-slf4j</span><span style="color: #009494"></</span>artifactId<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span> </span><span
style="color: #009494"><</span>version<span style="color:
#009494">></span><span style="color: #000000">1.6.1</span><span
style="color: #009494"></</span>version<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"></</span>dependency<span
style="color: #009494">></span></div>
</div>
<div><br>
</div>
<div>Here's my other logging dependencies</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(77, 110, 205); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><!-- slf4j
--></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>dependency<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; "><span class="Apple-tab-span" style="white-space:pre">
</span><span style="text-decoration: underline"><groupId>org.slf4j</groupId></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; "><span style="text-decoration: underline"><span
class="Apple-tab-span" style="white-space:pre"> </span><artifactId>slf4j-api</artifactId></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; "><span style="text-decoration: underline"><span
class="Apple-tab-span" style="white-space:pre"> </span><version>1.6.1</version></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>type<span style="color:
#009494">></span><span style="color: #000000">jar</span><span
style="color: #009494"></</span>type<span style="color:
#009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; "><span class="Apple-tab-span" style="white-space:pre">
</span><span style="color: #009494"><</span><span
style="color: #339393">scope</span><span style="color:
#009494">></span>compile<span style="color: #009494"></</span><span
style="color: #339393">scope</span><span style="color:
#009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"></</span>dependency<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>dependency<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>groupId<span style="color:
#009494">></span><span style="color: #000000">org.slf4j</span><span
style="color: #009494"></</span>groupId<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>artifactId<span
style="color: #009494">></span><span style="color:
#000000">slf4j-log4j12</span><span style="color: #009494"></</span>artifactId<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>version<span style="color:
#009494">></span><span style="color: #000000">1.6.1</span><span
style="color: #009494"></</span>version<span
style="color: #009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"><</span>type<span style="color:
#009494">></span><span style="color: #000000">jar</span><span
style="color: #009494"></</span>type<span style="color:
#009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; "><span class="Apple-tab-span" style="white-space:pre">
</span><span style="color: #009494"><</span><span
style="color: #339393">scope</span><span style="color:
#009494">></span>compile<span style="color: #009494"></</span><span
style="color: #339393">scope</span><span style="color:
#009494">></span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom:
0px; margin-left: 0px; font: normal normal normal 11px/normal
Monaco; color: rgb(51, 147, 147); "><span style="color:
#000000"><span class="Apple-tab-span"
style="white-space:pre"> </span></span><span
style="color: #009494"></</span>dependency<span
style="color: #009494">></span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
slf4j-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a>
<a class="moz-txt-link-freetext" href="http://qos.ch/mailman/listinfo/slf4j-user">http://qos.ch/mailman/listinfo/slf4j-user</a></pre>
</blockquote>
</body>
</html>