I'm getting an error from gradlew to "Set executable permissions for: ...bin/gradle" but it is already executable


(Michael Holm) #1

What am I doing wrong here?

build.gradle

task wrapper(type: Wrapper) {
    gradleVersion = '1.1'
    jarPath = 'wrapper'
    archiveBase=Wrapper.PathBase.PROJECT
    distributionBase=Wrapper.PathBase.PROJECT
    urlRoot='http://downloads.gradle.org/distributions'
}

terminal

[11:52]~/workspace/gc/rsp/rs (svn::/UI/RS/trunk)$ gradle wrapper
:wrapper
  BUILD SUCCESSFUL
  Total time: 1.939 secs
[11:53]~/workspace/gc/rsp/rs (svn::/UI/RS/trunk)$ gradlew -v
Downloading http://downloads.gradle.org/distributions/gradle-1.1-bin.zip
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /Users/mholm/workspace/gc/rsp/rs/wrapper/dists/gradle-1.1-bin.zip to /Users/mholm/workspace/gc/rsp/rs/wrapper/dists
Set executable permissions for: /Users/mholm/workspace/gc/rsp/rs/wrapper/dists/gradle-1.1/bin/gradle
Exception in thread "main" java.lang.ClassNotFoundException: org.gradle.BootstrapMain
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:36)
 at org.gradle.wrapper.Wrapper.execute(Wrapper.java:58)
 at org.gradle.wrapper.WrapperMain.main(WrapperMain.java:39)
[11:56]~/workspace/gc/rsp/rs (svn::/UI/RS/trunk)$ ls -l /Users/mholm/workspace/gc/rsp/rs/wrapper/dists/gradle-1.1/bin/gradle
-rwxr-xr-x
1 mholm
staff
 4.9K Sep 10 11:56 /Users/mholm/workspace/gc/rsp/rs/wrapper/dists/gradle-1.1/bin/gradle

(Michael Holm) #2

so i had gradle-0.8 installed (GRADLE_HOME set to a dir of 0.8 and the 0.8/bin in my PATH) but was trying to get the wrapper for 1.1. This seems to have somehow been an issue since i have upgraded my installation to 1.1 and then was able to easily get the 1.1 wrapper without error…serves me right for being on 0.8 for so long :stuck_out_tongue: