初学者指南安装Xuggler [英] Beginner's Guide to Setup Xuggler

查看:411
本文介绍了初学者指南安装Xuggler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用Xuggler,您需要 xuggle-xuggler-5.4.jar 。根据这样做的人,大多数用户只需要上述的JAR文件。然而,这就是他们所说的使用没有 Maven或Ivy的Xuggler


使用没有Apache Maven的Xuggler, Apache Ivy



你在2003年卡住
?无论如何,如果你坚持这个,Xuggler的预编译
二进制(包括本机版本)可以是

  • pom.xml



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



    你问如何下载这些依赖关系,常春藤具有方便的命令行模式操作。 (见下面的示例)



    Eclipse集成非常困难....下载jar后,您可以尝试生成.classpath文件,或者只是手动通过Eclipse GUI添加每个jar。
    我不推荐这种方法的原因是因为有Maven和Ivy的Eclipse插件会为您自动执行此操作。



    示例< h1>

    从命令行运行ivy,如下所示:

      java -jar ivy .jar -settings ivysettings.xml -dependency xuggle xuggle-xuggler 5.4 -retrievelib / [artifact]  -  [revision]。[ext]

    它将检索xugg及其所有依赖项到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



    ivysettings.xml



    此文件告诉常春藤从 Maven Central 或Maven存储库由Xuggle项目淘汰。

     < ivysettings> 
    < settings defaultResolver =repos/>
    < resolvers>
    < chain name =repos>
    < ibiblio name =centralm2compatible =true/>
    < ibiblio name =xugglem2compatible =trueroot =http://xuggle.googlecode.com/svn/trunk/repo/share/java/>
    < / chain>
    < / resolvers>
    < / ivysettings>


    To work with Xuggler you need xuggle-xuggler-5.4.jar. According to the people who made this, most users only need the above-mentioned JAR file. However, this is what they say about using Xuggler without Maven or 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.

    I downloaded the xuggle-xuggler.jar file for the latest version, 5.4 but I don't understand the pom file for it.

  • What dependencies is he talking about?
  • Next, how do I download these dependencies ?
  • Once I get these dependencies, how do I start working in Eclipse?



  • Update After Downloading Dependencies

    I have the following directory structure:

  • xuggle-xuggler-5.4.jar is stored in E:\xuggle

  • the various xuggler dependencies are stored in E:\xuggle\xuggle-dependencies
  • Question:

  • How do I start working with Xuggler in Eclipse? What paths do I have to set and what values do these paths have?
  • 解决方案

    The following files list the other jars which xuggle depends upon:

    You can read these and then manually retrieve them from the appropriate repository, but I would submit it's simpler to start using a dependency manager.

    You asked how to download these dependencies, well ivy has a convenient command-line mode of operation. (See example below)

    Eclipse integration is very tough.... Once you've downloaded the jar you could try and generate the ".classpath" file or just manually add each jar via the Eclipse GUI. The reason I don't recommend this approach is because there are Eclipse plugins for both Maven and Ivy that would do this for you automatically.

    Example

    Run ivy from command-line as follows:

    java -jar ivy.jar -settings ivysettings.xml -dependency xuggle xuggle-xuggler 5.4 -retrieve "lib/[artifact]-[revision].[ext]"
    

    It will retrieve xuggle and all its dependencies into a "lib" directory as follows:

    ├── 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
    

    ivysettings.xml

    This file tells ivy to retrieve jars from either Maven Central, or the Maven repository provided by the Xuggle project.

    <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>
    

    这篇关于初学者指南安装Xuggler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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