This message was deleted.
# plugin-development
s
This message was deleted.
v
You have a
gradle.publish.key
and
gradle.publish.secret
for your account in your user
gradle.properties
. If you publish with these credentials, you publish with your account and your account knows your E-Mail address.
m
Then I don't know what's happening, I'm trying to publish in the net.mbonnin group which is also my email linked in the portal 🤔
I get this:
Copy code
> Failed to post to server.
  Server responded with:
  Group id must not start with 'gradle.plugin'
  Plugin id 'net.mbonnin.sjmp' and group id 'gradle.plugin.net.mbonnin.sjmp' must use same top level namespace, like 'gradle.plugin' or 'net.mbonnin'
Let me double check everything
v
Do you maybe have an old plugin publish plugin that uses the former naming rules?
m
I'm on 0.21.0, which is the latest stable, I tried 1.0.0-rc2 but had issues with signing, I can try again
v
I guess latest stable is fine
The problem is not your E-Mail address, the problem is that you try to publish as
gradle.plugin.net.mbonnin.sjmp:your-plugin-project-name
when it should be
net.mbonnin.sjmp:your-plugin-project-name
m
Latest stable rc-2 worked 🎉
I have no idea where the
gradle.plugin
is coming from. I guess it's for the marker
v
No, it is not
It is because you don't have the
maven-publish
plugin
m
Aaaah yes indeed
v
As usual, 1 hour of trial and error can save you 5 minutes doc reading 😄
Group ID can't start with
gradle.plugin
The most likely scenario when this publication rejection happens is when the Plugin Publish Plugin is being used without relying on the Maven Publish Plugin for generating the publication metadata. In this scenario the Plugin Publish Plugin is itself adding this prefix to the M2 GAV of the plugin and the server no longer accepts it.
The preferred solution is to simply include the
maven-publish
plugin, as presented in the examples.
If for some reason you can't use this solution, then your other option is to use a
mavenCoordinates
block inside of your
pluginBundle
block to override the M2 GAV values, like so:
```pluginBundle {
mavenCoordinates {
groupId = "org.myorg"
artifactId = "greeting-plugins"
version = "1.4"
}
}```
👍 1
m
Alright, thanks. I might argue that a more descriptive error message would also have saved a bunch of time
But thanks for the help and pointers, as always!
v
You are right, but the error comes from the server it doesn't know how your build is configured. 🙂
👍 1
v
I just got exactly the same issue, and I spent notable time to figure out “mavenCoordinates” resolves the issue :((