Skip to content

Gradle Artifactory plugin does not support multi-module project as well #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
imanushin opened this issue Jan 12, 2018 · 5 comments
Open

Comments

@imanushin
Copy link

Gradle supports multimodule project (see in official doc).

This is useful when you try to decompose solid project to modules (for example, to have different modules - server, client, model).

However, gradle artifactory plugin is unable to publish build info for subprojects.

So, in my example:

  1. Root project does not have any dependency (it is just container)
  2. Subprojects are ordinal java projects
  3. Each subproject has artifactoryPublish task
  4. After calling .\gradlew.bat :artifactoryPublish

Expected result:
All modules are published, build info is published to each module (or build info has unified data of all submodules)

Actual result:
All modules are published. No build info was published to artifactory

@skjolber
Copy link

skjolber commented Aug 6, 2018

@imanushin I am able to publish build info for multi-module projects, however this requires me to set publishBuildInfo=false in subprojects and publishArtifacts = false in the main 'wrapper' project.

Edit: Example configuration: https://github.com/skjolber/gradle-foss-library-template/blob/master/build.gradle

@oliemansm
Copy link

@imanushin Running into the same problem here. @skjolber You're solution doesn't seem to work for me.

@skjolber
Copy link

skjolber commented Nov 5, 2018

@oliemansm does the sample not work, and/or what is the error you're tetting?

@oliemansm
Copy link

@skjolber Actually, after googling a bit more I found this issue: https://stackoverflow.com/questions/35851251/gradle-artifactory-plugin-how-to-publish-artifacts-from-multiple-modules-in-a. Following that config did solve the problem for me.

@jackwhelpton
Copy link

jackwhelpton commented Sep 26, 2020

Has there been any progress on this? The config in that linked StackOverflow post doesn't work me. I'm receiving the error:

ERROR: Couldn't read generated build info at : /home/jenkins/agent/workspace/dir@tmp/artifactory/generated.build.info8485814835938481452.json

I'm investigating the behavior with different versions of the plugin, as the StackOverflow post references this not working since 4.6.0. I'm using Gradle 5.2.1, I think I need to use 4.7.3 of plugin or later, as otherwise I'm hitting #166.

For me, 4.16.0 throws this error, whilst 4.15.2 is working (at least with publishBuildInfo = false). As this is a specific regression (probably related to "Empty modules without artifacts and dependencies will not be added to the build-info from now", I've raised a fresh ticket: #384.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants