File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes redirecting the maven output to file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "redirecting the maven output to file" Watch "redirecting the maven output to file" New topic
Author

redirecting the maven output to file

Pradeep Kumar
Ranch Hand

Joined: Sep 08, 2006
Posts: 108

hi ranchers,
I am keen to know if there is any option to log the output of the build to a file. currently when i run the the command prompt is bloated with log and I am not able to see the entire log. I want to get the output in a file. Please help me in this regard.


Regards,
Pradeep


Thanks and Regards, Pradeep Kumar
SCJP 1.6, SCWCD 5.0
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Pradeep, what Operating System are you using? You should be able to pipe the output of the mvn command to a file.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Pradeep Kumar
Ranch Hand

Joined: Sep 08, 2006
Posts: 108
I am working on Microsoft windows XP.
Pradeep Kumar
Ranch Hand

Joined: Sep 08, 2006
Posts: 108
I got it. I use the "> {file name}" to redirect to a file.

Thanks once again.

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You're welcome!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Another option is to use the record task. I use it to write a detailed log for my builds:



Oops, sorry - that is for Ant, not Maven!


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: redirecting the maven output to file