File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\maven-plugin\src\main\java\hudson\maven\MavenBuildProxy2.java.html

1 /*
2 * The MIT License
3 *
4 * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24 package hudson.maven;
25
26 /**
27 * A part of {@link MavenBuildProxy} that's used internally
28 * for aggregated build. Fired and consumed internally and
29 * not exposed to plugins.
30 *
31 * @author Kohsuke Kawaguchi
32 */
33 public interface MavenBuildProxy2 extends MavenBuildProxy {
34 /**
35 * Notifies that the build has entered a module.
36 *
37 * Jenkins has a somewhat simplified view of the sequence of events in a Maven build.
38 * Namely, a Maven build can be building a particular Maven module, and start and end marks that boundary.
39 * Note that Maven can be in a state that it's not building any module, for example when executing an aggregator mojo,
40 * and start/end cannot be nested (which right now means a forked lifecycle doesn't result in the event firing.)
41 */
42 void start();
43
44 /**
45 * Notifies that the build has left a module.
46 */
47 void end();
48
49 /**
50 * Maven produces additional error message after the module build is done.
51 * So to catch those messages, invoke this method on the last module that was built
52 * after all the Maven processing is done, to append last messages to the console
53 * output of the module.
54 */
55 void appendLastLog();
56
57 /**
58 * Filter for {@link MavenBuildProxy2}.
59 *
60 * Meant to be useful as the base class for other filters.
61 */
62 /*package*/ abstract class Filter<CORE extends MavenBuildProxy2> extends MavenBuildProxy.Filter<CORE> implements MavenBuildProxy2 {
63 private static final long serialVersionUID = -1208416744028858844L;
64
65 protected Filter(CORE core) {
66 super(core);
67 }
68
69 public void start() {
70 core.start();
71 }
72
73 public void end() {
74 core.end();
75 }
76
77 public void appendLastLog() {
78 core.appendLastLog();
79 }
80 }
81 }
82