I get an error when running gradle clean. could someone help me with my build gradle?

Viewed 191

I get an error when I run gradle clean.

Here is the error:

  • Where: Build file '~/application/api/build.gradle' line: 27

  • What went wrong: A problem occurred evaluating root project 'api'.

Failed to apply plugin 'org.grails.grails-web'. > Could not create task ':findMainClass'. > Replacing an existing task that may have already been used by other plugins is not supported. Use a different name for this task ('findMainClass').

I understand my error occurs here

apply plugin: "org.grails.grails-web"

Can someone help me I can't figure out why?

Here is my build.gradle:


buildscript {
        repositories {
                mavenLocal()
                maven { url "https://repo.grails.org/grails/core" }
                maven { url "https://dl.bintray.com/cscpublicgrails/plugins/" }
        }
        dependencies {
                classpath "org.grails:grails-gradle-plugin:$grailsVersion"
                classpath "org.grails.plugins:hibernate5:${gormVersion - ".RELEASE"}"
                classpath "org.grails.plugins:views-gradle:1.1.5"
                classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.1"
                classpath "org.grails.plugins:database-migration:3.0.3"
        }
}

def infoFile = file("../info.json")
def parsedInfo = new JsonSlurper().parseText(infoFile.text as String)

version parsedInfo.version
group "coconut"

apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "war"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "org.grails.plugins.views-json"
apply plugin: "asset-pipeline"

repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://repo.grails.org/grails/core" }
}

dependencyManagement {
        imports {
                mavenBom "org.grails:grails-bom:$grailsVersion"
        }
        applyMavenExclusions false
}

dependencies {

        compile "org.springframework.boot:spring-boot-starter-logging"
        compile "org.springframework.boot:spring-boot-autoconfigure"
        compile "org.springframework.boot:spring-boot-starter-actuator"
        compile "org.springframework.boot:spring-boot-starter-tomcat"
        compile "org.hibernate:hibernate-core:5.1.3.Final"
        compile "org.hibernate:hibernate-ehcache:5.1.3.Final"
        compile "org.grails.plugins:hibernate5:${gormVersion - ".RELEASE"}"
        compile "org.grails:grails-core:$grailsVersion"
        compile "org.grails:grails-dependencies:$grailsVersion"
        compile "org.grails:grails-web-boot:$grailsVersion"
        compile "org.grails:grails-logging:$grailsVersion"
        compile "org.grails.plugins:cache:4.0.0"
        compile "org.grails.plugins:scaffolding:3.3.3"
        compile "org.grails.plugins:views-json:1.2.3"
        compile "org.grails.plugins:views-json-templates:1.2.3"

        compile "org.mindrot:jbcrypt:0.3m"
        compile "org.grails.plugins:mail:2.0.0"
        compile "mysql:mysql-connector-java:8.0.13"
        compile "org.grails.plugins:cookie:2.0.4"
        compile "org.grails.plugins:gsp:3.3.0.RC1"
        compile "com.google.guava:guava:20.0"
        compile "org.grails:grails-datastore-rest-client:6.1.5.RELEASE"
        compile "org.jetbrains:annotations-java5:15.0"
        compile "org.apache.httpcomponents:httpclient:4.5.3"
        compile "org.apache.commons:commons-io:1.3.2"
        compile "org.grails.plugins:cache-headers:2.0.2"
        compile "com.stripe:stripe-java:9.6.0"
        compile files("libs/basecommerce-sdk-5.1.93.jar")
        compile "com.atlassian.commonmark:commonmark:0.10.0"
        compile "net.htmlparser.jericho:jericho-html:3.3"
        compile "org.grails.plugins:database-migration:3.0.3"
        compile "org.liquibase:liquibase-core:3.5.3"
        compile "org.grails.plugins:quartz:2.0.13"
        compile "redis.clients:jedis:2.9.0"
        compile "org.grails.plugins:external-config:1.1.2"
        compile "org.grails.plugins:cascade-validation:3.0.1"
        compile "com.beanstream.api:beanstream:1.0.0"
        compile "org.jsoup:jsoup:1.13.1"

        implementation "io.nats:jnats:2.8.0"

        console "org.grails:grails-console"

        profile "org.grails.profiles:web-plugin"

        runtime 'org.grails.plugins:grails-console:2.1.1'
        runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.1"
        runtime "com.h2database:h2"

        testCompile "org.grails.plugins:geb:1.0.2"
        testCompile "org.grails:grails-datastore-gorm-test:$gormVersion"
        testCompile "org.grails:grails-gorm-testing-support:$testingVersion"
        testCompile "org.grails:grails-web-testing-support:$testingVersion"

        testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.52.0"
        testRuntime "net.sourceforge.htmlunit:htmlunit:2.9"
}

sourceSets {
        main {
                resources {
                        srcDir 'grails-app/migrations'
                }
        }
}

boolean debug = true
bootRun {
        List<String> args = ['-Dspring.output.ansi.enabled=always']
        if (debug) {
                args << '-Xdebug'
                args <<
'-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n'
        }
        jvmArgs(args)
}```
0 Answers
Related