Download jMonkeyEngine using SBT

大城市里の小女人 提交于 2019-12-11 03:43:27

问题


I am trying to use jMonkeyEngine 3 with Scala (using IntelliJ as an IDE, in a SBT driven Scala project). As Maven distribution was added few months ago, I try to pull the JME from this maven repository. This is what I have added into my build.sbt file:

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies += "com.jme3" % "jmonkeyengine3" % "3.0.0.20140325-SNAPSHOT"

The only jar downloaded jmonkeyengine3-3.0.0.20140325-SNAPSHOT.jar seems to contain the tests only (folder jme3test), not the JME libraries itself. What needs to be added to that they are downloaded as well?


回答1:


Check their pom.xml. It seems, that jmonkeyengine3 just contains demo classes. And you need to download additional dependencies. Also, using of Maven dependency is not recommended. They recommend to use SDK installer instead.




回答2:


As mkrakhin wrote in his answer, it is necessary to add all dependencies. The SBT code for this is as follows:

resolvers += Resolver.sonatypeRepo("snapshots")

val jmeVersion = "3.0.0.20140325-SNAPSHOT"

libraryDependencies += "com.jme3" % "jmonkeyengine3" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-desktop" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-core" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-lwjgl" % jmeVersion

libraryDependencies += "com.jme3" % "lwjgl" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-lwjgl-natives" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-jbullet" % jmeVersion

libraryDependencies += "com.jme3" % "jbullet" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-blender" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-desktop" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-effects" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-networking" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-plugins" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-terrain" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-jogg" % jmeVersion

libraryDependencies += "com.jme3" % "j-ogg-oggd" % jmeVersion

libraryDependencies += "com.jme3" % "j-ogg-vorbisd" % jmeVersion

libraryDependencies += "com.jme3" % "jinput" % jmeVersion

libraryDependencies += "com.jme3" % "eventbus" % jmeVersion

libraryDependencies += "com.jme3" % "stack-alloc" % jmeVersion

libraryDependencies += "com.jme3" % "vecmath" % jmeVersion

libraryDependencies += "com.jme3" % "xmlpull-xpp3" % jmeVersion

libraryDependencies += "com.jme3" % "jME3-niftygui" % jmeVersion

libraryDependencies += "com.jme3" % "nifty" % jmeVersion

libraryDependencies += "com.jme3" % "nifty-default-controls" % jmeVersion

libraryDependencies += "com.jme3" % "nifty-examples" % jmeVersion

libraryDependencies += "com.jme3" % "nifty-style-black" % jmeVersion

libraryDependencies += "junit" % "junit" % "3.8.1"


来源:https://stackoverflow.com/questions/24672493/download-jmonkeyengine-using-sbt

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