Skip to content

Commit

Permalink
Merge branch 'bugfix/wrong-sourcepath-in-test' of https://github.com/…
Browse files Browse the repository at this point in the history
…DemonicTutor/maven-annotation-plugin into DemonicTutor-bugfix/wrong-sourcepath-in-test
  • Loading branch information
bsorrentino committed Jul 31, 2020
2 parents bca8780 + 2f1380a commit ad50616
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ private String buildProcessor()

protected abstract java.util.Set<String> getClasspathElements( java.util.Set<String> result );

protected abstract java.util.List<String> getAllCompileSourceRoots();

private String buildCompileSourcepath( Consumer<String> onSuccess) {

final java.util.List<String> roots = project.getCompileSourceRoots();
final java.util.List<String> roots = getAllCompileSourceRoots();

if( roots == null || roots.isEmpty() ) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ protected void addCompileSourceRoot(MavenProject project, String dir) {
project.addCompileSourceRoot(dir);
}

@Override
protected List<String> getAllCompileSourceRoots() {
return project.getCompileSourceRoots();
}

@Override
public File getDefaultOutputDirectory() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.bsc.maven.plugin.processor;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

Expand Down Expand Up @@ -73,6 +74,14 @@ protected void addCompileSourceRoot(MavenProject project, String dir) {
project.addTestCompileSourceRoot(dir);
}

@Override
protected List<String> getAllCompileSourceRoots() {
final List<String> all = new ArrayList<>();
all.addAll(project.getCompileSourceRoots());
all.addAll(project.getTestCompileSourceRoots());
return all;
}

@Override
public File getDefaultOutputDirectory() {
return defaultOutputDirectory;
Expand Down

0 comments on commit ad50616

Please sign in to comment.