简体   繁体   中英

JmonkeyEngine gradlew build doesn't work

I am beginner in JMonkeyEngine. I cloned the repository JMonkeyEngine SDK based on Netbeans , then I ran ./ gradlew build in the terminal and returned this error:

FAILURE: Build failed with an exception.

* Where:
Build file '/var/www/html/programas/sdk/build.gradle' line: 346

* What went wrong:
A problem occurred evaluating root project 'sdk'.
> Could not resolve all files for configuration ':optlibs'.
   > Could not resolve org.jmonkeyengine:jme3-jbullet:3.2.0-SNAPSHOT.
     Required by:
         project :
      > Could not resolve org.jmonkeyengine:jme3-jbullet:3.2.0-SNAPSHOT.
         > Could not parse POM /home/jramirez/.m2/repository/org/jmonkeyengine/jme3-jbullet/3.2.0-SNAPSHOT/jme3-jbullet-3.2.0-SNAPSHOT.pom
            > Unable to resolve version for dependency 'jbullet:jbullet:jar'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

java version

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) Server VM (build 25.161-b12, mixed mode)

What happened or What am I doing wrong ?

By looking at the readme to get all dependencies you need to call at first time

 build_engine.sh

Note: Currently, the SDK has to build the engine on it's own, because not all needed dependencies are in mavenCentral/jCenter. Thus you have to call build_engine.sh first on a Linux System, Inside your Windows-Git-Shell or you can manually checkout the jMonkeyEngine repository and then invoke gradlew.bat -PbuildJavaDoc=true install. This will add all jMonkeyEngine Libraries into your local maven "server".

And then

 ./gradlew run 

If you just want to run the SDK on your machine

To start coding for jmonkeyengine, for today's, you can use either Ant or gradle or your own custom script with some dependencies.

1) with Ant, its very simple :

  1. Download the jme3 SDK for your OS from git releases : The stable latest sdk : https://github.com/jMonkeyEngine/sdk/releases/tag/v3.3.0-stable-sdk1 A stable preview release with Gradle Integration support : https://github.com/jMonkeyEngine/sdk/releases/tag/v3.3.2-stable-sdkpreview1
  2. Extract and install.
  3. Create new project > Basic game
  4. Navigate the wiki for more : https://wiki.jmonkeyengine.org/docs/3.4/documentation.html
  5. One of tasty examples you may try : https://wiki.jmonkeyengine.org/docs/3.4/tutorials/beginner/hello_collision.html#sample-code

2) Jme3 with Gradle :

You can use jme3 with any gradle project including android jme3 too !

Then, check this repos :

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM