}
@Override
public final void execute(Project project, DefaultModuleFileSystem fs, String goal) {
if (project.getPom() != null) {
TimeProfiler profiler = new TimeProfiler().start("Execute " + goal);
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
try {
concreteExecute(project.getPom(), goal);
} catch (Exception e) {
throw new SonarException("Unable to execute maven plugin", e);
} finally {
// Reset original ClassLoader that may have been changed during Maven Execution (see SONAR-1800)
Thread.currentThread().setContextClassLoader(currentClassLoader);
profiler.stop();
}
if (!fs.isInitialized()) {
pomConverter.synchronizeFileSystem(project.getPom(), fs);
}
}