groovy - Grails GGTS "Task 'assemble' not found in root project" error when running "grails war" in Command Prompt -
i have been learning groovy/grails tool suite (ggts) 3.6.4, grails 2.4.4 using video tutorials. when attempt package project application using grails war
command on windows command prompt, following error:
"error gradle build terminated error: task 'assemble' not found in root project ..."
any references error have found online have involved android studio (for instance), @ loss here how fix ggts.
i have android studio 1.0.1 installed, , in case affecting grails packaging, tried solution of removing <component name="facetmanager">
general android studio "myapplication.iml" file, had no effect. couldn't find analogous file ggts.
in case issue lies elsewhere in overall installation, have java jre 7_79 (64-bit) installed, the jdk 1.7.0_79 (64-bit)
ok. found out cause of error was, , how avoid in future.
the problem
grails 3.0.1 requires following files grails war
work:
- build.gradle
- gradle.properties
- gradlew
- gradlew.bat
- \gradle (directory)
grails 2.4.4 not require of above files making war file.
ggts 3.6.4 not work grails 3.0.1, comes , works fine grails 2.4.4.
the solution
copying stated gradle files & directory ggts project folder fixed problem. however, wasn't satisfied needing manually or custom batch file every project.
looking deeper, turns out when working out compatibility issues between java 32-bit jre existing on system , java 64-bit jre & sdk, grails, , ggts versions (there lot of fiddling things working), @ 1 point had set global variable grails directed @ 3.0.1, , failed update grails 2.4.4. making change has fixed issue.
explaining cause
when following video series on installing compatible set of java, grails, , ggts, instructor manually downloaded latest version of grails grails site , downloaded ggts separately own site. both of these older versions working with.
in case turns out that, after setting java sdk & grails, latest version of ggts (3.6.4) did not work latest version of grails (3.0.1). fortunately ggts bundle came older version of grails (2.4.4), , referencing that, ggts work correctly. however, although changed ide reference grails, forgot reset environment variable ...
so ggts setting project using grails 2.4.4. however, when calling grails war
, command using grails 3.0.1! apparently these 2 versions of grails use different files creating war file, ggts not setting project directories correct local files, , packaging failing.
avoiding future occurrences
so, when using ggts 3.6.4, make sure references grails point grails 2.4.4.
in general, if ggts bundle contains version of grails, should have set use version, if old.
Comments
Post a Comment