cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel Nennker <ignisvul...@gmail.com>
Subject Re: cordova 5.0.0 and gradle
Date Wed, 22 Apr 2015 11:03:25 GMT
Ignoring the no-network-while-building requirement for a moment and setting
the JAVA_OPTS proxy variable correctly leads to this:
     [exec] Downloading
http://services.gradle.org/distributions/gradle-2.2.1-all.zip
     [exec]
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
     [exec] Unzipping
/home/ignisvulpis/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1-all.zip
to
/home/ignisvulpis/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b
     [exec] Set executable permissions for:
/home/ignisvulpis/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1/bin/gradle
     [exec]
     [exec] FAILURE: Build failed with an exception.
     [exec]
     [exec] * What went wrong:
     [exec] A problem occurred configuring root project 'android'.
     [exec] > Could not resolve all dependencies for configuration
':classpath'.
     [exec]    > Could not resolve com.android.tools.build:gradle:1.0.0+.
     [exec]      Required by:
     [exec]          :android:unspecified
     [exec]       > Failed to list versions for
com.android.tools.build:gradle.
     [exec]          > Unable to load Maven meta-data from
https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml
.
     [exec]             > Could not GET '
https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml
'.
     [exec]                > Connection to https://repo1.maven.org refused
     [exec]
     [exec] * Try:
     [exec] Run with --stacktrace option to get the stack trace. Run with
--info or --debug option to get more log output.

It seems that cordova detects that my gradle version is 2.3 and sets the
dependency to com.android.tools.build:gradle:1.0.0+ but later something
decides that gradle 2.2.1 should be used.

-Axel

2015-04-22 11:42 GMT+02:00 Axel Nennker <ignisvulpis@gmail.com>:

> Hi,
>
> I update to cordova 5 and now my project build fail.
>
> I am behind a corporate proxy
>   ignisvulpis@namenlos:~/development/nur_der_hsv$ echo $JAVA_OPTS
>   -Dhttp.proxyHost=http://xxx.yyy.109.5:8080/
> and have gradle 2.3 installed
>   ignisvulpis@namenlos:~/development/nur_der_hsv$ which gradle
>   /usr/local/gradle-2.3/bin/gradle
>
> But it seems cordova forces gradle to download gradle version 2.2.1 which
> fails.
>
> I don't want network access at build-time. We made local copies of all
> plugins we need and do a cordova plugin add plugindirectory to add them.
> Platforms are downloaded sometimes.
>
> How do I prevent cordova to try to download an older version of gradle?
>
> cheers
> Axel
>
>
> exerpt from our ant file output:
> run-app:
>      [echo] Build and run BasicWallet for: android
>      [exec] Running command:
> /home/ignisvulpis/development/nur_der_hsv/app/platforms/android/cordova/run
>      [exec] ANDROID_HOME=/home/ignisvulpis/Android/Sdk
>      [exec] JAVA_HOME=/usr/lib/jvm/java-8-oracle
>      [exec] WARNING : No target specified, deploying to device '7ece97a7'.
>      [exec] Running:
> /home/ignisvulpis/development/nur_der_hsv/app/platforms/android/gradlew
> cdvBuildDebug -b
> /home/ignisvulpis/development/nur_der_hsv/app/platforms/android/build.gradle
> -PcdvBuildArch=arm -Dorg.gradle.daemon=true
>      [exec] Downloading
> http://services.gradle.org/distributions/gradle-2.2.1-all.zip
>      [exec]
>      [exec] ERROR running one or more of the platforms: Error:
> /home/ignisvulpis/development/nur_der_hsv/app/platforms/android/cordova/run:
> Command failed with exit code 8
>      [exec] You may not have the required environment or OS to run this
> project
>      [exec] Exception in thread "main" java.lang.RuntimeException:
> java.net.ConnectException: Connection refused
>      [exec]     at
> org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
>      [exec]     at org.gradle.wrapper.Install.createDist(Install.java:47)
>      [exec]     at
> org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
>      [exec]     at
> org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
>      [exec] Caused by: java.net.ConnectException: Connection refused
>      [exec]     at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message