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

Publishing artifact directly including gradle submodules

I want to publish a maven artifact from a project which includes all the classes from the submodules (like a fatJar) instead of having them as dependencies in the pom file in the published artifact. Assuming I have a gradle project setup…
noobNeverything
  • 212
  • 4
  • 14
3
votes
0 answers

Gradle maven-publish not updating metadata

I have a very simple Gradle project which generates a jar file, and I am applying the maven-publish plugin and calling the publish task to publish artifacts to Artifactory: build.gradle: apply plugin: 'maven-publish' command: ./gradlew…
Ufder
  • 527
  • 4
  • 20
3
votes
1 answer

Gradle's Maven Publish plugin not publishing POM or proper version to Maven Local

I am trying to get the Gradle Maven Publish Plugin to publish a snapshot version of my Java library to my local Maven repo such that: The version of the jar is 1.0.0.SNAPSHOT-, where is the current system time in millis…
hotmeatballsoup
  • 385
  • 6
  • 58
  • 136
3
votes
1 answer

D8 exception when using Square's Wire

After adding Square's Wire library for Protobuf support in an Android project, I'm getting the following D8 exception during compilation: D8: Program type already present:…
Splash
  • 1,310
  • 12
  • 20
3
votes
0 answers

Do not publish artifact to Nexus if project has not changed

I have two projects as part of my multi- project build, ProjectA and ProjectB. ProjectA has a compile dependency on ProjectB. I also have automatic build number increments, whereby each project contains a versions.json file containing the latest…
PCL
  • 421
  • 2
  • 7
  • 15
3
votes
1 answer

gradle publish jars with different classifiers, dependency missing

Gradle new maven-publish plugin: For multiple jars with different classifiers, e.g., source sets src/foo/java src/bar/java dependencies { fooCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' barCompile…
eastwater
  • 4,624
  • 9
  • 49
  • 118
3
votes
0 answers

publish jar dependencies with 'maven-publish' plugin

I have a gradle project in IntelliJ IDE in java. my dependencies is like this: apply plugin: 'maven-publish' dependencies { compile fileTree(dir: 'libs', include: '*.jar') testCompile group: 'junit', name: 'junit', version: '4.12' compile…
max
  • 5,963
  • 12
  • 49
  • 80
3
votes
2 answers

Get latest snapshot version from Maven Repository in Gradle

I have project which using Gradle to publish our SNAPSHOT artifact's to remote Maven Repository. When I publish to Maven, time stamp and build number is getting appended to Jar name. And I am trying to download the latest version ie…
3
votes
2 answers

Gradle maven-publish : task to publish only one

I have a Java project that build and publish many jars (a.jar, b.jar, ...) using : publishing { publications { a (MavenPublication) { artifactId 'a' artifact aJar } b (MavenPublication) { …
Nicolas Albert
  • 2,586
  • 1
  • 16
  • 16
3
votes
2 answers

How to import dependecies from build.gradle to pom.xml

I use maven-publish plugin for deploying android library(.aar). My library has another dependencies, which are also .aar How can I import all dependencies from build.gradle, dependencies section: dependencies { compile fileTree(dir: 'libs',…
Aleksandr
  • 4,906
  • 4
  • 32
  • 47
3
votes
2 answers

How to publish an XML file to Maven repo from Gradle

I have a static xml file that I want to publish to a Maven repository (my local Maven repo for now) from Gradle using the maven-publish plugin. build.gradle looks like this: apply plugin: 'maven-publish' group 'com.example.gradletest' version…
npeder
  • 788
  • 10
  • 26
3
votes
1 answer

Gradle maven-publish plugin custom artifact name

I am struggling with uploading two files to Nexus repository using maven-publish plugin. The problem is that I want to set my own name for one of the files. The task source code is: publications { nexus(MavenPublication) { artifact…
user3450486
  • 215
  • 4
  • 16
3
votes
1 answer

Gradle 'maven-publish' plugin fails with "unmappable character for encoding" error

I've recently migrated a project from Maven to Gradle (IE: replaced the pom.xml file with a build.gradle file). Since my company still has several downstream Maven projects that depend on it we must continue to publish a pom file along with class,…
Alex Jansen
  • 1,455
  • 5
  • 18
  • 34
3
votes
3 answers

Gradle maven-publish: How to add testCompile dependencies to generated pom?

When publishing with the use of maven-publish (incubating, I know), compile dependencies are added to the generate POM (in the runtime scope), but testCompile dependencies are ignored. How to get the testCompile dependencies into the generated POM…
Markus Pscheidt
  • 6,853
  • 5
  • 55
  • 76
2
votes
1 answer

How to distribute javadoc along with my jar library artifact using maven repository?

I have a Kotlin JVM library, which I distribute using as a .jar artifact via maven repository. I would like to provide some Kdocs for it, so that it can be used via IntelliJ Idea's quick docs tool (ctrl+q). I use dokka gradle plugin to generate html…