Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Error: No method add() found for arguments

So I'm adding a custom plugin to Gradle, specifically jmeter. https://github.com/kulya/jmeter-gradle-plugin

I thought everything worked, but now this error is occuring:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\rstraubel\Documents\DataCentral\build.gradle' line: 21

* What went wrong:
A problem occurred evaluating root project 'DataCentral'.
> Could not find method add() for arguments [jmeterEditor, class com.github.kulya.gradle.plugins.jmeter.JmeterRunGuiTask] on task set.

Line 21 is just where I call plugin: 'jmeter' Everything else specified in the github has been done. Any ideas? Thanks

Edit: Full Build.gradle

buildscript {
ext {
    springBootVersion = '1.0.2.RELEASE'
}
repositories {
    mavenCentral()
    maven { url "http://repo.spring.io/libs-milestone"}
    mavenLocal()
}
dependencies {
    classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    classpath("com.github.kulya:jmeter-gradle-plugin:1.3.1-2.6")
}
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'idea'
apply plugin: 'sonar-runner'
apply plugin: 'jmeter'

jar {
baseName = 'datacentral'
version =  '0.0.1-SNAPSHOT'
}

repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-milestone" }
maven { url "http://m2.neo4j.org" }
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-data-    mongodb:${springBootVersion}"
compile "com.fasterxml.jackson.core:jackson-databind"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.data:spring-data-mongodb"
compile "org.mongodb:mongo-java-driver:2.12.0-rc0"
compile "org.springframework.data:spring-data-rest-webmvc"
testCompile "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
 }


jmeterRun.configure {
jmeterTestFiles = [file("src/test/jmeter/TestCases.jmx")]
}

 sonarRunner {
sonarProperties {
    property "sonar.host.url", "http://hawkeye.control-tec.com:9000"
    property "sonar.jdbc.url", "jdbc:mysql://bluestreak.qualifier.control-tec.com:3306/sonar?useUnicode=true&characterEncoding=utf8"
    property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
    property "sonar.jdbc.username", "sonar"
    property "sonar.jdbc.password", "sonar-pass"

    property "sonar.projectKey", "com.controltec.incontrol.qualifier:Data-Central"
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
like image 883
ObligatorRory Avatar asked Dec 07 '25 03:12

ObligatorRory


1 Answers

Most likely, the jmeter plugin hasn't been updated to support Gradle 2.0. You can verify by trying with 1.12.

like image 172
Peter Niederwieser Avatar answered Dec 09 '25 19:12

Peter Niederwieser