Questions tagged [maven-publish]

A Gradle plugin for publishing build artifacts to an Apache Maven Repository.

https://docs.gradle.org/current/userguide/publishing_maven.html

219 questions
5
votes
0 answers

How to Include sub module dependency when publish library with maven-publish

I have 2 modules, first one is module-to-publish, second one is module-base. Now I want to publish module-to-publish to mavenCentral with module-base inside. What should I do to include module-base.
boybeak
  • 417
  • 5
  • 19
5
votes
2 answers

How do I include Groovy Extension methods in jar?

I have a groovy library that I publish as a jar file on a nexus repository. When I use extension methods in the library from another project's Gradle script, I get a MissingMethodException. As a reference, say I have a String extension method, such…
Phil
  • 35,852
  • 23
  • 123
  • 164
5
votes
1 answer

gradle 6.x kotlin spring-boot jar publish fails, workaround in gradle-kotlin-dsl needed

gradle 6.x release notes tells us that maven-publishing of boot-jars doesn't work because the default jar task is disabled by the spring-boot plugin. A workaround is to tell Gradle what to upload. If you want to upload the bootJar, then you need to…
5
votes
0 answers

Failed to publish publication 'mavenJava' to repository 'maven'

I am trying to upload a library to mavencentral for the first time. I get to build and run some tasks from maven-publish gradle plugin. But, On publish task, I get below error. * What went wrong: Execution failed for task…
Naresh
  • 99
  • 3
  • 14
5
votes
2 answers

How to publish an Android .aar file to Artifactory

I have an Android .aar project called "myLibAndroid". The directory structure has a root-level "build.gradle" file and a sub-directory called "library" that also contains a "build.gradle" file. The .aar file builds fine but fails to publish to…
Bungles
  • 1,969
  • 2
  • 25
  • 54
5
votes
3 answers

Maven-publish cannot not apply withXML on pom file (No signature of method)

Ok, so I am having the exact issue as described here: Android library dependencies missing from POM with Gradle I copied the provided answer to my gradle file as follows: publishing { publications { mavenAar(MavenPublication) { …
DAC
  • 231
  • 4
  • 12
4
votes
1 answer

jar file is not getting generated in maven local repository after running publishToMavenLocal

I am trying to get a jar generated so I can use it as a dependency for a different project. In the build.gradle, I have defined the maven-publish id and the publishing tasks, but only the following files are generated - but I need the…
4
votes
2 answers

Gradle 7 Migration: Failed to apply PublishPlugin (maven-publish): Cannot run afterEvaluate when the project is already evaluated

After upgrading Gradle from 6.8 to 7.1.1 I'm getting: A problem occurred evaluating script. > Failed to apply plugin class 'org.gradle.api.publish.plugins.PublishingPlugin'. > Cannot run Project.afterEvaluate(Action) when the project is already…
hb0
  • 3,350
  • 3
  • 30
  • 48
4
votes
0 answers

maven-publish missing artifact to repository

II'm trying to publish my lib but i'm having some problems related to its publication. I'm using this library https://github.com/vanniktech/gradle-maven-publish-plugin to publish my project on maven central (oss), but, this for some reason only…
Thiago Souto
  • 761
  • 5
  • 13
4
votes
2 answers

How to build and maven-publish a flutter aar?

I am working on a flutter project and I am building aar out of it. This aar I am able to integrate into my native android project by following the instructions provided by the flutter. But my problem is that this aar is integrated locally. I want to…
Rishabh Maltare
  • 161
  • 2
  • 12
4
votes
0 answers

Can I simply use the maven-publish Gradle plugin to upload to Bintray or do I HAVE to use the Bintray plugin

I can publish artifacts using the JFrog Bintray Gradle plugin, but am getting a 405 when trying to use maven-publish plugin. All the examples I've found use the JFrog plugin. My Bintray repo is a Maven one and would like to stay with the generic…
Silver
  • 41
  • 1
4
votes
0 answers

Gradle publish RPM to Nexus Yum Repo fails on sha1 file

I am trying to publish an RPM artifact from our project into a Yum Repo on Nexus via Gradle: publishing { repositories { ivy { url 'http://myrepo:8081/repository/myproject' credentials { username…
ChrisDekker
  • 1,584
  • 18
  • 39
4
votes
2 answers

Maven-Publish does not publish API/Implementation dependencies in POM

I am using maven-publish plugin in gradle to publish artifacts. I need to generate a POM file that contains dependencies so that my consumers can fetch the needed dependencies. Since maven-publish does not by default contains dependencies onto POM…
bj4947
  • 880
  • 11
  • 32
4
votes
1 answer

How can i publish snapshots when using sbt with the bintray-sbt plugin?

I recently published a package to bintray and added it to jcenter now, which enables me to publish my snapshots to oss.jfrog.org. I am using the bintray-sbt plugin for publishing. To publish snapshots i added the following directive to my…
Richard
  • 1,117
  • 11
  • 31
4
votes
1 answer

Gradle publish to maven repository with scp and private key

I have a gradle project which I want to upload to a private remote maven repository using SCP with a private key. How to do this?
R Gastmeier
  • 101
  • 6
1 2
3
14 15