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