忽略来源罐子常春藤检索 [英] Ignore sources jar in Ivy retrieve

查看:179
本文介绍了忽略来源罐子常春藤检索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想只检索库jar时,我利用我的ivy.xml依赖条目的Red5(或任何与此有关的项目)的。无论我如何配置它,我仍然得到了依赖来源的罐子。我已经走遍了文档和谷歌还没有找到使用常春藤2.2.0一个可行的解决方案。

I would like to retrieve ONLY the library jar when I make use of a dependency entry in my ivy.xml for Red5 (or any project for that matter). No matter how I have configured it, I still get "sources" jars for dependencies. I have scoured the docs and google and have yet to find a solution that works using Ivy 2.2.0.

这在我的ivy.xml组节点似乎工作最好的最库,但春节忽略它们。

This set of nodes in my ivy.xml seems to work the best for most libraries, but Spring ignores them.

    <exclude ext="txt" />
    <exclude type="src" />
    <exclude artifact="!sources" />

如果任何人有,将工作任何提示,让听到他们的声音!

If anyone has any tips that would work, lets hear them!!

链接到源XML文件

<一个href=\"http://red5.google$c$c.com/svn/java/server/trunk/ivy.xml\">http://red5.google$c$c.com/svn/java/server/trunk/ivy.xml

<一个href=\"http://red5.google$c$c.com/svn/java/server/trunk/ivysettings.xml\">http://red5.google$c$c.com/svn/java/server/trunk/ivysettings.xml

<一个href=\"http://red5.google$c$c.com/svn/java/server/trunk/build.xml\">http://red5.google$c$c.com/svn/java/server/trunk/build.xml

注意

不要说这是一个重复,他们的回答不工作:

Don't say this is a duplicate, their answers do NOT work:

<一个href=\"http://stackoverflow.com/questions/3654498/ivy-$p$pvent-downloading-sources-and-txt-files\">ivy: prevent下载源和.txt文件

<一个href=\"http://stackoverflow.com/questions/4355938/make-ivy-not-to-download-sources-and-license-files\">make常春藤不下载源文件和许可文件

更新1

<dependency org="org.springframework" name="org.springframework.core" rev="3.0.5.RELEASE" transitive="false" />

在我的lib目录下生成两个文件:

Produces these two files in my lib directory:

org.springframework.core-3.0.5.RELEASE.jar
org.springframework.core-sources-3.0.5.RELEASE.jar

更新2
对于奖金,我希望您的解决方案与Red5的主干是提供给大家作为开源工作。来源罐子只是对我来说,非常值得赏金点烦恼。

Update 2 For the bounty, I expect your solution to work with Red5 trunk which is available to everyone as open source. The sources jars are just a annoyance for me and well worth the bounty points.

推荐答案

我修改您的的ivy.xml ivysettings.xml 文件。

要想喝我使用默认配置映射,以避免需要添加一个CONFpreSS源文件属性为每个依赖。

To suppress source files I used a default configuration mapping to avoid the need to add a "conf" attribute to each dependency.

    <configurations defaultconfmapping="default">
    ..
    ..

现在春天通过的Maven中央释放自己的软件,所以我修改了常青藤设置文件,而不是使用旧常春藤包库的这些。

Spring now release their software via Maven central so I revised the ivy settings file to use these instead of the old ivy bundle repositories.

<ivy-module version="2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
    <info organisation="red5" module="server" />

    <configurations defaultconfmapping="default">
        <conf name="default"/>
        <conf name="java6" extends="default" description="Java 6 dependencies"/>
        <conf name="eclipse" description="Special dependencies in Eclipse"/>
        <conf name="utest" extends="eclipse" description="Unit testing dependencies"/>
    </configurations>

    <dependencies>
        <dependency org="javax" name="javaee-api" rev="5.1.2" />

        <!-- Spring --> 
        <dependency org="org.springframework" name="spring-asm" rev="3.0.5.RELEASE"/>
        <dependency org="org.springframework" name="spring-beans" rev="3.0.5.RELEASE" />
        <dependency org="org.springframework" name="spring-context" rev="3.0.5.RELEASE" />
        <dependency org="org.springframework" name="spring-core" rev="3.0.5.RELEASE" />
        <dependency org="org.springframework" name="spring-expression" rev="3.0.5.RELEASE" />
        <dependency org="org.springframework" name="spring-web" rev="3.0.5.RELEASE" />

        <!-- Logging --> 
        <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="1.6.1" transitive="false" />
        <dependency org="org.slf4j" name="com.springsource.slf4j.bridge" rev="1.6.1" transitive="false" />

        <dependency name="jul-to-slf4j" rev="1.6.1" />
        <dependency name="log4j-over-slf4j" rev="1.6.1" />
        <dependency name="jcl-over-slf4j" rev="1.6.1" />    
        <dependency name="logback-classic" rev="0.9.28" />
        <dependency name="logback-core" rev="0.9.28" />

        <!-- General --> 
        <dependency org="commons" name="commons-beanutils" rev="1.8.2" />
        <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.codec" rev="1.4.0" transitive="false" />
        <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.collections" rev="3.2.1" transitive="false" />

        <dependency org="commons" name="httpcore" rev="4.1.3" />
        <dependency org="commons" name="httpclient" rev="4.1.2" />

        <dependency org="commons" name="commons-lang3" rev="3.0-beta" />
        <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.modeler" rev="2.0.1" transitive="false" />

        <dependency org="commons" name="commons-pool" rev="1.5.6" />
        <dependency name="quartz" rev="1.8.5" />
        <dependency name="ehcache" rev="2.2.0" />

        <!-- XML -->
        <dependency org="org.apache.xerces" name="com.springsource.org.apache.xerces" rev="2.9.1" transitive="false" />
        <dependency name="xmlrpc" rev="2.0.1" />

        <!-- Mina -->   
        <dependency org="mina" name="mina-integration-beans" rev="2.0.4" />
        <dependency org="mina" name="mina-integration-jmx" rev="2.0.4" />
        <dependency org="mina" name="mina-core" rev="2.0.4" />

        <!-- Scripting -->
        <dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm" rev="3.2.0" transitive="false" />
        <dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm.commons" rev="3.2.0" transitive="false" />
        <dependency org="org.antlr" name="com.springsource.org.antlr" rev="3.1.3" transitive="false" />
        <dependency org="org.codehaus.groovy" name="com.springsource.org.codehaus.groovy" rev="1.7.0" transitive="false" />
        <dependency name="jruby-complete" rev="1.1.6" />
        <dependency name="jython" rev="2.5" /> 
        <dependency org="org.mozilla.javascript" name="com.springsource.org.mozilla.javascript" rev="1.7.0.R2" transitive="false" />
        <dependency org="javax.xml.stream" name="com.springsource.javax.xml.stream" rev="1.0.1" transitive="false" />
        <dependency org="org.springframework" name="spring-context-support" rev="3.0.5.RELEASE" />

        <!-- Crypto -->
        <dependency name="bcprov-jdk16" rev="145" conf="java6->*" /> 

        <!-- MP3 -->
        <dependency name="jaudiotagger" rev="2.0.4-SNAPSHOT" />           

        <!-- Testing support -->
        <!-- until Eclipse updates their junit version, we have to use this -->
        <dependency org="org.junit" name="com.springsource.org.junit" rev="4.8.1" conf="eclipse->*" transitive="false" />
        <dependency name="GroboUtils" rev="5-core" conf="eclipse->*" />
        <dependency org="org.springframework" name="org.springframework.test" rev="3.0.5.RELEASE" conf="eclipse->*" transitive="false" />
        <dependency org="org.springframework" name="org.springframework.transaction" rev="3.0.5.RELEASE" conf="eclipse->*" transitive="false" />
    </dependencies>
</ivy-module>

修订ivysettings.xml

<ivysettings>
    <settings defaultResolver="chain"/>
    <resolvers>
        <chain name="chain">
            <ibiblio name='central' m2compatible='true'/>
            <ibiblio name='springsource-external' m2compatible='true' root='http://repository.springsource.com/maven/bundles/external'/>
            <url name="googlecode">
                <artifact pattern="http://red5.googlecode.com/svn/repository/[artifact](-[revision]).[ext]" />
                <artifact pattern="http://red5.googlecode.com/svn/repository/[organisation]/[artifact](-[revision]).[ext]" />
            </url>
        </chain>
    </resolvers>
</ivysettings>

这篇关于忽略来源罐子常春藤检索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆