views:

28

answers:

2

I really start to be fed up with my not knowing exactly what is happening inside a Maven build. Can I add extra info to console log like MDC in log4j? I want to see the followings for each line:

  • plugin coordinate/goal
  • project name/id/something

Do you know how to do this? Is there a log configuration somewhere? I expect something like this:

dependendency:resolve myproject - [INFO] bablajsgkfdjgkldsfjglkdf

dependendency:resolve myproject - [INFO] bablajsgasdfsadfsadfsakfdjgkldsfjglkdf

A: 

That information is logged at the console if you use Maven 3 which is compatible with Maven 2 and, by the way, was released officially six hours ago.

The format is like this:

...
[INFO] ------------------------------------------------------------------------
[INFO] Building PRBL 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ prbl-logic ---
[INFO] Deleting C:\EclipseWorkspace\Pr\modules\business\target
[INFO] 
[INFO] --- maven-antrun-plugin:1.5:run (erwin-dir) @ prbl-logic ---
[INFO] Executing tasks

main:
    [mkdir] Created dir: C:\EclipseWorkspace\Pr\modules\business\target\erwin
[INFO] Executed tasks
...

As always, you must assure that your project is compatible with the new version, but I was trying the betas for a month now and I have no problem at all.

Ither
The same output is in maven 2. I want it in each line.
Gábor Lipták
A: 

To my knowledge, this is not possible.

Pascal Thivent
The funny thing in it, that I dont think I am the first, who would like it.
Gábor Lipták
@Gábor Open a RFE.
Pascal Thivent
http://jira.codehaus.org/browse/MNG-4859 we will see if they like it.
Gábor Lipták
@Gábor Thanks for the link!
Pascal Thivent