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.resolver;
20
21 import java.io.File;
22 import java.util.List;
23
24 import org.apache.maven.project.MavenProject;
25 import org.apache.maven.project.ProjectBuildingRequest;
26 import org.apache.maven.shared.artifact.filter.resolve.AndFilter;
27
28
29
30
31 public class SourceResolverConfig {
32 private ProjectBuildingRequest buildingRequest;
33
34 private final MavenProject project;
35
36 private AndFilter filter;
37
38 private List<MavenProject> reactorProjects;
39
40 private final File outputBasedir;
41
42 private boolean compileSourceIncluded;
43
44 private boolean testSourceIncluded;
45
46
47
48
49
50
51 public SourceResolverConfig(
52 final MavenProject project, final ProjectBuildingRequest buildingRequest, final File outputBasedir) {
53 this.project = project;
54 this.buildingRequest = buildingRequest;
55 this.outputBasedir = outputBasedir;
56 }
57
58
59
60
61
62 public SourceResolverConfig withFilter(final AndFilter filter) {
63 this.filter = filter;
64 return this;
65 }
66
67
68
69
70
71 public SourceResolverConfig withReactorProjects(final List<MavenProject> reactorProjects) {
72 this.reactorProjects = reactorProjects;
73 return this;
74 }
75
76
77
78
79 public SourceResolverConfig withCompileSources() {
80 compileSourceIncluded = true;
81 return this;
82 }
83
84
85
86
87 public SourceResolverConfig withoutCompileSources() {
88 compileSourceIncluded = false;
89 return this;
90 }
91
92
93
94
95 public SourceResolverConfig withTestSources() {
96 testSourceIncluded = true;
97 return this;
98 }
99
100
101
102
103 public SourceResolverConfig withoutTestSources() {
104 testSourceIncluded = false;
105 return this;
106 }
107
108
109
110
111 public MavenProject project() {
112 return project;
113 }
114
115
116
117
118 public ProjectBuildingRequest getBuildingRequest() {
119 return buildingRequest;
120 }
121
122
123
124
125 public AndFilter filter() {
126 return filter;
127 }
128
129
130
131
132 public List<MavenProject> reactorProjects() {
133 return reactorProjects;
134 }
135
136
137
138
139 public File outputBasedir() {
140 return outputBasedir;
141 }
142
143
144
145
146 public boolean includeCompileSources() {
147 return compileSourceIncluded;
148 }
149
150
151
152
153 public boolean includeTestSources() {
154 return testSourceIncluded;
155 }
156 }