1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.dependency.fromDependencies;
20
21 import java.io.File;
22
23 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
24 import org.apache.maven.execution.MavenSession;
25 import org.apache.maven.plugins.annotations.Parameter;
26 import org.apache.maven.plugins.dependency.utils.ResolverUtil;
27 import org.apache.maven.project.MavenProject;
28 import org.apache.maven.project.ProjectBuilder;
29 import org.sonatype.plexus.build.incremental.BuildContext;
30
31
32
33
34
35
36 public abstract class AbstractFromDependenciesMojo extends AbstractDependencyFilterMojo {
37
38
39
40
41
42 @Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}/dependency")
43 protected File outputDirectory;
44
45
46
47
48 @Parameter(property = "mdep.stripVersion", defaultValue = "false")
49 protected boolean stripVersion = false;
50
51
52
53
54
55
56 @Parameter(property = "mdep.stripType", defaultValue = "false")
57 protected boolean stripType = false;
58
59
60
61
62 @Parameter(property = "mdep.stripClassifier", defaultValue = "false")
63 protected boolean stripClassifier = false;
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79 @Parameter(property = "mdep.useRepositoryLayout", defaultValue = "false")
80 protected boolean useRepositoryLayout;
81
82
83
84
85
86
87
88 @Parameter(property = "mdep.useSubDirectoryPerScope", defaultValue = "false")
89 protected boolean useSubDirectoryPerScope;
90
91
92
93
94
95
96 @Parameter(property = "mdep.useSubDirectoryPerType", defaultValue = "false")
97 protected boolean useSubDirectoryPerType;
98
99
100
101
102
103
104 @Parameter(property = "mdep.useSubDirectoryPerArtifact", defaultValue = "false")
105 protected boolean useSubDirectoryPerArtifact;
106
107
108
109
110
111
112 @Parameter(property = "mdep.failOnMissingClassifierArtifact", defaultValue = "false")
113 protected boolean failOnMissingClassifierArtifact;
114
115 protected AbstractFromDependenciesMojo(
116 MavenSession session,
117 BuildContext buildContext,
118 MavenProject project,
119 ResolverUtil resolverUtil,
120 ProjectBuilder projectBuilder,
121 ArtifactHandlerManager artifactHandlerManager) {
122 super(session, buildContext, project, resolverUtil, projectBuilder, artifactHandlerManager);
123 }
124
125
126
127
128 public File getOutputDirectory() {
129 return this.outputDirectory;
130 }
131
132
133
134
135 public void setOutputDirectory(File theOutputDirectory) {
136 this.outputDirectory = theOutputDirectory;
137 }
138
139
140
141
142 public boolean isUseSubDirectoryPerArtifact() {
143 return this.useSubDirectoryPerArtifact;
144 }
145
146
147
148
149 public void setUseSubDirectoryPerArtifact(boolean theUseSubDirectoryPerArtifact) {
150 this.useSubDirectoryPerArtifact = theUseSubDirectoryPerArtifact;
151 }
152
153
154
155
156 public boolean isUseSubDirectoryPerScope() {
157 return this.useSubDirectoryPerScope;
158 }
159
160
161
162
163 public void setUseSubDirectoryPerScope(boolean theUseSubDirectoryPerScope) {
164 this.useSubDirectoryPerScope = theUseSubDirectoryPerScope;
165 }
166
167
168
169
170 public boolean isUseSubDirectoryPerType() {
171 return this.useSubDirectoryPerType;
172 }
173
174
175
176
177 public void setUseSubDirectoryPerType(boolean theUseSubDirectoryPerType) {
178 this.useSubDirectoryPerType = theUseSubDirectoryPerType;
179 }
180
181
182
183
184 public boolean isFailOnMissingClassifierArtifact() {
185 return failOnMissingClassifierArtifact;
186 }
187
188
189
190
191 public void setFailOnMissingClassifierArtifact(boolean failOnMissingClassifierArtifact) {
192 this.failOnMissingClassifierArtifact = failOnMissingClassifierArtifact;
193 }
194
195
196
197
198 public boolean isStripVersion() {
199 return stripVersion;
200 }
201
202
203
204
205 public void setStripVersion(boolean stripVersion) {
206 this.stripVersion = stripVersion;
207 }
208
209
210
211
212 public boolean isStripType() {
213 return stripType;
214 }
215
216
217
218
219 public void setStripType(boolean stripType) {
220 this.stripType = stripType;
221 }
222
223
224
225
226 public boolean isUseRepositoryLayout() {
227 return useRepositoryLayout;
228 }
229
230
231
232
233 public void setUseRepositoryLayout(boolean useRepositoryLayout) {
234 this.useRepositoryLayout = useRepositoryLayout;
235 }
236 }