-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No value has been specified for property 'classpath' #207
Comments
I'd need to see a full example to see what's going on here. Can you put together a GitHub repository that reproduces the issue and doesn't point to your internal binary repository? Make sure to check in your Gradle wrapper. |
here is a project that reproduces the problem: https://github.com/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" in the bug branch, I added the sonarqube plugin, the cargo plugin don't works I hope it can help you |
Do me a favor and check in the Gradle Wrapper with the version you are using for your project. I am already using Gradle 8 which your project isn't compatible with anymore. A couple of things you should address up-front:
|
I am using gradle version 6.9. I know that if I want to use the 7+ version, I have to replace compile and ... I did not configure the cargo plugin in a sub-project. the gradles files which is in externalGradles are not part of the project. There is only domain, service, web as a sub-project. The goal is to have gradle files common to all my projects in order to avoid code duplication. So I have to configure the plugin in the root project for it to work. And it works, provided you don't add a second plugin. I can try upgrading to gradle 8. |
You configure the plugin in You may think that adding a second plugin is the issue, but it may just cause some evaluation to happen that you don't see otherwise. The real reason is the one above. |
Ok, i just pushed in the bug branch in order to be compabtible with gradle 8. I understand your explanation, but I don't see how to solve it? If I remove from the root project, I get the following error: if I remove it from deployment.gradle I get the following error:
can you tell me what to change? |
You are running into a "limitation" of how Gradle handles classpaths for different contexts, my guess.
Sorry, I can't give you any concrete "fix" or guidance. I simply don't have the time for it. I'd recommend asking about this on the Gradle forum or community Slack channel. Personally, I'd try to move the build code to where it belongs first without the use of script plugins. Then as a next step, implement the logic as binary plugins under |
I tried to put the use of the cargo plugin in the web project. apply from: System.getenv('GRADLE_UTILS') + '\fedris\deployment.gradle' and then to use the sonar plugin in the root project. but i still get the same error `buildscript { apply plugin: 'org.sonarqube'` |
but if i do the opposite, put sonar in web and cargo in root, it seems ok |
@bmuschko you can close this, it has nothing to do with your plugin. But you should maybe consider at some point removing the usage of internal convention mapping functionality and replacing it by the proper public APIs. :-) Not that it would have changed anything in this case. |
@Vampire Thanks, I provided most of your points here: #207 (comment). Happy to accept a PR to change convention mapping as I am not planning to work on it myself at this time. See README.md. |
I only found this issue after I answered there. |
@Vampire No worries. This was more of a general statement to community. Thanks! |
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)
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 cago to no longer work. It gives me the following error:
**A problem was found with the configuration of task ':undeployFromGlassfish'.
how can i solve this problem? I imagine that it is possible to use several plugins at the same time
The text was updated successfully, but these errors were encountered: