1 package org.apache.maven.plugin.javadoc;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.artifact.DependencyResolutionRequiredException;
23 import org.apache.maven.plugin.MojoExecutionException;
24 import org.apache.maven.plugin.MojoFailureException;
25 import org.apache.maven.plugins.annotations.Execute;
26 import org.apache.maven.plugins.annotations.LifecyclePhase;
27 import org.apache.maven.plugins.annotations.Mojo;
28 import org.apache.maven.plugins.annotations.ResolutionScope;
29 import org.apache.maven.project.MavenProject;
30
31 import java.util.Collections;
32 import java.util.LinkedList;
33 import java.util.List;
34
35
36
37
38
39
40
41
42
43 @Mojo( name = "test-fix", requiresDependencyResolution = ResolutionScope.TEST )
44 @Execute( phase = LifecyclePhase.TEST_COMPILE )
45 public class TestFixJavadocMojo
46 extends AbstractFixJavadocMojo
47 {
48
49 protected List<String> getProjectSourceRoots( MavenProject p )
50 {
51 return ( p.getTestCompileSourceRoots() == null ? Collections.<String>emptyList()
52 : new LinkedList<String>( p.getTestCompileSourceRoots() ) );
53 }
54
55
56 protected List<String> getCompileClasspathElements( MavenProject p )
57 throws DependencyResolutionRequiredException
58 {
59 return ( p.getTestClasspathElements() == null ? Collections.<String>emptyList()
60 : new LinkedList<String>( p.getTestClasspathElements() ) );
61 }
62
63
64 protected String getArtifactType( MavenProject p )
65 {
66 return "test-jar";
67 }
68
69
70 public void execute()
71 throws MojoExecutionException, MojoFailureException
72 {
73
74 ignoreClirr = true;
75
76 super.execute();
77 }
78 }