private String getStartClass() throws MojoExecutionException { String mainClass = this.mainClass; if (mainClass == null) { try { mainClass = MainClassFinder.findSingleMainClass(this.classesDirectory); } catch (IOException ex) { throw new MojoExecutionException(ex.getMessage(), ex); } } if (mainClass == null) { throw new MojoExecutionException( "Unable to find a suitable main class, " + "please add a 'mainClass' property"); } return mainClass; }