Require single main class

Update run tasks to ensure that only a single main class is required
when performing a class search.

See gh-886
This commit is contained in:
Phillip Webb
2014-05-16 10:44:01 +01:00
parent 7c7d1f55e0
commit 7b170368e5
6 changed files with 86 additions and 34 deletions

View File

@@ -217,7 +217,7 @@ public class RunMojo extends AbstractDependencyFilterMojo {
String mainClass = this.mainClass;
if (mainClass == null) {
try {
mainClass = MainClassFinder.findMainClass(this.classesDirectory);
mainClass = MainClassFinder.findSingleMainClass(this.classesDirectory);
}
catch (IOException ex) {
throw new MojoExecutionException(ex.getMessage(), ex);