ArtifactoryPublish fails with null pointer exception - gradle

I have a java library which I want to upload to jfrog artifactory. But no matter what I do I get a null pointer exception:
Execution failed for task :util-lib-java:artifactoryPublish.
java.lang.NullPointerException (no error message)
It worked perfectly fine on the 3rd October this year, and failed on the 10th. We then referenced version: classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.*" and what I can see jfrog updated their library from 4.4.5 to 4.47 between these dates. But now when I'm trying with various versions I only get the error specified above.
My build.gradle looks like:
buildscript {
repositories {
jcenter()
maven {
url "${artifactory_contextUrl}/plugins-release"
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
dependencies {
//Check for the latest version here: http://plugins.gradle.org/plugin/com.jfrog.artifactory
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.2"
}
}
apply plugin: 'java'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
repositories
{
mavenCentral()
maven {
url "${artifactory_contextUrl}/libs-release-local"
}
maven {
url "${artifactory_contextUrl}/libs-snapshot-local"
}
}
// Android project is also using this library, so java version cannot be 1.8
sourceCompatibility = 1.7
targetCompatibility = 1.7
publishing {
publications {
mavenJava(MavenPublication) {
// Set the base name of the artifacts
artifactId 'util-lib-java'
groupId group
version version
from components.java
}
}
}
artifactory {
contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
if ( project.version.endsWith('-SNAPSHOT') ) {
repoKey = 'libs-snapshot-local'
} else {
repoKey = 'libs-release-local'
}
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
defaults {
publications ('mavenJava')
}
}
}
and the top-level build.gradle looks like:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
version = '1.0'
group = 'com.companyname'
repositories {
jcenter()
}
}
We're using gradle-2.14.1-bin.zip wrapper.
Stacktrace from build:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':util-lib-java:artifactoryPublish'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.NullPointerException
at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.prepareAndDeploy(BuildInfoBaseTask.java:346)
at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.collectProjectBuildInfo(BuildInfoBaseTask.java:132)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
What am I missing here? This issue don't help me

Should be noted for folks stumbling across this issue that it should be resolved with the latest release: 4.4.10
https://github.com/JFrogDev/build-info/issues/101

For publishing you have to remove this lines in you gradle.properties or local.properties:
org.gradle.configureondemand=true
org.gradle.daemon=true
Also you have to add this in the main build.gradle file.
allprojects {
apply plugin: 'com.jfrog.artifactory'
...
}
After that the publishing should be work.

Related

Fail to upload jar file to jcenter: 405 code

I have the following build.gradle file:
apply plugin:'java'
apply plugin:'groovy'
apply plugin:'eclipse'
apply plugin:'maven'
configurations {
deployerJars
}
repositories{
jcenter()
mavenCentral()
}
version '0.1.2'
group 'io.example'
dependencies{
implementation 'org.codehaus.groovy:groovy-all:2.4.10'
testImplementation 'org.spockframework:spock-core:1.0-groovy-2.4'
}
dependencies{
deployerJars "org.apache.maven.wagon:wagon-http:2.2"
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository( url:'https://my-private-repo.bintray.com' ){
authentication userName:'myName', password:'secret' }
}
}
If I run the task, I'm getting an exception:
Execution failed for task ':uploadArchives'.
Could not publish configuration 'archives'
Failed to deploy artifacts: Could not transfer artifact ...... Return code is: 405, ReasonPhrase: Method Not Allowed.
I tried using maven-publish plugin with no luck either.
What am I missing?

Deploy my Gradle (Spring Boot) app in Heroku

I have a gradle + spring boot application with the following build.gradle file:
buildscript {
ext {
springBootVersion = '2.0.0.BUILD-SNAPSHOT'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'teambuilting'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-actuator-docs')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.data:spring-data-rest-hal-browser')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-web-services')
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
But, when I am trying to deploy my master branch in Heroku, I get the following error:
-----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/gradle.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
I added in the Buildpacks, heroku/gradle. What else am I missing?
you have to define in the dashboard that the project use the buildpack for Gradle. In the build.gradle, has to add this task:
task stage {
dependsOn build
}
and create a Procfile to indicate the next steps once heroku build your software.
Juan Antonio

publish grails3 plugin to artifactory - differences in generated poms

I'm trying to publish a snapshot of grails 3 plugin to remote maven repository (Artifactory). Here is my build script:
import org.springframework.util.StringUtils
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
maven { url "${artifactory_contextUrl}"
credentials {
username "${artifactory_user}"
password "${artifactory_password}"
}
name = "remote-maven-repo"
}
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.2"
}
}
plugins {
id "io.spring.dependency-management" version "0.5.2.RELEASE"
id "com.jfrog.bintray" version "1.2"
}
String baseVersion = "0.1.0-%customer%-SNAPSHOT"
String currentVersion = "$baseVersion".replaceAll('%customer%',property('plugin.default.customer').toUpperCase())
version currentVersion
group "org.grails.plugins"
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: "com.jfrog.artifactory"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "spring-boot"
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-gsp"
println "Current customer mode: [${property("plugin.default.customer")}]"
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
String defaultVersion = "default"
// Custom versioning scheme, take version of dependency with 'default' version from gradle.preperties
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.version == defaultVersion) {
customer = property("plugin.default.customer")
String version = resolveDefaultVersion(details.requested.group, details.requested.name, customer)
details.useVersion(version)
}
}
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
String resolveDefaultVersion(String group, String name, String customer) {
if(group == 'com.mycompany.domain' && name == 'custom-lib'){
String version = property("custom-lib.${customer}.version")
println "resolved artifact [$group.$name] version [$version]"
return version
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
add buildscript.repositories.getByName("remote-maven-repo")
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
provided 'org.springframework.boot:spring-boot-starter-logging'
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-autoconfigure"
provided "org.springframework.boot:spring-boot-starter-tomcat"
provided "org.grails:grails-web-boot"
provided "org.grails:grails-dependencies"
provided 'javax.servlet:javax.servlet-api:3.1.0'
testCompile "org.grails:grails-plugin-testing"
console "org.grails:grails-console"
//Security
compile "org.grails.plugins:spring-security-core:3.0.0.M1"
compile "org.grails.plugins:spring-security-acl:3.0.0.M1"
//Not grails3 compatible
//compile "org.grails.plugins:spring-security-oauth2-provider:2.0-RC5"
compile "org.grails.plugins:hibernate:4.3.10.6"
//configurable customer-dependent dependency, take version from gradle.properties
compile group: "com.mycompany.domain", name:"custom-lib", version:"$defaultVersion", changing: true
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
// gradle can't handle custom versioning scheme and will left com.mycompany.domain.custom-lib version value as 'default' in generated pom, we will fix it here.
pom.withXml {
asNode().get('dependencies').get(0).get('dependency').each { dep ->
String pomVer = dep.get("version").text()
String pomArtifactId = dep.get("artifactId").text()
String pomGroupId = dep.get("groupId").text()
if(pomVer == defaultVersion){
String customer = property("plugin.default.customer")
dep.get("version").get(0).setValue(resolveDefaultVersion(pomGroupId, pomArtifactId, customer))
}else if (StringUtils.isEmpty(pomVer)){
//gradle also left dependencies with provided scope in pom without version --> remove these dependencies
dep.replaceNode {}
}
}
}
}
}
repositories {
maven {
name 'myArtifactory'
url "${artifactoryContextUrl}/${(project.version.endsWith('-SNAPSHOT') ? snapshotRepoKey : releaseRepoKey)}"
credentials {
username = artifactory_user
password = artifactory_password
}
}
}
}
install.repositories.mavenInstaller.pom.whenConfigured { pom ->
pom.dependencies.findAll { it.version == defaultVersion }.each { dep ->
dep.version = resolveDefaultVersion(dep.groupId, dep.artifactId, property("plugin.default.customer"))
}
}
When I'm running gradle install - to install plugin in local m2 repo everything works fine, and pom looks good, it has dependencies with exactly the same scopes and versions, also provided dependencies are excluded from pom during publishing to local repository. When I'm running gradle publishMavenJavaPublicationToMyArtifactoryRepository pom is looking quite strange, gradle is ignoring defined in build script dependencies scopes and always using runtime. As an example:
pom after gradle install:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>spring-security-acl</artifactId>
<version>3.0.0.M1</version>
<scope>compile</scope>
</dependency>
pom after gradle publishMavenJavaPublicationToMyArtifactoryRepository:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>spring-security-acl</artifactId>
<version>3.0.0.M1</version>
<scope>runtime</scope>
</dependency>
Also pom after gradle install doesn't contain dependencies with scope provided. Pom.xml after gradle publishMavenJavaPublicationToMyArtifactoryRepository contains
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
without version, gradle doesn't like that.
Why am I receiving such different results? How can I generate the same pom for gradle publishMavenJavaPublicationToMyArtifactoryRepository as for gradle install. I don't like an opportunity to edit pom in publications section. Any help is highly appreciated.
This is a known limitation of the incubating new maven-publish plugin. The install task uses the "old"/stable Install task. If you really rely on these scopes, one workaround might be to use the gradle based "uploadArchives" task instead of relying on the bintray plugin for publishing your archives. Alternatively you can implement a fix by using the xml hooks of the new publish plugin.

build.gradle - error deploying artifact

I'm having issues with publishing to local nexus maven repository.
I admit, I don't have much experience with using gradle.
I will say that I have tried understanding the documentation and examples that are given through the gradle website (along with a few stackoverflow questions).
I am getting the following error when I try to publish:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
> Error deploying artifact 'com.myproject:myproject-sdk:jar': Error deploying artifact: Resource to deploy not found: File: http://git.site.com:8081/nexus/content/repositories/releases/com/myproject/myproject-sdk/3.0.0/myproject-sdk-3.0.0.jar does not exist
the entire build.gradle file looks like this:
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'build-version'
buildscript {
repositories {
maven { url "http://git.site.com:8081/nexus/content/groups/public" }
maven { url 'https://geonet.artifactoryonline.com/geonet/public-releases' }
mavenCentral()
}
dependencies {
classpath 'nz.org.geonet:gradle-build-version-plugin:1.+'
}
}
repositories {
maven {
url "http://git.site.com:8081/nexus/content/groups/public"
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile 'com.google.code.gson:gson:2.2.4'
compile 'commons-codec:commons-codec:1.9'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'myproject-sdk'
groupId = 'com.myproject'
version '3.0.0'
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
// nexus maven credentials
credentials {
username "MY_USERNAME"
password ""MY_PASSWORD"
}
if(version.endsWith('-SNAPSHOT')) {
url "http://git.site.com:8081/nexus/content/repositories/snapshots"
} else {
url "http://git.site.com:8081/nexus/content/repositories/releases"
}
}
}
}
I am using Android Studio and this project is a Java project.
I don't understand the message because it says "Resource to deploy not found" and it points to a url at nexus.
I would expect a message like "Resource to deploy not found: File: c:/directory_that_doesn't_exist/whatever.jar"
Additional Information -
The gradle tasks listed under 'All tasks' are:
assemble
build
buildDependents
buildNeeded
check
classes
clean
compileJava
compileTestJava
generatePomFileForMavenPublication
jar
javadoc
processResources
processTestResources
publish
publishMavenPublicationToMavenLocal
publishMavenPublicationToMavenRepository
publishToMavenLocal
sourceJar
test
testClasses

org.gradle.api.internal.LocationAwareException from gradle

I have a gradle build error from the following gradle file. But I am clueless why it failed.
Please advise.
Thanks,
buildscript {
repositories {
maven { url "http://repo.spring.io/libs-snapshot" }
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC4")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot' <== This is line 14
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
// tag::jetty[]
compile("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty")
// end::jetty[]
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator")
// end::actuator[]
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
#localhost hello]$ gradle
org.gradle.api.internal.LocationAwareException: Build file '/home/xxx/dev/src/main/java/hello/build.gradle' line: 14
A problem occurred evaluating root project 'hello'.
at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:85)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:31)
at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:20)
at org.gradle.launcher.Main.doAction(Main.java:48)
at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'hello'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:462)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:74)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:438)
at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:433)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
... 19 more
Caused by: java.lang.NoSuchMethodError: org.gradle.api.tasks.TaskContainer.create(Ljava/lang/String;Ljava/lang/Class;)Lorg/gradle/api/Task;
at org.springframework.boot.gradle.SpringBootPlugin.addRepackageTask(SpringBootPlugin.java:94)
at org.springframework.boot.gradle.SpringBootPlugin.applyRepackage(SpringBootPlugin.java:60)
at org.springframework.boot.gradle.SpringBootPlugin.apply(SpringBootPlugin.java:48)
at org.springframework.boot.gradle.SpringBootPlugin.apply(SpringBootPlugin.java:1)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:107)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:71)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:840)
That method create(String,Class<?>) was introduced in Gradle 1.6, so I suspect you have a mouldy Gradle wrapper (or some other messed up Gradle environment). The configuration says the wrapper generated is 1.11, but I think maybe you are running with an older version?

Resources