1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.javadoc;
20
21 import javax.inject.Inject;
22
23 import java.io.File;
24
25 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
26 import org.apache.maven.doxia.tools.SiteTool;
27 import org.apache.maven.plugins.annotations.LifecyclePhase;
28 import org.apache.maven.plugins.annotations.Mojo;
29 import org.apache.maven.plugins.annotations.Parameter;
30 import org.apache.maven.plugins.annotations.ResolutionScope;
31 import org.apache.maven.plugins.javadoc.resolver.ResourceResolver;
32 import org.apache.maven.project.MavenProjectHelper;
33 import org.apache.maven.project.ProjectBuilder;
34 import org.apache.maven.toolchain.ToolchainManager;
35 import org.codehaus.plexus.archiver.manager.ArchiverManager;
36 import org.eclipse.aether.RepositorySystem;
37
38
39
40
41
42
43
44
45
46
47 @Mojo(
48 name = "test-resource-bundle",
49 defaultPhase = LifecyclePhase.PACKAGE,
50 requiresDependencyResolution = ResolutionScope.TEST,
51 threadSafe = true)
52 public class TestResourcesBundleMojo extends ResourcesBundleMojo {
53
54
55 @Inject
56 public TestResourcesBundleMojo(
57 MavenProjectHelper projectHelper,
58 SiteTool siteTool,
59 ArchiverManager archiverManager,
60 ResourceResolver resourceResolver,
61 RepositorySystem repoSystem,
62 ArtifactHandlerManager artifactHandlerManager,
63 ProjectBuilder mavenProjectBuilder,
64 ToolchainManager toolchainManager) {
65 super(
66 projectHelper,
67 siteTool,
68 archiverManager,
69 resourceResolver,
70 repoSystem,
71 artifactHandlerManager,
72 mavenProjectBuilder,
73 toolchainManager);
74 }
75
76
77
78
79
80 @Parameter(alias = "javadocDirectory", defaultValue = "${basedir}/src/test/javadoc")
81 private File testJavadocDirectory;
82
83 @Override
84 protected String getAttachmentClassifier() {
85 return TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER;
86 }
87
88 @Override
89 protected File getJavadocDirectory() {
90 return testJavadocDirectory;
91 }
92
93 @Override
94 protected boolean isTest() {
95 return true;
96 }
97 }