smallrye-graphql
smallrye-graphql copied to clipboard
smallrye-graphql-gradle-plugin not published on Gradle Plugin Portal
Hi @phillip-kruger
It seems the smallrye-graphql-gradle-plugin
jar is not published on maven central.
Do you know if the exec-maven-plugin
inside the pom was executed?
Maybe something else is needed as well... it's a bit complicated as to create a Gradle plugin jar you have to use Gradle ;-)
See: https://repo1.maven.org/maven2/io/smallrye/smallrye-graphql-gradle-plugin/1.0.3/ (it only contains the pom, not the jar)
Looking further we might also think about publishing the plugin to the Gradle Plugin Portal.
PS: I had locally a smallrye-graphql-gradle-plugin
1.0.2
in my m2 repo and that one works as expected. Also in combination with the Quarkus GraphQL integration part of Quarkus 1.5.0 👍
Hmm. Perhaps it is because the gradle plugin project declares its packaging to be pom
and it should be jar
?
https://github.com/smallrye/smallrye-graphql/blob/1.0.3/tools/gradle-plugin/pom.xml#L15
https://github.com/smallrye/smallrye-graphql/blob/1.0.3/tools/gradle-plugin/pom.xml#L122 This could also be part of the problem?
Yes that could be.
When setting it up I already some doubts this would work the first time ;-). The pom setup is based on Quarkus as they also have Maven build with a Gradle plugin project. Note they also skip deploying the project but a bit different: https://github.com/quarkusio/quarkus/blob/master/devtools/gradle/pom.xml#L124-L133
Maybe we could ask @gsmet or @gastaldi from the Quarkus team for advise?
@marceloverdijk right, that depends if you're using the nexus-staging-plugin
in the release. The trick in Quarkus is that we run gradle publishPlugin
after the release is performed (to deploy to the Gradle Plugin portal), so it makes little sense to deploy it to maven central.
On a side note, I have a feeling that the build-helper-maven-plugin
is useless here too (I'll look into removing it from the quarkus gradle plugin's pom.xml)
thx @gastaldi , maybe smallrye-graphql
can take the same approach @jmartisk @phillip-kruger? That way we would also have the plugin to the Gradle Plugin Portal.
Sounds good to me. Our CI build and release is in .github folder as we are using GitHub actions. So maybe see if you can fix it there ?
@phillip-kruger I've created PR #279 but it is only a part of getting the plugin published.
I've not used Github actions before so I feel a bit uncomfortable. Also an account needs to be created on the Gradle Plugin Portal and a key/secret to be created which probably can be owned by someone from the SmallRye team .
@phillip-kruger thx for merging the PR. what do you think about creating the Gradle Plugin Portal account?
Hi @marceloverdijk. Yes let me check with @kenfinnigan and/or @radcortez .
@marceloverdijk The gradle key and secret is now available in GH Secret:
GRADLE_PUBLISH_KEY GRADLE_PUBLISH_SECRET
That should do it right ?
I think we need to do:
- Updating
gradle.properties
automatically after therelease:prepare
goal as @jmartisk mentioned: https://github.com/smallrye/smallrye-graphql/pull/279#issuecomment-638847917 - And the running
gradle publishPlugins -Pgradle.publish.key=<key> -Pgradle.publish.secret=<secret>
as build step
and then hope it works :-D
Hi @marceloverdijk - are you planning to make the changes above ?
Hi @phillip-kruger I’m leaving on holiday tomorrow so it will be at least after my holidays...
Cool ! Enjoy your time off :)
Is this plugin published? I tried following the instructions in the README and the plugin wasn't found, ultimately trying to resolve my problem led to this still-open issue. I don't see any release logic in the github actions, so it's hard to tell if the release logic got built somewhere else.
@zandaleph no it's not being published. If you know how you are welcome to contribute :)
Thanks for the quick response! I don't know much about Gradle plug-ins just yet, hence my confusion. But I might take a crack at it if I get a chance. Does the Maven plug-in work as expected here?
As far as I know. @jmartisk ?
The Maven plugin generally should work, except of course the serious problem https://github.com/smallrye/smallrye-graphql/issues/1102 that I've just found :) but it works in the sense that it's in public Maven repos and can be used
I'm trying to use this plugin and not being successful importing it. (gradle kts)
plugins {
java
id("io.quarkus")
id("io.smallrye.graphql").version("1.0.2-SNAPSHOT")
}
error message:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/rui/Projects/metadata-viewer/build.gradle.kts' line: 1
* What went wrong:
Plugin [id: 'io.smallrye.graphql', version: '1.0.2-SNAPSHOT'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.smallrye.graphql:io.smallrye.graphql.gradle.plugin:1.0.2-SNAPSHOT')
Searched in the following repositories:
MavenLocal(file:/Users/rui/.m2/repository/)
MavenRepo
Gradle Central Plugin Repository
@jmartisk opened a PR to fix this, there is still some work needed to to this in the GH Actions, but this should be a good start. PR: https://github.com/smallrye/smallrye-graphql/pull/1351
This has been resolved for some time (see https://plugins.gradle.org/plugin/io.smallrye.graphql), so I'll close it