0

I have pulled several repos together and am trying to perform a maven multi-module build. Everything works fine, but the artifactIds in those repos cause the maven reactor output to be confusing. Each repo generates artifacts with a different groupId but an identical artifactId. For example:

repo1 => my.company.repo1 / stupidName / 1.0.2
repo2 => my.company.repo2 / stupidName / 1.8.0
repo3 => my.company.repo3 / stupidName / 4.8.1

Those repos and their artifacts are fine. Any other project depending on those artifacts has no trouble declaring the correct dependencies. The only problem is that the reactor summary is kind of useless since each row has the same name.

Reactor Summary:

[exec] [INFO] stupidName ......... SUCCESS [ 31.276 s]
[exec] [INFO] stupidName ......... FAILURE [  7.840 s]
[exec] [INFO] stupidName ......... SUCCESS [  0.183 s]

Sure, with only three repos, it would not be hard to figure out which one failed. But there are lots. It would be nice if each of those rows had a unique name. I've played with renaming directories and using <finalName>, but none of that works. Apparently the reactor is using the <artifactId> listed in the pom.xml.

I do not believe I can justify changing the names of those artifacts and then updating all of the other projects which depend on them. That would be a ton of work for the sole purpose of making the build logs easier to read.

Is there a way to get different names to appear in the reactor summary without changing the artifactIds?

Edit: I see a comment for another question which looks like the author is explicitly avoiding my case. This makes me worry that I'm SOL.

Joe Gibbs
  • 144
  • 1
  • 12
  • 1
    The first question is: If you have combined those things into a multi module build is the intention to have a single build with the appropriate structure and the same version of all artifacts? Furthermore `but the artifactIds in those repos cause the maven reactor output to be confusing. ` The output is generated by using `..` name tag if it is not set it will use the `artifactId`... ? – khmarbaise Mar 25 '21 at 08:29
  • That means in the end you have to change either the `..` entries but I would suggest to check and reconsider the artifactId/GroupId combination in your whole structure.... – khmarbaise Mar 25 '21 at 08:50
  • > The output is generated by using ```..``` name tag if it is not set it will use the ```artifactId``` Thanks @khmarbaise, that is exactly the piece of information that I needed! I don't know how I missed that tag! – Joe Gibbs Mar 26 '21 at 04:30

1 Answers1

1

The comment made by @khmarbaise was the answer I needed. Somehow I missed the <name> tag. Once I added that tag, the reactor output was much easier to read. For example:

<project>
   <groupId>my.company.repo1</groupId>
   <artifactId>stupidName</artifactId>
   <name>muchBetterUniqueName</name>
   <version>1.0.2</version>
Reactor Summary:

[exec] [INFO] stupidName ............. SUCCESS [ 31.276 s]
[exec] [INFO] muchBetterUniqueName ... FAILURE [  7.840 s]
[exec] [INFO] stupidName ............. SUCCESS [  0.183 s]
Joe Gibbs
  • 144
  • 1
  • 12