1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.weaver.maven;
20
21 import java.io.File;
22
23 import org.apache.commons.weaver.maven.AbstractCWMojo.TestScope;
24 import org.apache.maven.model.Build;
25 import org.apache.maven.plugins.annotations.LifecyclePhase;
26 import org.apache.maven.plugins.annotations.Mojo;
27 import org.apache.maven.plugins.annotations.Parameter;
28 import org.apache.maven.plugins.annotations.ResolutionScope;
29
30
31
32
33 @Mojo(
34 name = "test-prepare",
35 defaultPhase = LifecyclePhase.INITIALIZE,
36 requiresDependencyCollection = ResolutionScope.TEST,
37 requiresDependencyResolution = ResolutionScope.TEST
38 )
39 @TestScope
40 public class TestPrepareMojo extends AbstractPrepareMojo {
41
42
43
44 @Parameter(readonly = true, required = true, defaultValue = "${project.build.testOutputDirectory}")
45 protected File target;
46
47
48
49
50 @Override
51 protected File getTarget() {
52 return target;
53 }
54 }