[SOLVED] Failure to find org.jmonkeyengine:lwjgl-platform:jar:2.9.5 after upgrading to 3.6.0

I am using Maven (not gradle) for my builds, in IntelliJ. After upgrading from 3.5.2 to 3.6.0, everything compiles OK, but when I run “mvn package” I get the error

Could not resolve dependencies for project : Failure to find org.jmonkeyengine:lwjgl-platform:jar:2.9.5 in Central Repository:

Looking at maven central, it looks like this artefact only has a pom artefact, but not a jar? I thought a runtime dependency would have to be a .jar? (I am not a maven expert)

There are changes between 3.5 and 3.6 that may have caused this, but it’s a bit strange that nobody else has reported this. Was there something else I need to do to get this working?

1 Like

FWIW, I manually removed the dependency on lwjgl-platform from jme3-lwjgl-3.6.0-stable.pom (in my local maven) and then everything packaged and ran fine.

<dependency>
<groupId>org.jmonkeyengine</groupId>
<artifactId>lwjgl-platform</artifactId>
<version>2.9.5</version>
<scope>runtime</scope>
</dependency>
3 Likes

Thanks for the hint. To get a solution which also works for those who don’t find this post, I created this PR: remove runtime dependency to lwjgl-platform:2.9.5 so mvn package does not fail by neuweiler · Pull Request #2040 · jMonkeyEngine/jmonkeyengine · GitHub

2 Likes

I was just looking at the work involved in moving the SDK to use Netbean’s Maven Platform (rather than Ant) and hit this same issue.

Out of interest, does the following also work as a workaround in your project .pom, rather than changing your local Maven? Its the approach I’m thinking of taking…

        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>3.6.1-stable</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jmonkeyengine</groupId>
                    <artifactId>lwjgl-platform</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

I did a quick test Maven project, and Shade’d the .jar file, and I have the LWJGL2 classes in there :+1:

3 Likes

Yes that did work. I reversed my previous workaround and added that exclusion to my pom file. It worked.
This is on 3.6.0-stable BTW.

2 Likes

Actually… that workaround didn’t work.
It did stop the previous build error from happening.
However my application then failed at runtime because lwjgl64.dll was missing from the jar file.

I got

Exception in thread “jME3 Main” java.lang.UnsatisfiedLinkError: no lwjgl64 in java.library.path:

Hi, we have fixed it in master branch. Try 3.7.0-SNAPSHOT version and let us know if you still have this issue.

Edit: See the docs for how to use snapshot version:

1 Like

I followed the directions to use 3.7.0-SNAPSHOT version.
The build ran fine. Everything worked correctly at runtime.
Looks to be fixed :+1:

3 Likes

If there’s a 3.6.2 release, it should include the fix.

2 Likes