Gradle docker plugin not works

Hi,

I try to integrate an plugin for docker in gradle.

When I try to execute the task to create the .jar, I get this problem:

FAILURE: Build failed with an exception.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring root project 'starterProject'.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all artifacts for configuration ':classpath'.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]    > Could not find com.bmuschko:gradle-docker-plugin:X.Y.Z.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]      Searched in the following locations:
13:48:12.253 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://plugins.gradle.org/m2/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.pom
13:48:12.253 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://plugins.gradle.org/m2/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.jar
13:48:12.253 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://repo.cuba-platform.com/content/groups/work/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.pom
13:48:12.254 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://repo.cuba-platform.com/content/groups/work/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.jar
13:48:12.254 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://jcenter.bintray.com/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.pom
13:48:12.254 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          https://jcenter.bintray.com/com/bmuschko/gradle-docker-plugin/X.Y.Z/gradle-docker-plugin-X.Y.Z.jar
13:48:12.254 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]      Required by:
13:48:12.256 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]          project :
13:48:12.256 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
13:48:12.256 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
13:48:12.256 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]  Run with --scan to get full insights.

Does anyone have an idea, how to solve it?

This is how the buildscript looks now:

buildscript {
    ext.cubaVersion = '6.8.5'
    repositories {
        
        maven {
            url 'https://repo.cuba-platform.com/content/groups/work'
            credentials {
                username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba')
                password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
            }
        }
		
		//added
		 jcenter()
        
    }
    dependencies {
        classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
		
		//added
		classpath "com.bmuschko:gradle-docker-plugin:X.Y.Z"
    }
	

} 

Thanks

Hi,

You have to replace X.Y.Z with the concrete version:

> Could not resolve all artifacts for configuration ':classpath'.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]    > Could not find com.bmuschko:gradle-docker-plugin:X.Y.Z.
13:48:12.252 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]      Searched in the following locations:
1 Like

Thats a good idea, but I am new in this topic…and dont know how to find it :frowning:
About tips, I would be thankful, then I could understand…how to find the version, or where I can read the newest version…

Check releases of the plugin on GitHub: Releases · bmuschko/gradle-docker-plugin · GitHub

so, I would just replace X.Y.Z. with “v3.2.6” ? As example?

Thanks :smiley: :see_no_evil:

In your case 3.2.6 actually. “v” is just a tag prefix

Ok, thanks a lot. Now I understand