Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

java - JMonkeyEngine in Intellij IDEA

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>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...