ivy解析依赖失败
用了ivy管理项目依赖,但是添加依赖
<dependency org="org.springframework" name="spring-webmvc" rev="3.1.1.RELEASE"/>
的时候老是提示解析错误,其中一行信息
unresolved dependency: javax.mail#mail;1.4: not found
后尝试修改了本地nexus版本,竟然解决了(后来发现这不是问题)
旧版本:nexus-oss-webapp-1.9.0.2
新版本:nexus-2.0.4-1
?
?
又研究了下,仍然有问题,ivy添加依赖的时候,必须制定配置,并且要和依赖项目的配置匹配才行,否则导致解析的时候范围过大,导致解析依赖失败,这点ivy不如maven好用
?
??? <configurations >
??? ??? <!--these match the Maven configurations-->
??? ??? <conf name="default"??? visibility="public"??? ??? extends="runtime,master" />
??? ??? <conf name="master"??? ??? visibility="public" />
??? ??? <conf name="compile"??? visibility="public" />
??? ??? <conf name="provided"??? visibility="public" />
??? ??? <conf name="runtime"??? visibility="public"??? ??? extends="compile" />
??? ??? <!-- Private configurations -->
??? ??? <conf name="test"??? ??? visibility="private"??? extends="runtime" />
??? </configurations>
?
<dependency org="org.springframework" ??? ??? ??? name="spring-aop" ??? ??? ??? ??? ??? rev="3.1.1.RELEASE" ??? conf="default"/>