This message was deleted.
# community-support
s
This message was deleted.
v
Imho it is anyway a bad idea to publish a spring boot jar to a Maven repository. Maven repositories are for libraries and even publishing a fat library is a bad idea. But if you really need it, I guess what you found is still the way to publish the boot jar instead of the plain jar. Your second variant is actually just pseudo-lazier to date, as the configurations container is not treated lazily by Gradle. You can do it like that in case it is in the future, but right now it does not bring any benefit.
c
I agree with you wrt publishing bootJar, that was just the example code 😉
I would have liked to avoid it, but I need to publish a gradle plugin as a shadowed jar, That required some unfortunate outgoing artifact games.
v
It does not, it just works, given you use the Gradle plugin publish plugin and the shadow plugin.
c
How does the gradle pluigin publsih plugin work with the maven publsih plugin? We want to be able to publish this plugin to our internal maven repository.
v
It configures it. So you probably just need to define your publishing repository
c
Would we disable the gradle plugin publish plugin from publishing to upstream gradle? Or is it fine just applied as is? Fwiw we’re currently only using maven-publish + gradle-java-plugin
v
Actually it is even easier. The shadow plugin even provides a dedicated component for easy publishing, so you don't need the Gradle plugin publish plugin
c
Yeah we tried that but it just handed us a broken pom file
There was a regular dependencies block , then another empty dependencies block
Copy code
<depenencies>
...snip...
</dependencies>
<dependencies/>
Ok, ended up getting lucky. We won’t need to shade dependencies in our plugin, as there’s a variant of a dependency that comes pre-shaded. I get to throw all this complexity out.
Thanks regardless @Vampire!
👌 1
v
c
Interesting, so I’m not going crazy. I’ll give that thread a follow. Thanks for digging the issue up!
👌 1