JMonkeyEngine in Intellij IDEA

ぃ、小莉子 提交于 2019-12-13 09:14:21

问题


I have this pom.xml which is not working. It is impossible to use jme3 with maven. It is also not possible to use jme3 with jar:s, because the jar:s are not available, so nothing is possible.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany</groupId>
    <artifactId>jme3-example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>JME3 maven project</name>

    <properties>
        <jme3.version>3.1</jme3.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-core</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-desktop</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>${jme3.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>jme3-repo</id>
            <name>JME3 maven repo</name>
            <url>http://updates.jmonkeyengine.org/maven/</url>
        </repository>
    </repositories>
</project>

回答1:


It looks to me like the 3.1 version is currently in beta, and the correct version number for the most recent beta is 3.1.0-beta1. Also, it appears that the maven artifacts are available on JCenter since 3.1.0-alpha2 (https://bintray.com/jmonkeyengine/org.jmonkeyengine/jme3-core/view). The private repository seems to no longer exist.

Given that, I was able to get the following to work:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany</groupId>
    <artifactId>jme3-example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>JME3 maven project</name>

    <properties>
        <jme3.version>3.1.0-beta1</jme3.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-core</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-desktop</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>${jme3.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>bintray-jmonkeyengine-org.jmonkeyengine</id>
            <name>bintray</name>
            <url>http://dl.bintray.com/jmonkeyengine/org.jmonkeyengine</url>
        </repository>
    </repositories>

</project>


来源:https://stackoverflow.com/questions/37957686/jmonkeyengine-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!