mavenmaven-3

How do I configure Maven 3 to output group ids in the reactor summary?


I've just reorganized my Maven 3 project POMs by making designated groups and artifacts. The Maven reactor summary, however, outputs artifact ids only without their respective group ids. For example:

[INFO] Reactor Summary for root 0-SNAPSHOT:
[INFO] 
[INFO] root ............................................... SUCCESS [  0.153 s]
[INFO] root ............................................... SUCCESS [  0.003 s]
[INFO] test ............................................... SUCCESS [  0.157 s]
[INFO] meta ............................................... SUCCESS [  0.007 s]
[INFO] root ............................................... SUCCESS [  0.002 s]
[INFO] base ............................................... SUCCESS [  0.010 s]
[INFO] root ............................................... SUCCESS [  0.002 s]
[INFO] base ............................................... SUCCESS [  0.007 s]
[INFO] cli ................................................ SUCCESS [  0.007 s]
[INFO] root ............................................... SUCCESS [  0.003 s]
[INFO] base ............................................... SUCCESS [  0.009 s]
[INFO] core ............................................... SUCCESS [  0.008 s]
[INFO] user.cli ........................................... SUCCESS [  0.008 s]

I would like to have it more clear like this:

[INFO] Reactor Summary for root 0-SNAPSHOT:
[INFO] 
[INFO] root ............................................... SUCCESS [  0.153 s]
[INFO] lib.root ........................................... SUCCESS [  0.003 s]
[INFO] lib.test ........................................... SUCCESS [  0.157 s]
[INFO] meta ............................................... SUCCESS [  0.007 s]
[INFO] sub1.root .......................................... SUCCESS [  0.002 s]
[INFO] sub1.base .......................................... SUCCESS [  0.010 s]
[INFO] sub2.root .......................................... SUCCESS [  0.002 s]
[INFO] sub2.base .......................................... SUCCESS [  0.007 s]
[INFO] sub2.cli ........................................... SUCCESS [  0.007 s]
[INFO] app.root ........................................... SUCCESS [  0.003 s]
[INFO] app.base ........................................... SUCCESS [  0.009 s]
[INFO] app.core ........................................... SUCCESS [  0.008 s]
[INFO] app.user.cli ....................................... SUCCESS [  0.008 s]

Is there a way to configure Maven so that I could have the second style output?


Solution

  • You can use project.name tag.

    Example:

    <project xmlns="http://maven.apache.org/POM/4.0.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
      
      <modelVersion>4.0.0</modelVersion>
    
      <groupId>groupId</groupId>
      <artifactId>artifactId</artifactId>
      <version>1.0.0</version>
    
      <name>${project.groupId}:${project.artifactId}</name>
    
    </project>
    

    You need to override name tag in each module.