| Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
| Maven2TaskLogger |
|
| 1.0;1 |
| 1 | //////////////////////////////////////////////////////////////////////////////// |
|
| 2 | // |
|
| 3 | // ObjectLab is sponsoring QALab |
|
| 4 | // |
|
| 5 | // Based in London, we are world leaders in the design and development |
|
| 6 | // of bespoke applications for the Securities Financing markets. |
|
| 7 | // |
|
| 8 | // <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> |
|
| 9 | // ___ _ _ _ _ _ |
|
| 10 | // / _ \| |__ (_) ___ ___| |_| | __ _| |__ |
|
| 11 | // | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ |
|
| 12 | // | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | |
|
| 13 | // \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ |
|
| 14 | // |__/ |
|
| 15 | // |
|
| 16 | // http://www.ObjectLab.co.uk |
|
| 17 | // --------------------------------------------------------------------------- |
|
| 18 | // |
|
| 19 | //QALab is released under the GNU General Public License. |
|
| 20 | // |
|
| 21 | //QALab: Collects QA Statistics from your build over time. |
|
| 22 | //2005+, ObjectLab Ltd |
|
| 23 | // |
|
| 24 | //This library is free software; you can redistribute it and/or |
|
| 25 | //modify it under the terms of the GNU General Public |
|
| 26 | //License as published by the Free Software Foundation; either |
|
| 27 | //version 2.1 of the License, or (at your option) any later version. |
|
| 28 | // |
|
| 29 | //This library is distributed in the hope that it will be useful, |
|
| 30 | //but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 31 | //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 32 | //General Public License for more details. |
|
| 33 | // |
|
| 34 | //You should have received a copy of the GNU General Public |
|
| 35 | //License along with this library; if not, write to the Free Software |
|
| 36 | //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 37 | // |
|
| 38 | //////////////////////////////////////////////////////////////////////////////// |
|
| 39 | package net.objectlab.qalab.m2.util; |
|
| 40 | ||
| 41 | import net.objectlab.qalab.util.TaskLogger; |
|
| 42 | import org.apache.maven.plugin.Mojo; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * A QALab TaskLogger for Maven2 plugins. |
|
| 46 | * @author <a href="http://www.davesag.com">Dave Sag</a>. |
|
| 47 | */ |
|
| 48 | public final class Maven2TaskLogger implements TaskLogger { |
|
| 49 | ||
| 50 | /** the maven2 plugin. */ |
|
| 51 | private final transient Mojo theMojo; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Constructor that will hide the specific logging mechanism. |
|
| 55 | * @param aMojo a Maven2 Mojo |
|
| 56 | */ |
|
| 57 | 0 | public Maven2TaskLogger(final Mojo aMojo) { |
| 58 | 0 | theMojo = aMojo; |
| 59 | 0 | } |
| 60 | ||
| 61 | /** |
|
| 62 | * Uses the maven2 mechanism to log the text. |
|
| 63 | * @param text to be logged. |
|
| 64 | */ |
|
| 65 | public void log(final String text) { |
|
| 66 | 0 | theMojo.getLog().info(text); |
| 67 | 0 | } |
| 68 | } |
|
| 69 | /* |
|
| 70 | * ObjectLab is sponsoring QALab |
|
| 71 | * |
|
| 72 | * Based in London, we are world leaders in the design and development |
|
| 73 | * of bespoke applications for the securities financing markets. |
|
| 74 | * |
|
| 75 | * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> |
|
| 76 | * ___ _ _ _ _ _ |
|
| 77 | * / _ \| |__ (_) ___ ___| |_| | __ _| |__ |
|
| 78 | * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ |
|
| 79 | * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | |
|
| 80 | * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ |
|
| 81 | * |__/ |
|
| 82 | * |
|
| 83 | * www.ObjectLab.co.uk |
|
| 84 | */ |