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

1 /*
2 * The MIT License
3 *
4 * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
5 * Olivier Lamy
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 */
25 package hudson.maven.reporters;
26
27 import hudson.Extension;
28 import hudson.maven.MavenModule;
29 import hudson.maven.MavenModuleSet;
30 import hudson.maven.MavenReporterDescriptor;
31 import hudson.maven.MojoInfo;
32 import hudson.model.Action;
33
34 import java.util.Collection;
35 import java.util.Collections;
36
37 /**
38 * Records the javadoc and archives it.
39 *
40 * @author Kohsuke Kawaguchi
41 */
42 public class MavenTestJavadocArchiver extends AbstractMavenJavadocArchiver {
43
44
45 public Collection<? extends Action> getProjectActions(MavenModule project) {
46 return Collections.singletonList(new MavenJavadocAction(project,getTarget(),"Test Javadoc","test-javadoc"
47 ,hudson.tasks.Messages.TestJavadocArchiver_DisplayName_Javadoc()));
48 }
49
50 @Override
51 public String getArchiveTargetPath() {
52 return "test-javadoc";
53 }
54
55 public Action getAggregatedProjectAction(MavenModuleSet project) {
56 return new MavenJavadocAction(project,getTarget(),"Test Javadoc","test-javadoc"
57 ,hudson.tasks.Messages.TestJavadocArchiver_DisplayName_Javadoc());
58 }
59
60 @Override
61 public boolean checkIsJavadocMojo(MojoInfo mojo) {
62 return mojo.is("org.apache.maven.plugins","maven-javadoc-plugin","test-javadoc")
63 || mojo.is("org.apache.maven.plugins","maven-javadoc-plugin","test-aggregate");
64 }
65
66 @Extension
67 public static final class DescriptorImpl extends MavenReporterDescriptor {
68 public String getDisplayName() {
69 return Messages.MavenTestJavadocArchiver_DisplayName();
70 }
71
72 public MavenTestJavadocArchiver newAutoInstance(MavenModule module) {
73 return new MavenTestJavadocArchiver();
74 }
75 }
76
77 private static final long serialVersionUID = 1L;
78 }
79