SDK build

I downloaded the SDK and tried to compile it gradle reports and error.

Any help will be appreciated, thanks.

BUILD FAILED in 3s

D:\WorkSpace\jmonkey\sdk-master>gradle
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Included build 'D:\WorkSpace\jmonkey\sdk-master\engine' does not exist.

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

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

BUILD FAILED in 2m 35s

This is my Directory after unzipping the file.


02/13/2022  01:16 AM    <DIR>          .
02/13/2022  01:16 AM    <DIR>          ..
01/22/2022  11:58 AM    <DIR>          .github
01/22/2022  11:58 AM               765 .gitignore
02/13/2022  01:20 AM    <DIR>          .gradle
01/22/2022  11:58 AM             5,511 .travis.yml
01/22/2022  11:58 AM    <DIR>          ant-jme
01/22/2022  11:58 AM    <DIR>          ant-lib
01/22/2022  11:58 AM    <DIR>          BasicGameTemplate
01/22/2022  11:58 AM    <DIR>          branding
01/22/2022  11:58 AM            27,812 build.gradle
01/22/2022  11:58 AM            17,545 build.xml
01/22/2022  11:58 AM             1,954 build_engine.sh
01/22/2022  11:58 AM    <DIR>          debscripts
01/22/2022  11:58 AM    <DIR>          docs
01/22/2022  11:58 AM               776 fix_engine.sh
01/22/2022  11:58 AM    <DIR>          gradle
01/22/2022  11:58 AM               612 gradle.properties
01/22/2022  11:58 AM             5,960 gradlew
01/22/2022  11:58 AM             2,942 gradlew.bat
01/22/2022  11:58 AM    <DIR>          harness-override
01/22/2022  11:58 AM    <DIR>          jdks
01/22/2022  11:58 AM    <DIR>          jme3-android
01/22/2022  11:58 AM    <DIR>          jme3-angelfont
01/22/2022  11:58 AM    <DIR>          jme3-assetpack-support
01/22/2022  11:58 AM    <DIR>          jme3-behaviortrees
01/22/2022  11:58 AM    <DIR>          jme3-blender
01/22/2022  11:58 AM    <DIR>          jme3-cinematics
01/22/2022  11:58 AM    <DIR>          jme3-code-check
01/22/2022  11:58 AM    <DIR>          jme3-codepalette
01/22/2022  11:58 AM    <DIR>          jme3-core
01/22/2022  11:58 AM    <DIR>          jme3-core-baselibs
01/22/2022  11:58 AM    <DIR>          jme3-core-libraries
01/22/2022  11:58 AM    <DIR>          jme3-core-updatecenters
01/22/2022  11:58 AM    <DIR>          jme3-dark-laf
01/22/2022  11:58 AM    <DIR>          jme3-desktop-executables
01/22/2022  11:58 AM    <DIR>          jme3-documentation
01/22/2022  11:58 AM    <DIR>          jme3-glsl-highlighter
01/22/2022  11:58 AM    <DIR>          jme3-gui
01/22/2022  11:58 AM    <DIR>          jme3-lwjgl-applet
01/22/2022  11:58 AM    <DIR>          jme3-materialeditor
01/22/2022  11:58 AM    <DIR>          jme3-model-importer
01/22/2022  11:58 AM    <DIR>          jme3-navmesh-gen
01/22/2022  11:58 AM    <DIR>          jme3-obfuscate
01/22/2022  11:58 AM    <DIR>          jme3-ogretools
01/22/2022  11:58 AM    <DIR>          jme3-ogrexml
01/22/2022  11:58 AM    <DIR>          jme3-project-baselibs
01/22/2022  11:58 AM    <DIR>          jme3-project-libraries
01/22/2022  11:58 AM    <DIR>          jme3-project-testdata
01/22/2022  11:58 AM    <DIR>          jme3-scenecomposer
01/22/2022  11:58 AM    <DIR>          jme3-templates
01/22/2022  11:58 AM    <DIR>          jme3-terrain-editor
01/22/2022  11:58 AM    <DIR>          jme3-tests-template
01/22/2022  11:58 AM    <DIR>          jme3-texture-editor
01/22/2022  11:58 AM    <DIR>          jme3-vehicle-creator
01/22/2022  11:58 AM    <DIR>          jme3-wavefront
01/22/2022  11:58 AM    <DIR>          jme3-welcome-screen
01/22/2022  11:58 AM    <DIR>          JME3TestsTemplate
01/22/2022  11:58 AM    <DIR>          JME3TestsTemplateAndroid
01/22/2022  11:58 AM           371,867 jmonkeyplatform.icns
01/22/2022  11:58 AM            66,955 jmonkeyplatform.png
01/22/2022  11:58 AM    <DIR>          lib
01/22/2022  11:58 AM             1,489 license-jme.txt
01/22/2022  11:58 AM           318,327 licenses-sdk.txt
01/22/2022  11:58 AM    <DIR>          nbi
01/22/2022  11:58 AM    <DIR>          nbproject
01/22/2022  11:58 AM    <DIR>          patches
01/22/2022  11:58 AM             7,567 readme.md
01/22/2022  11:58 AM    <DIR>          resources
01/22/2022  11:58 AM                49 settings.gradle
01/22/2022  11:58 AM             5,833 version.gradle
              16 File(s)        835,964 bytes
              55 Dir(s)  168,170,741,760 bytes free

It can be a bit tricky. I think you missed a step. You didn’t bring in the jME engine itself.

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

Currently, the SDK has to build the engine on it’s own, because not all needed dependencies are in mavenCentral/jCenter.

Can anyone tell me what’s missing from Maven Central?

That didn’t help. I unzipped it (for clean) and tried that and still got errors. Still the same issues. I can’t get the SDK to build. Now I didn’t download a release, I downloaded the main code, but it still doesn’t work on a windows platform.

D:\WorkSpace\jmonkey\sdk-master>gradlew.bat -PbuildJavaDoc=true install

FAILURE: Build failed with an exception.

* What went wrong:
Included build 'D:\WorkSpace\jmonkey\sdk-master\engine' does not exist.

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

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

BUILD FAILED in 1s

So you unzipped (or checked out) jME source (GitHub - jMonkeyEngine/jmonkeyengine: A complete 3-D game development suite written in Java.) to D:\WorkSpace\jmonkey\sdk-master\engine?

1 Like

If I recall correctly, one thing was the Javadocs, that they were not available. But that should have been fixed at some point?

It would really simplify things to have SDK as a Maven project (can’t be a Gradle project, not really supported as a NB platform project). And for it to pull jME as a basic maven dependency.

@Darkchaos has the best knowledge on this.

1 Like

Thanks, that worked.

2 Likes

AFAIK, any issue with missing javadoc was fixed long ago. Since 3.4.0-alpha3 (March 2021), even “jme3-testdata” comes with javadoc.

1 Like

Putting the jme engine into the “engine” directory moved it forward, but it still failed on compile.

D:\WorkSpace\jmonkey\sdk-master>gradle -PbuildJavaDoc=true install

> Configure project :engine
Failed to get repository info: repository not found: D:\WorkSpace\jmonkey\sdk-master\engine. Only partial build info will be generated.
Use natives snapshot: https://objects.jmonkeyengine.org/native-snapshots/ec136bac246ac6ff21426b227076541ce036555a/jme3-natives.zip

> Configure project :
Failed to get repository info: repository not found: D:\WorkSpace\jmonkey\sdk-master. Only partial build info will be generated.

FAILURE: Build failed with an exception.

* What went wrong:
Task 'install' not found in root project 'sdk'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

D:\WorkSpace\jmonkey\sdk-master>

So the rest doesn’t build either.

Dunno if this matters. Maybe not. But you could try checking them out instead of using just the source ZIP.

SDK uses Gradle 5.6.4. Maybe there is a compatibility issue? Try gradle wrapper to get this specific version.

So there’s a few things with building the SDK currently.
While it’s true that we don’t need our custom build of the engine anymore, it won’t be a problem anymore soon, because we will cut the ant build and encourage everyone to use gradle.
The “bring your own jars” approach is just so 90s.

Besides that, we have a sleigh of bigger problems, because I updated netbeans (to a minor version!) and out of a sudden their strange nb-javac claims we don’t implement an interface, which we do.
It also seems confused by several modules providing that interface though.

In general, there’s just a lot of netbeans specific tooling/frameworks that you can use to build your netbeans modules, but you can’t just compile them as a regular gradle project.

So I don’t know if/how you can get master to build and it’s been a bit frustrating to say the least.

Older builds should work fine, if you follow the travis.yml or github actions.
More specifically the errors hint at:
A) downloading the repositories, without a clean checkout
B) invoking install on the sdk repository, not the engine child.
Though not sure if you even need to invoke the install task at all, it should probably build the engine automatically.

Also you can probably use our netbeans update center to get the latest master builds, unless you intend on working with the SDK directly

3 Likes

Soon we can try with NB 13. Although, they don’t provide any LTSes anymore. So every version is basically treated as the same. Regardless of the version number.

Maven would also solve this NB getting. As we would need to download the actual NB release anymore. Just the modules from Maven repos. Maven would also then get the jME engine itself, as it is still required for the internal functionality of the SDK. Not just to provide the libs for ANT builds.

I"m sorry to bring this up again, I can’t get SDK to build. it comes up with an error. Any thoughts will help.

> Task :buildSdk
......  (After aout 100 warnings)
[ant:nb-javac] D:\WorkSpace\jmonkey\sdk-master\jme3-core\src\com\jme3\gde\core\appstates\RunAppStateAction.java:73: error: Class annotated with @ActionRegistration must implement java.awt.event.ActionListener!
[ant:nb-javac] @ActionRegistration(
[ant:nb-javac] ^
[ant:nb-javac] 1 error
[ant:nb-javac] 100 warnings

What Java version you are using?

I downloaded v3.3.2-stable-sdkpreview1.

What version works?

All versions work. 3.3 is the best and the latest. This https://github.com/jMonkeyEngine/sdk/releases/tag/v3.3.0-stable-sdk1.

But I’m a bit confused what you are trying to do. I thought that you want to build the SDK master? Those questions I’m trying to answer here. If you just want to use it, just download it from https://github.com/jMonkeyEngine/sdk/releases/tag/v3.3.0-stable-sdk1. And that is that, install and use. It comes with Java 11 built-in.

If you try to build it, I do suggest the master. And for that I’m trying to guess hard how you get the errors you put in this thread. And my latest question was for that. You are trying to build the SDK master, with what Java version?

1 Like

I’m using java 11. I’m trying to build the SDK

$ java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)

I’ve downloaded the SDK release and using it. I was trying to build it from source because I’m looking to make some changes to a few things in the SDK for my needs but I can’t build the SDK. It keeps erroring during compile.

It builds the engine fine but when it does to build the SDK part is where it gets the errors.

I downloaded the 3.3.0-stable_sdk1 and this is what I gets when trying to build it.

`$ ./gradlew buildsdk
Downloading https://services.gradle.org/distributions/gradle-5.6.4-bin.zip
.........................................................................................
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Configure project :jmonkeyengine
Latest tag:v3.3.2-stable
Auto-detecting version
Revision: 10
Hash: df3b49100a5e15fb41ef97b29480973274e6db6c
Short Hash: df3b491
Tag: null
Build Date: 2022-02-23
Build Branch: v3.3
Use commit hash as version false
Base Version: 3.3.2
Build Suffix: SNAPSHOT
Build Version: 3.3.2-SNAPSHOT
Use natives snapshot: https://dl.bintray.com/jmonkeyengine/files/9f026b41ca0cab3
> Configure project :
Failed to get repository info: repository not found: D:\WorkSpace\jmonkey\sdk-3.Downloading NetBeans Platform base, this only has to be done once..

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\WorkSpace\jmonkey\sdk-3.3.0-stable-sdk1\build.gradle' line: 148

* What went wrong:
A problem occurred evaluating root project 'sdk'.
> Could not download file

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

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

BUILD FAILED in 2m 49s
`

I feel like I’m missing something, just can’t figure it out.

Failed to get repository info: repository not found: D:\WorkSpace\jmonkey\sdk-3.
Downloading NetBeans Platform base, this only has to be done once..

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\WorkSpace\jmonkey\sdk-3.3.0-stable-sdk1\build.gradle' line: 148

* What went wrong:
A problem occurred evaluating root project 'sdk'.
> Could not download file

You should build from the master. It fails to download Netbeans. That is because they don’t seem to mirror anymore the older releases. I think the master contains updated URL, to NB 12.6. It is pretty easy to try fix the URL, you can just get it from Netbeans pages. In case you don’t want the master or it doesn’t work.

Java 11 is fine for this if I remember correctly.

1 Like