我有一个项目构建与ant使用常春藤依赖管理.我没有ivysetting文件,但是具有以下依赖关系的ivy.xml(我想使用
spring with slf4j而不是commons logging):
<configurations> <conf name="compile" /> <conf name="runtime" extends="compile"/> </configurations> <dependencies> <dependency org="org.springframework" name="spring-webmvc" rev="3.0.5.RELEASE" conf="compile->default"> <exclude org="commons-logging" name="commons-logging"/> </dependency> <dependency org="org.slf4j" name="slf4j-api" rev="1.6.1" conf="compile->default" /> <dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.6.1" conf="runtime->default" /> </dependencies>
但是在解析编译配置时,commons-logging已解决.我也试图在显式的spring-core依赖中使用exclude,但是commons-logging总是放在编译类路径中.
我的错是什么是不是Not Using Commons Logging描述了maven?它是常春藤虫吗?需要我一个特殊的设置?常春藤有东西缓存吗?任何想法?
我使用ant 1.8.2和ivy 2.2.0,在Eclipse中使用IvyDE也有同样的问题.
您使用< exclude />似乎因为未知的原因而被打破.我在我的电脑上尝试过类似的东西,以下工作:
尝试 the top-level exclude(它直接位于< dependencies /> ;::
尝试 the top-level exclude(它直接位于< dependencies /> ;::
<dependencies> <dependency org="org.springframework" name="spring-webmvc" rev="3.0.5.RELEASE" conf="compile->default"> </dependency> <dependency org="org.slf4j" name="slf4j-api" rev="1.6.1" conf="compile->default" /> <dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.6.1" conf="runtime->default" /> <exclude org="commons-logging"/> </dependencies>
我不知道为什么另一个不工作. JIRA中有一些关于排除和循环依赖的错误,但这似乎并不适合这种情况.也许这是一个真正的错误.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。