You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jörg Schaible <Jo...@Elsag-Solutions.com> on 2006/01/24 09:58:26 UTC
[m1] howto log to console from java plugin
Hello folks,
how can I log to the console in M1 from a plugin's Java code? Just printing to System.out does not work correctly, since the other output from Maven or the Jelly code is not gonna get synchronized with these prints:
========== snip =======
$ maven clean xxx:zip
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
clean:clean:
[delete] Deleting directory C:\Work\Projects\maven-1-plugins\qmb\src\plugin-test\target
Create xxx\dom\XXX\component.xml
Create xxx\app\XXXA\component.xml
Create xxx\ear\MyEAR\component.xml
Create xxx\ejb\MyEJB\component.xml
clean:
xxx:prereq:
xxx:zip-resources:
xxx:zip:
[echo] DONE
BUILD SUCCESSFUL
Total time: 7 seconds
Finished at: Tue Jan 24 09:53:38 CET 2006
========= snip ============
Those "Create ..." messages should have been printed after xxx:zip. How can I utilize the normal way to report to console from within the Java code? In my code I am also utilizing Ant tasks and I would like to enable them also to report to the console as they do when invoked from the jelly:ant task. Currently they don't report anything.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: [m1] howto log to console from java plugin
Posted by Stephane Nicoll <st...@gmail.com>.
you need to use commons-logging ; Check existing plugin for an example.
Cheers,
Stéphane
On 1/24/06, Jörg Schaible <Jo...@elsag-solutions.com> wrote:
> Hello folks,
>
> how can I log to the console in M1 from a plugin's Java code? Just printing to System.out does not work correctly, since the other output from Maven or the Jelly code is not gonna get synchronized with these prints:
>
> ========== snip =======
> $ maven clean xxx:zip
> __ __
> | \/ |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> |_| |_\__,_|\_/\___|_||_| v. 1.0.2
>
> build:start:
>
> clean:clean:
> [delete] Deleting directory C:\Work\Projects\maven-1-plugins\qmb\src\plugin-test\target
> Create xxx\dom\XXX\component.xml
> Create xxx\app\XXXA\component.xml
> Create xxx\ear\MyEAR\component.xml
> Create xxx\ejb\MyEJB\component.xml
>
> clean:
>
> xxx:prereq:
>
> xxx:zip-resources:
>
> xxx:zip:
>
>
> [echo] DONE
> BUILD SUCCESSFUL
> Total time: 7 seconds
> Finished at: Tue Jan 24 09:53:38 CET 2006
> ========= snip ============
>
> Those "Create ..." messages should have been printed after xxx:zip. How can I utilize the normal way to report to console from within the Java code? In my code I am also utilizing Ant tasks and I would like to enable them also to report to the console as they do when invoked from the jelly:ant task. Currently they don't report anything.
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
.::You're welcome ::.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org