Skip to content

Commit 1ea3f83

Browse files
committed
Skip compiling early when no sources present
1 parent b607c47 commit 1ea3f83

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/org/codehaus/gmavenplus/mojo/AbstractCompileMojo.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ public abstract class AbstractCompileMojo extends AbstractGroovySourcesMojo {
220220
@SuppressWarnings({"rawtypes"})
221221
protected synchronized void doCompile(final Set<File> sources, final List classpath, final File compileOutputDirectory)
222222
throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, MalformedURLException {
223+
if (sources == null || sources.isEmpty()) {
224+
getLog().info("No sources specified for compilation. Skipping.");
225+
return;
226+
}
227+
223228
GroovyCompileConfiguration configuration = new GroovyCompileConfiguration(sources, classpath, compileOutputDirectory);
224229
configuration.setIncludeClasspath(includeClasspath);
225230
configuration.setSkipBytecodeCheck(skipBytecodeCheck);

0 commit comments

Comments
 (0)