java - Grails 3 error when packaging aplication- Could not resolve all dependencies for configuration ':gspCompile' -


app info:

  • grails version: 3.1.8
  • groovy version: 2.4.6
  • jvm version: 1.8.0_60

i'm running grails package runnable archives come across following error:

could not resolve dependencies configuration ':gspcompile'. not resolve javax.servlet:javax.servlet-api:3.1.0. required by: app:app:0.1 not resolve javax.servlet:javax.servlet-api:3.1.0. not resource 'https://repo.grails.org/grails/core/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom'. not head 'https://repo.grails.org/grails/core/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom'. connect repo.grails.org:443 [repo.grails.org/52.205.225.191, repo.grails.org/23.23.24.228] failed: connection timed out: connect

error command [package] error: not execute build using gradle distribution 'https://services.gradle.org/distributions/gradle-2.13-bin.zip'. 

the servlet api in fact in grails repo (thanks loucher) i'm not entirely sure why i'm gettin error.

after doing research have found out grails 3 should use gradle 2.2 or higher , using version 2.1.3. after changing gradle version 2.3 error seems have disappeared had not got runnable archives due other errors. error getting following:

org.codehaus.groovy.runtime.defaultgroovymethods.each(ljava/util/list;lgroovy/lang/closure;)ljava/util/list; 

after searching error had encountered found out there bug in grails. more searching lead me this post. updated gradle version 2.9 suggested in comments using command below:

./gradlew wrapper --gradle-version 2.9 

i used gradle generate war file , thankfully seemed have done it.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -