How do I publish a multi-module Maven build in Azure Pipelines?

Viewed 701

I have a multi-module Maven project that contains a parent POM (which should be published as an artifact) and some jar modules (which should publish foo-module-1.pom, foo-module-1.jar, and foo-module-1-sources.jar). My Azure Pipelines build correctly runs the package goal on the project with the Maven@3 step, but then I get the message that there are no files in the 1/a directory.

If I simply copy jar files into the Pipelines staging directory, I lose track of the metadata generated in the target directories, and POM packages don't have a target directory at all. I can use the deploy goal, but that bypasses the Release Pipelines and the promotion and similar features.

How do I set up my Azure Pipelines build so that a multi-module Maven repository gets all of its jars and POM artifacts published using the Pipelines management?

0 Answers
Related