use of org.jetbrains.idea.maven.project.MavenResourceCompilerConfigurationGenerator in project intellij-community by JetBrains.
the class MavenCompilingTestCase method compile.
private void compile(final CompileScope scope) {
try {
CompilerTester tester = new CompilerTester(myProject, Arrays.asList(scope.getAffectedModules()));
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
new MavenResourceCompilerConfigurationGenerator(myProject, MavenProjectsManager.getInstance(myProject).getProjectsTreeForTests()).generateBuildConfiguration(false);
}
});
try {
List<CompilerMessage> messages = tester.make(scope);
for (CompilerMessage message : messages) {
if (message.getCategory() == CompilerMessageCategory.ERROR) {
fail("Compilation failed with error: " + message.getMessage());
}
}
} finally {
tester.tearDown();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations