我有一个名为myproject.jar的jar,它是使用maven构建的,其中包含对junit,logger和Nexus的依赖关系
现在,如果我创建了一个需要获取该jar的ant项目,那么我确实添加了IVY设置,nexus依赖关系,并将该jar与另一个jar以及Junit和logger一起放在了本地计算机上。
那么有什么办法我只能得到myproject.jar,而我不应该获得Junit和logger
build.xml
<target name="resolve" description=" retrieve dependencies with Ivy">
<ivy:settings file="ivysettings.xml" />
<ivy:retrieve/>
</target>
ivy.xml
<ivy-module version="2.0">
<info organisation="com.test" module="myproject"/>
<dependencies>
<dependency org="com.test" name="myproject" rev="2.0"/>
</dependencies>
</ivy-module>
ivySetting.xml
<ivysettings>
<settings defaultResolver="nexus"/>
<resolvers>
<ibiblio name="nexus-public" m2compatible="true" root="http://localhost:8081/nexus/content/groups/public"/>
<ibiblio name="nexus" m2compatible="true" root="http://localhost:8081/nexus/content/repositories/snapshots"/>
<ibiblio name="nexus-releases" m2compatible="true" root="http://localhost:8081/nexus/content/repositories/releases"/>
</resolvers>
</ivysettings>