I change my maven project to gradle style. It works well on my mac. But i meet a strange problem while deploying my project to remote machine:
gradle fails to pull latest maven snapshots dependency. It’s so strange! Gradle can do it on my mac! The version of gradle is same. I’m really stucked with it. Any idea appreciated.
here is my environment:
gradle :2.3
mac :OS x10.10
remote machine :Linux shcs116 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Hey,
what repositories do you have configured and what exact error message do
you get when running on your remote machine?
Is the remote machine maybe behind a proxy?
here is the repository configuration:
repositories {
// mavenLocal()
jcenter()
maven { url ‘http://myserver/nexus/content/repositories/public’ }
mavenCentral()
}
i run “gradle clean --debug” on the remote machine, here is the key log:
16:09:07.835 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to load from native-platform backed ConsoleDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform-curses.so' for Linux i386.
caused by: java.lang.UnsatisfiedLinkError: /root/.gradle/native/19/linux-i386/libnative-platform-curses.so: libncurses.so.5: no such file
[org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver] Attempting to resolve com.crashlytics.tools.gradle:crashlytics-gradle:1.+ using repositories [BintrayJCenter, maven, MavenRepo]
16:09:08.653 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Opening cache module-versions.bin (/root/.gradle/caches/modules-2/metadata-2.14/module-versions.bin)
16:09:08.661 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser] post 1.3 ivy file: using exact as default matcher
it seems that there’s no other error. Finally, gradle pulls the old version snapshot dependencies. Okay, maybe i should solve the error above at first. I’ll be back with further info. Thanks for your response.
The error is the root of the problem! The system of my remote machine is 64-bit(Centos r6.6), but gradle is designed for 32-bit. The conflict causes that gradle cannot pull latest snapshot dependencies. I resolve the error with this command:
yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
It takes me out of the problem of snapshot dependency, but it also brings me another problem:
gradle cannot be used in terminal. okay, maybe i should thanks for the god.He closes a door at the same time he leave a window for me. -_-
what do you mean gradle cannot be used from a terminal? why is that?