I am trying to use gradle -grails-plugin to create an existing (small) Grails project. Should this work? What is the relationship between the dependencies in build.gradle and those specified in buildConfig.groovy ?
In any case, I have two projects, so the topmost build.gradle file is in the parent directory and looks like this:
buildscript { repositories { jcenter() } dependencies { classpath "org.grails:grails-gradle-plugin:2.2.0.RC1" } } task wrapper(type: Wrapper) { gradleVersion = '2.3' }
and then build.gradle in a Grails project looks like this:
apply plugin: "grails" repositories { grails.central() //creates a maven repo for the Grails Central repository (Core libraries and plugins) } grails { grailsVersion = '2.4.4' groovyVersion = '2.3.9' springLoadedVersion '1.2.0.RELEASE' } dependencies { bootstrap "org.grails.plugins:tomcat:7.0.55.3" compile 'org.grails.plugins:asset-pipeline:3.0.1' compile 'org.grails.plugins:scaffolding:2.1.2' compile 'org.grails.plugins:cache:1.1.8' runtime 'org.grails.plugins:hibernate4:4.3.1.1' runtime 'org.grails.plugins:database-migration:1.3.8' runtime 'org.grails.plugins:jquery:1.11.0' }
However, when I start ./gradlew war , I return:
Caused by: java.long.ClassNotFoundException: grails.artefact.Service
Can anyone shed some light on this? There are almost no links to Google. Does it look like it's Grails 3.x class? In addition, I am using Java 1.7.
source share