I am working in an upgrade of a grails project from version 2.0.0 to 3.0.0 and jdk 8 on windows, I am getting the following error message:
Build cache is an incubating feature.
Parallel execution is an incubating feature.
FAILURE: Build failed with an exception.
-
Where:
Build file ‘C:UsersmeOneDriveDesktopmyapp 3.0.0myapp build.gradle’ line: 27 -
What went wrong:
A problem occurred evaluating root project ‘reportes’.
Failed to apply plugin [id ‘org.grails.grails-web’]
Cannot add task ‘:groovydoc’ as a task with that name already exists.
-
Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 0s
This is my build.gradle
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:${grailsVersion}"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.1"
}
}
// Remove groovydoc task if it exists
gradle.projectsLoaded {
rootProject.tasks.findByName('groovydoc')?.name = 'existingGroovydoc'
}
apply plugin: 'groovy'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'org.grails.grails-web'
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'com.bertramlabs.asset-pipeline'
apply plugin: 'application'
group = "com.example"
version = "0.1"
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
}
configurations {
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.seleniumhq.selenium') {
details.useVersion('2.53.1')
}
}
}
}
dependencies {
compile "org.grails:grails-core:${grailsVersion}"
compile "org.grails:grails-logging:${grailsVersion}"
compile "org.grails:grails-plugin-databinding:${grailsVersion}"
compile "org.grails:grails-plugin-i18n:${grailsVersion}"
compile "org.grails:grails-plugin-interceptors:${grailsVersion}"
compile "org.grails:grails-plugin-rest:${grailsVersion}"
compile "org.grails:grails-plugin-services:${grailsVersion}"
compile "org.grails:grails-plugin-url-mappings:${grailsVersion}"
compile "org.grails:grails-web-boot:${grailsVersion}"
compile "org.grails.plugins:gsp:${grailsVersion}"
compile "org.grails.plugins:hibernate4:5.0.0"
compile "org.grails.plugins:scaffolding:3.0.0"
compile "org.springframework.boot:spring-boot-autoconfigure:1.2.8.RELEASE"
compile "org.springframework.boot:spring-boot-starter:1.2.8.RELEASE"
compile "org.springframework.boot:spring-boot-starter-actuator:1.2.8.RELEASE"
compile "org.springframework.boot:spring-boot-starter-jetty:1.2.8.RELEASE"
compile "org.springframework.boot:spring-boot-starter-logging:1.2.8.RELEASE"
compile "org.springframework.boot:spring-boot-starter-validation:1.2.8.RELEASE"
compileOnly "io.micronaut:micronaut-inject-groovy"
runtime "org.grails:grails-console:${grailsVersion}"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.1"
runtime "com.h2database:h2:1.4.190"
runtime "org.apache.tomcat:tomcat-jdbc:7.0.59"
runtime "org.fusesource.jansi:jansi:1.11"
// Additional dependencies from old BuildConfig.groovy
compile("org.springframework:spring-core:4.1.6.RELEASE") {
exclude group: 'commons-logging'
}
compile "org.hibernate:hibernate-validator:5.1.3.Final"
compile "com.bertramlabs.plugins:asset-pipeline-core:2.14.1"
compile "org.mozilla:rhino:1.7R4"
compile "org.javassist:javassist:3.18.2-GA"
compile "net.sf.ehcache:ehcache:2.9.0"
compile "org.jboss.logging:jboss-logging:3.1.0.GA"
compile "cglib:cglib-nodep:3.2.5"
compile "org.liquibase:liquibase-core:3.5.3"
// Test dependencies
testCompile "io.micronaut:micronaut-inject-groovy"
testCompile "org.grails:grails-gorm-testing-support:3.0.0"
testCompile "org.grails:grails-web-testing-support:3.0.0"
testCompile "org.grails.plugins:geb:0.10.0"
testCompile "org.seleniumhq.selenium:selenium-api:2.53.1"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:2.53.1"
testCompile "org.seleniumhq.selenium:selenium-support:2.53.1"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:2.53.1"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:2.53.1"
testRuntime "org.seleniumhq.selenium:selenium-safari-driver:2.53.1"
testCompile "io.micronaut:micronaut-http-client:1.0.0"
}
application {
mainClassName = "com.example.Application"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(Test) {
useJUnitPlatform()
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
webdriverBinaries {
chromedriver '2.21'
geckodriver '0.9.0'
edgedriver '2.10586'
}
assets {
minifyJs = true
minifyCss = true
}
This is my gradle.properties:
grailsVersion=3.0.0
grailsGradlePluginVersion=3.0.0
version=0.1
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
I have created a new grails 3.0.0 project and I have migrated the controllers, views, services, assets, and now I am trying to run the project