I have a multi-module Java project and I’m trying to create a bom for it. I followed the instructions for managing transitive dependencies using the java-platform plugin, and created a platform module that defines constraints on the other modules. The generated pom includes the constraint modules under dependency-management as expected, but with the wrong artifact IDs.
The reason is that my modules upload jars with names that are different than the project name. For example, if the project name is MyFirstProject, it defines
project.archivesBaseName = ‘my-first-project’
and the jar uploaded to the repository is my-first-project-1.0.jar. But the pom generated for my platform includes a dependency on the MyFirstProject artifact, which is not found in the repository, and this makes by pom unusable.
How can I configure the platform module, or the other modules in the project, so that the generated pom uses the uploaded jar names as the artifact IDs?