Skip to content

Commit

Permalink
Issue #183 - avoid parallel execution of compiler (#191)
Browse files Browse the repository at this point in the history
Compiler cannot use parallel execution until related bugs is fixed in
the version used and provided by default in Tycho.
  • Loading branch information
mickaelistria committed Jul 19, 2021
1 parent a3e992f commit 4335d09
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -106,6 +106,8 @@ public abstract class AbstractOsgiCompilerMojo extends AbstractCompilerMojo
*/
public static final String RULE_EXCLUDE_ALL = "?**/*";

private static final Object LOCK = new Object();

private static final Set<String> MATCH_ALL = Collections.singleton("**/*");

private static final String PREFS_FILE_PATH = ".settings" + File.separator + "org.eclipse.jdt.core.prefs";
Expand Down Expand Up @@ -330,7 +332,11 @@ public final void execute() throws MojoExecutionException, MojoFailureException

checkTargetLevelCompatibleWithManifestBREEs(effectiveTargetLevel, manifestBREEs);

doCompile();
synchronized (LOCK) {
// sync to workaround https://bugs.eclipse.org/bugs/show_bug.cgi?id=574450
// TODO remove it when default ECJ has fix
doCompile();
}
doFinish();
}

Expand Down

0 comments on commit 4335d09

Please sign in to comment.