docs: @SuppressWarnings("checkstyle:npathcomplexity")
  	protected void compile(List<File> classPath, List<File> sourcePaths, File sarlOutputPath,
  			File classOutputPath) throws MojoExecutionException, MojoFailureException {
  		final SarlBatchCompiler compiler = getBatchCompiler();
  		final MavenProject project = getProject();
  		compiler.setResourceSetProvider(new MavenProjectResourceSetProvider(project));
  		final Iterable<File> filtered = Iterables.filter(sourcePaths, input -> input.isDirectory());
  		if (Iterables.isEmpty(filtered)) {
  			final String dir = Iterables.toString(sourcePaths);
  			getLog().info(MessageFormat.format(Messages.AbstractSarlBatchCompilerMojo_1, dir));
  			return;
  		}
  		final String baseDir = project.getBasedir().getAbsolutePath();
  		final JavaCompiler compilerType = getJavaCompiler();
  		compiler.setJavaPostCompilationEnable(compilerType != JavaCompiler.NONE);
  		compiler.setOptimizationLevel(getOptimization());
  		compiler.setClassOutputPath(classOutputPath);
  		compiler.setJavaSourceVersion(getSourceVersion());
  		compiler.setBasePath(baseDir);
  		compiler.setTempDirectory(getTempDirectory());
  		compiler.setDeleteTempDirectory(false);
  		compiler.setClassPath(classPath);
  		final String bootClassPath = getBootClassPath();
  		compiler.setBootClassPath(bootClassPath);
  		final List<File> filteredSourcePaths = Lists.newArrayList(filtered);
  		compiler.setSourcePath(filteredSourcePaths);
  		compiler.setOutputPath(sarlOutputPath);
  		compiler.setFileEncoding(getEncoding());
  		compiler.setWriteTraceFiles(getGenerateTraceFiles());
  		compiler.setWriteStorageFiles(getGenerateStorageFiles());
  		compiler.setGenerateInlineAnnotation(getGenerateInlines());
  		compiler.setGeneratePureAnnotation(getGeneratePures());
  		compiler.setGenerateEqualityTestFunctions(getGenerateEqualityTestFunctions());
  		compiler.setGenerateToStringFunctions(getGenerateToStringFunctions());
  		compiler.setGenerateCloneFunctions(getGenerateCloneFunctions());
  		compiler.setGenerateSerialNumberFields(getGenerateSerialNumberFields());
  
  		final StringBuilder builder = new StringBuilder();
  		for (final String identifier : getExtraGenerators()) {
  			if (builder.length() > 0) {
  				builder.append(File.pathSeparator);
  			}
  			builder.append(identifier);
  		}
  		compiler.setExtraLanguageGenerators(builder.toString());
  
  		StaticLoggerBinder.getSingleton().registerMavenLogger(getLog());
  		final Logger logger = LoggerFactory.getLogger(getClass());
  		compiler.setLogger(logger);
  		compiler.setIssueMessageFormatter((issue, uriToProblem) -> {
  			final String filename;
  			if (uriToProblem != null) {
  				filename = uriToProblem.toFileString();
  			} else {
  				filename = Messages.AbstractSarlBatchCompilerMojo_2;
  			}
  			return MessageFormat.format(Messages.AbstractSarlBatchCompilerMojo_3,
  					filename, issue.getLineNumber(),
  					issue.getColumn(), issue.getMessage());
  		});
  		final String[] errorMessage = new String[] {null};
  		compiler.addIssueMessageListener((issue, uri, message) -> {
  			if ((issue.isSyntaxError() || issue.getSeverity() == Severity.ERROR) && (Strings.isEmpty(errorMessage[0]))) {
  				errorMessage[0] = message;
  			}
  		});
  		if (!compiler.compile()) {
  			final StringBuilder dir = new StringBuilder();
  			for (final File file : filtered) {
  				if (dir.length() > 0) {
  					dir.append(File.pathSeparator);
  				}
  				dir.append(file.getAbsolutePath());
  			}
  			if (Strings.isEmpty(errorMessage[0])) {
  				throw new MojoFailureException(Messages.AbstractSarlBatchCompilerMojo_4);
  			}
  			throw new MojoFailureException(errorMessage[0]);
  		}
  	}