Hello, this is a pretty simple question. As per the Lemur Wiki, it is recommended to have LemurProto as well. I’m not sure when the wiki was updated, but I noticed that LemurProto hasn’t had a release in over a year. Is it still recommended to include LemurProto along side the latest Lemur?
Also, adding Lemur to gradle dependencies results in:
Could not resolve com.simsilica:lemur:1.11.0.
I tried changing the version to 1.14 (the latest) and get the same error:
Could not resolve com.simsilica:lemur:1.14.0.
Do I have to add a repository?
jcenter is already present
Your build.gradle file looks fine from here. (Hint: we can’t debug things we can’t see.)
you only need lemur-proto if you want newer incubating controls like ListBox, ActionButton, OptionPanel, etc…
Edit: I release the things when they need releases and up until recently, nothing had changed in LemurProto during that year. It doesn’t make sense to cut releases when the code hasn’t changed.
Ahh my bad, here’s my build file:
plugins {
id 'java'
id 'application'
id 'eclipse'
id 'maven'
}
def assetPack = "../Assets"
description = ''
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
ext.jmonkeyengineVersion = '3.3.2-stable' // from jCenter
tasks.withType(JavaCompile) { // Java compile-time options:
options.compilerArgs << '-Xdiags:verbose'
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
options.encoding = 'UTF-8'
}
tasks.withType(JavaExec) { // Java runtime options:
args = []
classpath sourceSets.main.runtimeClasspath
//debug true
enableAssertions true
jvmArgs '-Xms512m', '-Xmx512m'
jvmArgs '-XX:+UseG1GC', '-XX:MaxGCPauseMillis=10'
}
mainClassName = "engine.Launcher"
if (!hasProperty('mainClass')) {
ext.mainClass = mainClassName
}
jar.manifest.attributes('Main-Class': mainClassName)
ant.importBuild("${assetPack}/build.xml") { antTarget ->
'ant-' + antTarget
}
compileJava.dependsOn "ant-jar"
repositories {
mavenLocal()
jcenter()
maven { url 'http://nifty-gui.sourceforge.net/nifty-maven-repo' }
mavenCentral()
}
dependencies {
implementation 'org.jmonkeyengine:jme3-core:' + jmonkeyengineVersion
implementation 'org.jmonkeyengine:jme3-desktop:' + jmonkeyengineVersion
implementation 'org.jmonkeyengine:jme3-effects:' + jmonkeyengineVersion
implementation 'org.jmonkeyengine:jme3-niftygui:' + jmonkeyengineVersion
implementation 'org.jmonkeyengine:jme3-terrain:' + jmonkeyengineVersion
runtimeOnly 'org.jmonkeyengine:jme3-lwjgl:' + jmonkeyengineVersion // LWJGL 2.x
implementation 'com.github.stephengold:Minie:3.0.0'
runtimeOnly 'org.jmonkeyengine:jme3-blender:' + jmonkeyengineVersion
runtimeOnly 'org.jmonkeyengine:jme3-jogg:' + jmonkeyengineVersion
runtimeOnly 'org.jmonkeyengine:jme3-plugins:' + jmonkeyengineVersion
implementation 'com.google.guava:guava:19.0'
implementation 'org.slf4j:slf4j-api:1.7.13'
implementation "com.simsilica:lemur:1.14.0"
implementation "com.simsilica:lemur-proto:1.11.0"
implementation fileTree(dir: "${assetPack}/dist", include: "*.jar")
}
// cleanup tasks
clean.dependsOn('cleanDLLs', 'cleanDyLibs', 'cleanLogs', 'cleanSOs')
task cleanDLLs(type: Delete) {
delete fileTree(dir: '.', include: '*.dll')
}
task cleanDyLibs(type: Delete) {
delete fileTree(dir: '.', include: '*.dylib')
}
task cleanLogs(type: Delete) {
delete fileTree(dir: '.', include: 'hs_err_pid*.log')
}
task cleanSOs(type: Delete) {
delete fileTree(dir: '.', include: '*.so')
}
Also, I noticed that I did not have the lemur dependencies, so I added them, and now I get this:
Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve com.google.guava:guava:19.0.
It seems I can’t get gradle to find guava. The build.gradle I just pasted is the most recent, containing my attempted corrections.
I also did a clean/build already
Also, if you see it and wonder, I’m moving from nifty to lemur, so I still have nifty in the dependencies while I work on the refactor
But wait, there’s more: (Attempted to set guava to latest version)
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve com.google.guava:guava:30.1-jre.
Required by:
project :
> Could not resolve com.google.guava:guava:30.1-jre.
> Could not get resource 'https://jcenter.bintray.com/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Permission denied: connect
> Could not resolve com.google.guava:guava:30.1-jre.
> Could not get resource 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Could not GET 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Permission denied: connect
> Could not resolve com.google.guava:guava:30.1-jre.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom'.
> Permission denied: connect
> Could not resolve org.slf4j:slf4j-api:1.7.13.
Required by:
project :
> Could not resolve org.slf4j:slf4j-api:1.7.13.
> Could not get resource 'https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Could not GET 'https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Permission denied: connect
> Could not resolve org.slf4j:slf4j-api:1.7.13.
> Could not get resource 'http://nifty-gui.sourceforge.net/nifty-maven-repo/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Could not GET 'http://nifty-gui.sourceforge.net/nifty-maven-repo/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Permission denied: connect
> Could not resolve org.slf4j:slf4j-api:1.7.13.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur:1.14.0.
Required by:
project :
> Could not resolve com.simsilica:lemur:1.14.0.
> Could not get resource 'https://jcenter.bintray.com/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur:1.14.0.
> Could not get resource 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Could not GET 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur:1.14.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/simsilica/lemur/1.14.0/lemur-1.14.0.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur-proto:1.11.0.
Required by:
project :
> Could not resolve com.simsilica:lemur-proto:1.11.0.
> Could not get resource 'https://jcenter.bintray.com/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur-proto:1.11.0.
> Could not get resource 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Could not GET 'http://nifty-gui.sourceforge.net/nifty-maven-repo/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Permission denied: connect
> Could not resolve com.simsilica:lemur-proto:1.11.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/simsilica/lemur-proto/1.11.0/lemur-proto-1.11.0.pom'.
> Permission denied: connect
Those errors look more like a connection issue… I’m pretty sure that gradle is passing out a java.net.SocketException
- Have you changed any network settings since sometime after the last time that you had added to your dependencies?
- Can you access any of the URLs in the error messages through a browser?
- Are you using a firewall or VPN? If a firewall, make sure that java is allowed to make network connections.
Some quick searching in the ‘java permission denied: connect’ region got me some references to java preferring to use IPv6 if it’s available, and some VPNs and firewalls not properly handling some IPv4-over-IPv6 traffic. (These were old issues, no idea if they’re still relevant)
Hmm, good point there. I have TinyWall running, set to block all by default. I’m pretty sure I have java enabled, but I’ll go ahead and disable the firewall and see if that fixes anything
Note: I’m not too sure about this, I’ve had my firewall running 24/7 for the weeks this computer has been up, and gradle hasn’t complained before, but let me disable the firewall and see what happens, it’s pretty common when block-all-by-default is enabled to have apps not be able to access internet because it’s a different executable thread accessing the internet
Good call, it was my firewall. The real question here is, why did this start now once I added Lemur and not the other hundreds of clean/builds I’ve done before that. Well anyway, problem is solved, thank you @sailsman63!
Well, I can’t be certain, but above you said:
(Emphasis mine) That phrasing suggests that this is a fairly new system to you. Did you perhaps copy in your home directory from an older setup?
Note: gradle clean
does not clear the dependency caches, either the ~/.gradle/cache/
or ~/.m2/
maven cache. It only clears the artifacts from building this project.
If you did not add dependencies in that timeframe, and the existing ones were already in the cache, you would never notice the problem. This seems to be further supported in that the error messages only mention the new dependencies: apparently, all of the jme3-*
stuff and Minie
were already available on your machine.
Oh no sorry, I meant uptime, this OS was installed about two years ago (and unfortunately windows), but I meant this system has been doing the same task (me running the same JME SDK, terminal window, and Sublime text window, along with firefox) with my firewall untouched for weeks and I haven’t ran into this issue, but when I added Lemur to the dependencies I started getting this error. Maybe I ran a clean build with my firewall off one time and it got cached, and there wasn’t an issue until I changed the dependencies. Who knows Was my fault in the end though, the firewall was blocking java, and I had not noticed until now
Unless you routinely clean out ~/.m2/repository (and there’s no reason that you should), anything ever downloaded from a maven repo (jcenter, mavenCentral, etc.) is still there. So you can truck along for a long time with everything working fine until you try to get a dependency you never grabbed before.
Ahh makes sense. I’m pretty new to gradle/maven, and while I pick up on syntax very easily, I’m not so good at remembering things like that. I appreciate the information, I think I’ll add a handler in my firewall to show popups when something is blocked