@@ -151,6 +151,7 @@ public class CompilerMojo extends AbstractCompilerMojo {
151
151
152
152
private Map <String , JavaModuleDescriptor > pathElements ;
153
153
154
+ @ Override
154
155
protected List <String > getCompileSourceRoots () {
155
156
return compileSourceRoots ;
156
157
}
@@ -170,6 +171,7 @@ protected Map<String, JavaModuleDescriptor> getPathElements() {
170
171
return pathElements ;
171
172
}
172
173
174
+ @ Override
173
175
protected File getOutputDirectory () {
174
176
File dir ;
175
177
if (!multiReleaseOutput ) {
@@ -180,6 +182,7 @@ protected File getOutputDirectory() {
180
182
return dir ;
181
183
}
182
184
185
+ @ Override
183
186
public void execute () throws MojoExecutionException , CompilationFailureException {
184
187
if (skipMain ) {
185
188
getLog ().info ("Not compiling main sources" );
@@ -344,11 +347,14 @@ private List<File> getCompileClasspathElements(MavenProject project) {
344
347
list .add (new File (project .getBuild ().getOutputDirectory ()));
345
348
346
349
for (Artifact a : project .getArtifacts ()) {
347
- list .add (a .getFile ());
350
+ if (a .getArtifactHandler ().isAddedToClasspath ()) {
351
+ list .add (a .getFile ());
352
+ }
348
353
}
349
354
return list ;
350
355
}
351
356
357
+ @ Override
352
358
protected SourceInclusionScanner getSourceInclusionScanner (int staleMillis ) {
353
359
if (includes .isEmpty () && excludes .isEmpty () && incrementalExcludes .isEmpty ()) {
354
360
return new StaleSourceScanner (staleMillis );
@@ -363,6 +369,7 @@ protected SourceInclusionScanner getSourceInclusionScanner(int staleMillis) {
363
369
return new StaleSourceScanner (staleMillis , includes , excludesIncr );
364
370
}
365
371
372
+ @ Override
366
373
protected SourceInclusionScanner getSourceInclusionScanner (String inputFileEnding ) {
367
374
// it's not defined if we get the ending with or without the dot '.'
368
375
String defaultIncludePattern = "**/*" + (inputFileEnding .startsWith ("." ) ? "" : "." ) + inputFileEnding ;
@@ -375,10 +382,12 @@ protected SourceInclusionScanner getSourceInclusionScanner(String inputFileEndin
375
382
return new SimpleSourceInclusionScanner (includes , excludesIncr );
376
383
}
377
384
385
+ @ Override
378
386
protected String getSource () {
379
387
return source ;
380
388
}
381
389
390
+ @ Override
382
391
protected String getTarget () {
383
392
return target ;
384
393
}
@@ -388,14 +397,17 @@ protected String getRelease() {
388
397
return release ;
389
398
}
390
399
400
+ @ Override
391
401
protected String getCompilerArgument () {
392
402
return compilerArgument ;
393
403
}
394
404
405
+ @ Override
395
406
protected Map <String , String > getCompilerArguments () {
396
407
return compilerArguments ;
397
408
}
398
409
410
+ @ Override
399
411
protected File getGeneratedSourcesDirectory () {
400
412
return generatedSourcesDirectory ;
401
413
}
0 commit comments