I am trying to use gradle to build my grails project artifact and for some reason when I include maven and grails plugin in the build.gradle file, it complains with the below mentioned error. Is there a way to get around it. I tried putting maven first and then grails and the other way around. Nothing seems to work. Also is there any other way I can build the grails artifact using gradle ?
- What went wrong: A problem occurred evaluating root project ‘gravel’. > Cannot add task ‘:clean’ as a task with that name already exists.
This is fixed with the 1.1.1 version which is still in snapshot.
Get it with:
buildscript {
repositories { maven { url "http://repo.grails.org/grails/core" } }
dependencies.classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT"
}
If you apply the maven plugin first, it should be fine.
The final 1.1.1 version will be released in a few days.
Do you know how to generate the grails artifact when this version is released ? And what is the anticipated time this will be released ?
This is how my build file looks like right now
buildscript {
repositories {
mavenCentral()
urls: “http://repository.jboss.org/maven2/”
}
dependencies {
classpath “org.grails:grails-gradle-plugin:1.0”,
“org.grails:grails-bootstrap:1.3.7”
} }
apply plugin: ‘grails’
group = ‘com.reardencommerce.apps.travel.ui’ version = ‘1.0-SNAPSHOT’ sourceCompatibility = 1.6 targetCompatibility = 1.6
repositories {
mavenCentral()
urls: “http://repository.jboss.org/maven2/” }
configurations { all*.exclude group:‘xml-apis’, module:‘xml-apis’ }
dependencies {
compile “org.grails:grails-crud:1.3.7”,
“org.grails:grails-gorm:1.3.7”,
“org.grails:grails-test:1.3.7”
runtime “org.slf4j:slf4j-api:1.6.4”,
“log4j:log4j:1.2.16”,
“hsqldb:hsqldb:1.8.0.10”,
“net.sf.ehcache:ehcache-core:1.7.1” }
task wrapper(type: Wrapper) {
gradleVersion = ‘1.0-milestone-8a’
jarFile=‘wrapper/wrapper.jar’ }
Do you know how to generate the grails artifact when this version is released?
I’m not sure what you mean by this.
And what is the anticipated time this will be released?
In the next few weeks.