下载LWJGL当地人常春藤 [英] Downloading LWJGL natives with Ivy

查看:194
本文介绍了下载LWJGL当地人常春藤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个ANT +常春藤建立一个个人项目。一切都被决策意识,并很好地工作,直到我到LWJGL。从LWJGL一切都解决了,除了本地人。

I'm trying to set up an Ant + Ivy build for a personal project. Everything was making sense, and working nicely, until I got to LWJGL. Everything from LWJGL is resolved, except the natives.

在其网站上的 Readme.md 使它看起来它有可能获得通过这些常春藤:

The Readme.md on their website makes it seem that it is possible to get these through Ivy:

LWJGL 3能够与Maven /摇篮/常春藤使用,但有以下
  依赖关系:

LWJGL 3 can be used with Maven/Gradle/Ivy, with the following dependencies:


      
  • org.lwjgl:LWJGL:$ {}版本

  •   
  • org.lwjgl:LWJGL平台:$ {}版本:当地人窗口

  •   
  • org.lwjgl:LWJGL平台:$ {}版本:当地人Linux的

  •   
  • org.lwjgl:LWJGL平台:$ {}版本:当地人-OSX

  •   

我想要的文件肯定是在行家中央存储库,所以必须有让他们通过常青藤的一种方式。我已经建立了我的ivy.xml文件像这样:

The files I want are definitely on the maven central repository, so there must be a way of getting them through Ivy. I have set up my ivy.xml file like so:

<ivy-module version="1.0" xmlns:extra="http://ant.apache.org/ivy/extra">
    <info organisation="foo" module="bar"/>
    <publications>
        <artifact name="baz" type="jar"/>
    </publications>
    <dependencies>
        <dependency org="org.lwjgl" name="lwjgl" rev="3.0.0a"/>
        <dependency org="org.lwjgl" name="lwjgl-platform" rev="3.0.0a" extra:classifier="natives-linux"/>
        <dependency org="org.lwjgl" name="lwjgl-platform" rev="3.0.0a" extra:classifier="natives-osx"/>
        <dependency org="org.lwjgl" name="lwjgl-platform" rev="3.0.0a" extra:classifier="natives-windows"/>
    </dependencies>
</ivy-module>

和蚂蚁在我的决心任务:

And my resolve task in ant:

<target name="resolve" description="Retrive dependencies with Ivy">
    <ivy:retrieve/>
</target>

由于某些原因,这从下载所有的文物org.lwjgl:LWJGL:3.0.0a(罐子,javadoc的,和源),但不会从org.lwjgl下载任何土人:LWJGL平台:3.0.0a。我花了很长时间在谷歌,终于设法找到了额外的:分类器,在Github上别人的ivy.xml文件的语法,但无济于事(我得到了我的希望太早)。一定有我丢失的东西,所以我希望有人SO可以提供帮助。

For some reason, this downloads all the artifacts from "org.lwjgl:lwjgl:3.0.0a" (jar, javadoc, and sources), but does not download any of the natives from "org.lwjgl:lwjgl-platform:3.0.0a". I spent a long time on Google, and finally managed to find the "extra:classifier" syntax in someone else's ivy.xml file on Github, but to no avail (I got my hopes up too early). There must be something I'm missing, so I hope someone on SO can help.

推荐答案

在Maven的模块额外的文物必须在常春藤依赖性声明中明确地检索。

Extra artifacts in Maven modules must be explicitly retrieved in the ivy dependency declaration.

您还需要指定要在检索任务中使用的模式,因为分类是一个Maven特定的标签和可选的。

You'll also need to specify the pattern used in the retrieve task, because "classifier" is a Maven specific tag and optional.

├── build.xml
├── ivy.xml
└── target
    └── lib
        ├── lwjgl-3.0.0a.jar
        ├── lwjgl-platform-3.0.0a-natives-linux.jar
        ├── lwjgl-platform-3.0.0a-natives-osx.jar
        └── lwjgl-platform-3.0.0a-natives-windows.jar

的build.xml

<project name="demo" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">

    <property name="build.dir" location="target"/>

    <target name="resolve">
        <ivy:retrieve pattern="${build.dir}/lib/[artifact]-[revision](-[classifier]).[ext]"/>
    </target>

</project>

的ivy.xml

<ivy-module version="1.0" xmlns:extra="http://ant.apache.org/ivy/extra">
  <info organisation="foo" module="bar"/>
  <dependencies>
    <dependency org="org.lwjgl" name="lwjgl" rev="3.0.0a" conf="default"/>

    <dependency org="org.lwjgl" name="lwjgl-platform" rev="3.0.0a">
      <artifact name="lwjgl-platform" type="jar" extra:classifier="natives-linux"/>
      <artifact name="lwjgl-platform" type="jar" extra:classifier="natives-osx"/>
      <artifact name="lwjgl-platform" type="jar" extra:classifier="natives-windows"/>
    </dependency>
  </dependencies>
</ivy-module>

这篇关于下载LWJGL当地人常春藤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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