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
0
votes
0 answers

Filter mavenContent not working in maven-publish

I'm trying to publish an artifact to a corporate repository. I set up the maven-publish plugin as follows (I use build.gradle.kts): plugins { `java-library` `maven-publish` } val nexusUsername: String by project val nexusPassword: String by…
morohon
  • 11
  • 1
  • 3
0
votes
0 answers

How to gradle publish a non SNAPSHOT?

I am using the maven-publish plugin to publish to an internal repo. What I can't figure out is how to publish so that the -SNAPSHOT is not part of the tag. I know if I am in master branch in git it does but I need it to do it on another non-master…
Greg
  • 1
0
votes
0 answers

Why is Gradle does not able to find the publish task on CI when it does so locally?

I have an Android library project that looks like this: my-project ├── build.gradle.kts <- project level gradle file ├── gradle │   └── wrapper │   ├── gradle-wrapper.jar │   └── gradle-wrapper.properties ├── gradle.properties ├──…
dlggr
  • 741
  • 7
  • 15
0
votes
0 answers

How to override the numbering scheme used for SNAPSHOT versions in Gradle's maven-publish plugin?

I'm using the maven-publish plugin in my Gradle build. When my project's version includes -SNAPSHOT (eg, 1.3-SNAPSHOT), it publishes with a generated version, like foo-1.3-20230418.171737-3.war. How can I customize the snapshot version suffix…
E-Riz
  • 31,431
  • 9
  • 97
  • 134
0
votes
1 answer

Sign with keystore then publish with maven-publish

I want to publish an Android library (.aar) to a Maven Repository. I manage to do it using the signing and maven-publish gradle plugins. But the signing plugin does not seem to work with a keystore file: it seems to take something like…
JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
0
votes
0 answers

Automatic versioning of dependencies when running maven-publish in gradle with platform dependencies

I very often use the following entry implementation(platform("org.springframework.boot:spring-boot-dependencies:3.0.4")) It works fine until it comes to maven-publish. The problem is that it also publishes this entry. When I use library in other…
Spliterash
  • 191
  • 3
  • 9
0
votes
0 answers

publishing a library - how to make it so that consuming app doesn't need to add repositories for transient dependencies

I've created an Android library called Library and I want to publish it to a private maven repository and then consume it in an app called App. I am encountering an issue however which is making the usage of the library untenable for App. The issue…
Thomas Cook
  • 4,371
  • 2
  • 25
  • 42
0
votes
2 answers

Unable to use any class,interface or fun created in jetbrains.compose module into non jetbrains.compose module

In Kotlin multiplatform when i try to use compose module interface or class in non-compose module getting this error when i do maven-publish in windows and ios. For example i created a project and added PR with error…
YLS
  • 1,475
  • 2
  • 15
  • 35
0
votes
0 answers

Task 'install' is ambiguous in root project. Candidates are: 'installDebug', 'installDebugAndroidTest'

I'm using android studio bumblebee , gradle version 7.4 , gradle plugin version 7.3.1. I'm trying to publish my library on maven using this guide Jitpack Github But when i try to run ./gradlew install it shows ambiguos error. And if i try to publish…
Pratik
  • 61
  • 1
  • 8
0
votes
0 answers

What is the difference between maven publish with artifact() and components?

When you want to publish your library, there are two ways to do it. Using artifact() publishing { publications { aar(MavenPublication) { groupId packageName version = libraryVersion artifactId…
Murat
  • 3,084
  • 37
  • 55
0
votes
1 answer

Unable to push artifacts to mavenLocal in multimodule gradle project

I am trying to publish to my local repositories I have a multi module project. For one of the sub project, I am trying to publish to local maven repo. But nothing is pushed but task is success. Am I missing something plugins { id…
Patan
  • 17,073
  • 36
  • 124
  • 198
0
votes
0 answers

Gradle + Kotlin: publishing to maven after researchgate release

Using Gradle 7.5.1 and Kotlin DSL scripts. I have a multi-project that publishes individual libraries to Maven - this is working. I'm also using the researchgate release plugin to tag and bump the version number - this is also working. What I would…
0
votes
1 answer

publish pre-built jars to nexus repo using gradle

I am trying to publish obfuscated jars to nexus repo. I created a task to obfuscate the code using proguard, then a task that copy the obfuscated jars into build folder. task proguard (type: proguard.gradle.ProGuardTask) { println("Performing…
0
votes
1 answer

What is the proper way to migrate this pom maven task to maven-publish?

I have this task in my build.gradle file that was using maven: task pom { doLast { pom { project { groupId "${project.group}.${project.name}" artifactId project.name version…
Cannolium
  • 23
  • 3
0
votes
1 answer

How to add author information to published gradle module metadata

When i run the generateMetadataFileFormMavenPublication task, i get a json at build/publications/maven/module.json which is missing these fields: name, description, minimumCoreVersion, title, version, author. IntelliJ prompts me to add them back in.…
Dave Ankin
  • 1,060
  • 2
  • 9
  • 20