case-sensitivity issue with plugins in gradle build
Morning...
Strange problem here. I have the follow plugin requirements in the intellij {} block in my build.gradle:
plugins = ["Groovy", "maven"]
This produces the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve org.jetbrains.plugins:maven:2016.3.
Required by:
project :
> Could not resolve org.jetbrains.plugins:maven:2016.3.
> inconsistent module metadata found. Descriptor: com.jetbrains:idea:2016.3 Errors: bad group: expected='org.jetbrains.plugins' found='com.jetbrains'
bad module name: expected='maven' found='idea'
> Could not resolve org.jetbrains.plugins:maven:2016.3.
> inconsistent module metadata found. Descriptor: org.jetbrains.plugins:Groovy:2016.3 Errors: bad module name: expected='maven' found='Groovy'
> Could not resolve org.jetbrains.plugins:maven:2016.3.
> inconsistent module metadata found. Descriptor: org.jetbrains.plugins:Maven:2016.3 Errors: bad module name: expected='maven' found='Maven'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.616 secs
inconsistent module metadata found. Descriptor: com.jetbrains:idea:2016.3 Errors: bad group: expected='org.jetbrains.plugins' found='com.jetbrains'
bad module name: expected='maven' found='idea'
I can fix on that on windows and mac by changing the casing to Maven. The problem is then that that fails on our CI servers which run CentOS. What works on CentOS is all lower-case maven.
Has anyone seen this before?
cheers, jamie
请先登录再写评论。
I didn't create an issue. Here is the fix: https://github.com/JetBrains/gradle-intellij-plugin/commit/d136f4fa7eb2da146970c46554fcca99a0ce3d87. I'll publish the new version in a few days. Meanwhile, you can try https://jitpack.io/#JetBrains/gradle-intellij-plugin/
Hi,
Sorry for a delay. As it's stated in documentation for bundled plugins a plugin's directory is used as a name of plugin-dependency. This means that the case-insensitivity of the name is defined by file-system. The proper value is `plugins = ["Groovy", "maven"]`.
Anyway, I've recreated the issue and will fix it in the next release. Meanwhile, please try to remove Gradle cached at $HOME/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ and use `maven` in lower case,
Thanks - I'm able to work round this for now doing what you say (well actually I need to mv it to the correct case), but requires similar workaround for the CI system which is a pain. Do you have an issue reference that I can follow?
Awesome, thanks. I need a custom build of the gradle plugin anyway so I'll just grab the change. Thanks again.