Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #183 - avoid parallel execution of compiler #191

Merged
merged 1 commit into from Jul 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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