make ivy not to download sources and license files

被刻印的时光 ゝ 提交于 2019-11-29 15:33:22

Use ivy configurations to specify your desired mapping to the dependencies of your dependencies (Called transitive dependencies):

Don't know what version of spring you're using, this example downloads spring version 3.0:

<ivy-module version="2.0">
    <info organisation="com.myspotontheweb" module="demo"/>
    <configurations>
        <conf name="compile" description="Compile classpath"/>
    </configurations>
    <dependencies>
        <dependency org="org.springframework" name="org.springframework.core" rev="3.0.0.RELEASE" conf="compile->default"/>
    </dependencies>
</ivy-module>

When referencing a Maven module configurations refer to Maven scopes. The default scope in Maven would be compile, but you can reference any other public scope.

Additional note

I'm using a much simpler settings file:

<ivysettings>
    <settings defaultResolver="chain"/>
    <resolvers>
        <chain name="chain">
            <ibiblio name="central" m2compatible="true"/>
            <ibiblio name="spring-release"  root="http://repository.springsource.com/maven/bundles/release" m2compatible="true"/>
            <ibiblio name="spring-external" root="http://repository.springsource.com/maven/bundles/external" m2compatible="true"/>
        </chain>
    </resolvers>
</ivysettings>

In my opinion the ibiblio resolver is the easiest way to integrate with a remote Maven repository. I think the confusing name is historical, dating back to the original name of the first Maven repository site. You'll need to additionally specify the m2compatible attribute, since the original Maven 1 repository format is now almost unknown.

Perhaps one day the ivy developers will create a new "maven" resolver that will make life easier for new users.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!