eclipse - 设置 Xuggler 的初学者指南

标签 eclipse maven jar pom.xml xuggler

要与 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 文件。
  • 什么依赖 他在说什么?
  • 接下来如何下载这些依赖 ?
  • 获得这些依赖项后,如何开始在 Eclipse 中工作?

  • 下载依赖后更新

    我有以下目录结构:
    enter image description here
  • xuggle-xuggler-5.4.jar存储在 E:\xuggle
  • enter image description here
  • 各种xuggler dependencies存储在 E:\xuggle\xuggle 依赖

  • 问题:
  • 如何开始在 Eclipse 中使用 Xuggler?我必须设置哪些路径以及这些路径具有哪些值?
  • 最佳答案

    以下文件列出了 xuggle 依赖的其他 jar:

  • ivy.xml
  • pom.xml

  • 您可以阅读这些内容,然后从适当的存储库中手动检索它们,但我会提交它更简单地开始使用依赖管理器。

    你问如何下载这些依赖,嗯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/

    相关文章:

    java - Eclipse Java 在注释中发现 "cannot be resolved"错误?

    java - 单击时的actionEvent,希望与输入键java fx相同

    java - Bintray gradle 插件不上传 Artifact

    java - 如何使用 launch4j 和 maven 首先在类路径上添加目录?

    java - 如何 jetty 化maven项目?有多少种方法来完成它?

    java - 能不能把所有的jar依赖打包在一个大jar里?

    java - jar 中图像和可执行文件的路径

    java - 尝试运行 jar 文件时 Manifest 主要属性异常的签名文件摘要无效

    php - xdebug 和 CentOS 的问题

    java - 如何轻松测试java类?