Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
PMDStatMergeMojo |
|
| 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; |
|
40 | ||
41 | import java.io.File; |
|
42 | ||
43 | /** |
|
44 | * Goal that handles the PMD statistics into qalab.xml, it should not request any tailoring if |
|
45 | * you use the Maven default for PMD. |
|
46 | * |
|
47 | * @author Benoit Xhenseval |
|
48 | * @goal merge-pmd |
|
49 | * @phase site |
|
50 | */ |
|
51 | 0 | public class PMDStatMergeMojo extends BuildStatMergeMojo { |
52 | ||
53 | // ~ Instance fields ------------------------------------------------------- |
|
54 | /** |
|
55 | * The file the whose values will be incorporated in the qalab.xml. This |
|
56 | * file will have been generated by checkstyle, or pmd etc. |
|
57 | * |
|
58 | * @parameter expression="${project.build.directory}/pmd.xml" |
|
59 | */ |
|
60 | 0 | private File inputFile = null; |
61 | ||
62 | /** |
|
63 | * The fully qualified class name for the handler for the given statistics. |
|
64 | * <ul> |
|
65 | * The built-in handlers are: |
|
66 | * <li>net.objectlab.qalab.parser.CheckstyleStatMerge</li> |
|
67 | * <li>net.objectlab.qalab.parser.PMDStatMerge</li> |
|
68 | * <li>net.objectlab.qalab.parser.FindBugsStatMerge</li> |
|
69 | * <li>net.objectlab.qalab.parser.SimianStatMerge</li> |
|
70 | * </ul> |
|
71 | * |
|
72 | * @parameter default-value="net.objectlab.qalab.parser.PMDStatMerge" |
|
73 | */ |
|
74 | private String handler; |
|
75 | ||
76 | public String getHandler() { |
|
77 | 0 | return handler; |
78 | } |
|
79 | ||
80 | public void setHandler(String handler) { |
|
81 | 0 | this.handler = handler; |
82 | 0 | } |
83 | ||
84 | public File getInputFile() { |
|
85 | 0 | return inputFile; |
86 | } |
|
87 | ||
88 | public void setInputFile(File inputFile) { |
|
89 | 0 | this.inputFile = inputFile; |
90 | 0 | } |
91 | } |
|
92 | /* |
|
93 | * ObjectLab is sponsoring QALab |
|
94 | * |
|
95 | * Based in London, we are world leaders in the design and development |
|
96 | * of bespoke applications for the securities financing markets. |
|
97 | * |
|
98 | * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> |
|
99 | * ___ _ _ _ _ _ |
|
100 | * / _ \| |__ (_) ___ ___| |_| | __ _| |__ |
|
101 | * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ |
|
102 | * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | |
|
103 | * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ |
|
104 | * |__/ |
|
105 | * |
|
106 | * www.ObjectLab.co.uk |
|
107 | */ |