Hi,
I use the cargo plugin (2.8.0) to deploy on payara servers.
To do this, I have a gradle file (master) which contains this:
buildscript {
repositories {
maven {
url = "http://w2016-nexus.fedris.be:8089/nexus/repository/maven-central/"
}
maven {
url = "http://w2016-nexus.fedris.be:8089/nexus/repository/plugin-gradle/"
}
}
dependencies {
classpath("com.bmuschko:gradle-cargo-plugin:2.8.0")
}
}
and my cargo tasks are in another gradle file (deployment.gradle - not in project)
apply from: System.getenv('GRADLE_UTILS') + '\\fedris\\deployment.gradle'
Everything works fine.
but now I want to use Sonarqube plugin. So I modified my dependencies to add this plugin.
So I have this in my buildscript
buildscript {
repositories {
maven {
url = "http://w2016-nexus.fedris.be:8089/nexus/repository/maven-central/"
}
maven {
url = "http://w2016-nexus.fedris.be:8089/nexus/repository/plugin-gradle/"
}
}
dependencies {
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513")
classpath("com.bmuschko:gradle-cargo-plugin:2.8.0")
}
}
simply adding a new classpath in the dependencies causes cargo to no longer work. It gives me the following error:
A problem was found with the configuration of task ‘:undeployFromGlassfish’.
No value has been specified for property ‘classpath’.
how can i solve this problem? I imagine that it is possible to use several plugins at the same time
here is a project that reproduces the problem: GitHub - morayKevin/cargo_bug
I am currently using gradle 6.x but I have the same problem with gradle 7.x. I didn’t test with gradle 8.x
in the master branch, the cargo plugin “works”
gradle undeployFromGlassfish -Pbranch=environment/test -PuserLogin=login -PuserPassword=password
I get an error from the cargo plugin just normal:
java.lang.IllegalStateException: error submitting remote command
and displaying classpath gives this:
Cargo classpath : configuration ‘:cargo’
in the bug branch, I added the sonarqube plugin, the cargo plugin don’t works
gradle undeployFromGlassfish -Pbranch=environment/test -PuserLogin=login -PuserPassword=password
I get an error with the classpath:
No value has been specified for property ‘classpath’.
and displaying classpath gives this:
Cargo classpath : null