要与 Xuggler 合作,您需要 xuggle-xuggler-5.4.jar
.据制作这个的人说,大多数用户只需要上面提到的 JAR 文件。然而,这就是他们所说的使用 Xuggler 没有 Maven或 Ivy :
Using Xuggler WITHOUT Apache Maven or Apache Ivy
What are you... stuck in 2003? Anyway, if you insist on this, Xuggler's pre-compiled binaries (including native versions) can be found here. Make sure that xuggle-xuggler.jar and its dependencies are included in your Java classpath. See the xuggle-xugger-*.pom file distributed with the version of Xuggler that you use to find the (small) set of dependent jars, and download them as well.
我下载了
xuggle-xuggler.jar
最新版本 5.4 的文件,但我不明白它的 pom 文件。下载依赖后更新
我有以下目录结构:
xuggle-xuggler-5.4.jar
存储在 E:\xuggle xuggler dependencies
存储在 E:\xuggle\xuggle 依赖 问题:
最佳答案
以下文件列出了 xuggle 依赖的其他 jar:
您可以阅读这些内容,然后从适当的存储库中手动检索它们,但我会提交它更简单地开始使用依赖管理器。
你问如何下载这些依赖,嗯ivy有一个方便的command-line操作模式。 (见下面的例子)
Eclipse 集成非常困难......一旦您下载了 jar,您可以尝试生成“.classpath”文件,或者只是通过 Eclipse GUI 手动添加每个 jar。
我不推荐这种方法的原因是因为 Maven 和 Ivy 的 Eclipse 插件会自动为您执行此操作。
例子
从命令行运行 ivy,如下所示:
java -jar ivy.jar -settings ivysettings.xml -dependency xuggle xuggle-xuggler 5.4 -retrieve "lib/[artifact]-[revision].[ext]"
它会将 xuggle 及其所有依赖项检索到“lib”目录中,如下所示:
├── ivysettings.xml
└── lib
├── commons-cli-1.1.jar
├── logback-classic-1.0.0.jar
├── logback-core-1.0.0.jar
├── slf4j-api-1.6.4.jar
└── xuggle-xuggler-5.4.jar
Ivy 设置.xml
这个文件告诉 ivy 从 Maven Central 中检索 jars。 ,或者 Xuggle 项目提供的 Maven 仓库。
<ivysettings>
<settings defaultResolver="repos" />
<resolvers>
<chain name="repos">
<ibiblio name="central" m2compatible="true"/>
<ibiblio name="xuggle" m2compatible="true" root="http://xuggle.googlecode.com/svn/trunk/repo/share/java"/>
</chain>
</resolvers>
</ivysettings>
关于eclipse - 设置 Xuggler 的初学者指南,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14010557/