Ability to add maven coordinates to the compile phase
diff --git a/tomee-patch-plugin/src/main/java/org/apache/tomee/patch/plugin/PatchMojo.java b/tomee-patch-plugin/src/main/java/org/apache/tomee/patch/plugin/PatchMojo.java
index 0d3365a..cbea52e 100644
--- a/tomee-patch-plugin/src/main/java/org/apache/tomee/patch/plugin/PatchMojo.java
+++ b/tomee-patch-plugin/src/main/java/org/apache/tomee/patch/plugin/PatchMojo.java
@@ -46,6 +46,7 @@
import org.tomitribe.swizzle.stream.StreamBuilder;
import org.tomitribe.util.Files;
import org.tomitribe.util.IO;
+import org.tomitribe.util.Mvn;
import org.tomitribe.util.Zips;
import java.io.File;
@@ -83,6 +84,9 @@
@Parameter
private List<String> sourceExcludes = new ArrayList<>();
+ @Parameter
+ private List<String> dependencies = new ArrayList<>();
+
/**
* Regex to identify which archives should be matched
*/
@@ -413,6 +417,12 @@
.map(File::getAbsolutePath)
.forEach(compilerConfiguration::addClasspathEntry);
+
+ dependencies.stream()
+ .map(Mvn::mvn)
+ .map(File::getAbsolutePath)
+ .forEach(compilerConfiguration::addClasspathEntry);
+
// Now we can compile!
final CompilerResult compilerResult;
try {
@@ -497,7 +507,7 @@
final String path = file.getAbsolutePath().substring(root.getAbsolutePath().length() + 1);
- for (final String exclude : sourceExcludes) {
+ for (final String exclude : dependencies) {
if (path.matches(exclude)) {
getLog().debug("Exclude source file: " + file.getAbsolutePath());
continue copy;