当我在我的 ivy.xml 中为 Red5(或与此相关的任何项目)使用依赖项时,我只想检索库 jar。无论我如何配置它,我仍然会获得依赖项的“源” jar 。我已经搜索了文档和谷歌,但尚未找到适用于 Ivy 2.2.0 的解决方案。
我的 ivy.xml 中的这组节点似乎最适合大多数库,但 Spring 忽略了它们。
<exclude ext="txt" />
<exclude type="src" />
<exclude artifact="!sources" />
如果有人有任何有用的建议,请听听他们的建议!!
源 xml 文件的链接
http://red5.googlecode.com/svn/java/server/trunk/ivy.xml
http://red5.googlecode.com/svn/java/server/trunk/ivysettings.xml
http://red5.googlecode.com/svn/java/server/trunk/build.xml
注意
不要说这是重复的,他们的答案不起作用:
ivy: prevent downloading sources and .txt files
make ivy not to download sources and license files
更新 1
<dependency org="org.springframework" name="org.springframework.core" rev="3.0.5.RELEASE" transitive="false" />
在我的 lib 目录中生成这两个文件:
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.core-sources-3.0.5.RELEASE.jar
更新 2 对于赏金,我希望您的解决方案能够与 Red5 主干一起使用,每个人都可以作为开源使用。源代码 jar 对我来说只是一个烦恼,非常值得赏金点数。
最佳答案
我在 build.xml 中使用它来仅检索 jars
<ivy:retrieve type="jar"/>
关于java - 在 Ivy 检索中忽略源 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7046198/