Open imanushin opened 6 years ago
@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
@imanushin Running into the same problem here. @skjolber You're solution doesn't seem to work for me.
@oliemansm does the sample not work, and/or what is the error you're tetting?
@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.
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 https://github.com/jfrog/build-info/issues/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: https://github.com/jfrog/build-info/issues/384.
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:
.\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