1 package org.apache.maven.plugin.javadoc;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.util.List;
23
24 import org.apache.maven.artifact.DependencyResolutionRequiredException;
25 import org.apache.maven.plugin.MojoExecutionException;
26 import org.apache.maven.plugin.MojoFailureException;
27 import org.apache.maven.project.MavenProject;
28
29 /**
30 * Fix Javadoc documentation and tags for the <code>Test Java code</code> for the project.
31 * See <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#wheretags">Where Tags Can Be Used</a>.
32 *
33 * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
34 * @version $Id$
35 * @since 2.6
36 * @goal test-fix
37 * @requiresDependencyResolution test
38 * @execute phase="test-compile"
39 */
40 public class TestFixJavadocMojo
41 extends AbstractFixJavadocMojo
42 {
43 /** {@inheritDoc} */
44 protected List getProjectSourceRoots( MavenProject p )
45 {
46 return p.getTestCompileSourceRoots();
47 }
48
49 /** {@inheritDoc} */
50 protected List getCompileClasspathElements( MavenProject p )
51 throws DependencyResolutionRequiredException
52 {
53 return p.getTestClasspathElements();
54 }
55
56 /** {@inheritDoc} */
57 protected String getArtifactType( MavenProject p )
58 {
59 return "test-jar";
60 }
61
62 /** {@inheritDoc} */
63 public void execute()
64 throws MojoExecutionException, MojoFailureException
65 {
66 // clirr doesn't analyze test code, so ignore it
67 ignoreClirr = true;
68
69 super.execute();
70 }
71 }