Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4639

Be able to profile a maven build

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      A common problem with builds is that they can become quite long to run. As it is a know anti-pattern for CI for example, one has the need to try and optimize their builds.

      The thing is: the current granularity isn't sufficiently precise. In fact, you only only the time spent to build each module. This is a good start, though.

      Maven currently displays something like the following (let's speak only about maven 3):

      [INFO] Reactor Summary:
      [INFO] ------------------------------------------------------------------------
      [INFO] p1 ........................ SUCCESS [1:12.938s]
      [INFO] p2 ........................ SUCCESS [5.750s]
      [INFO] p3 ........................ SUCCESS [3:58.488s]
      [INFO] p4 ........................ SUCCESS [24.437s]
      [INFO] p5 ........................ SUCCESS [1.563s]
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 minutes 46 seconds

      What would be great would be adding an option that would higher the details. Something like A/analyze (-profile would be too close to -P/profile option) would add detailed analysis, would print something like.

      [INFO] Reactor Summary:
      [INFO] ------------------------------------------------------------------------
      [INFO] p1 ........................ SUCCESS [1:12.938s]
      clean:clean (somepkg.CleanMojo) : 10.3s
      compiler:compile (...) : 50s
      ...
      and so on

      I'm not very well aware the level of details maven 3 API could provide. So the printing above could become irrelevant. In this case, printing a dedicated html or so report might be a better choice.

      Cheers
      PS : Though I'm really not introduced into maven code, if you think it's not too complicated, I could try and contribute on this field if I'm given some hints or good starting points.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mathus.b@mipih.fr Baptiste MATHUS
            Votes:
            22 Vote for this issue
            Watchers:
            24 Start watching this issue

            Dates

              Created:
              Updated: