Skip to content

Commit

Permalink
allow parallel execution of PackagePluginMojo
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianJho authored and mickaelistria committed Apr 9, 2021
1 parent 6895ce4 commit 44469c2
Showing 1 changed file with 8 additions and 13 deletions.
Expand Up @@ -55,7 +55,6 @@
*/
@Mojo(name = "package-plugin", threadSafe = true)
public class PackagePluginMojo extends AbstractTychoPackagingMojo {
private static final Object LOCK = new Object();

/**
* The output directory of the jar file
Expand Down Expand Up @@ -158,20 +157,16 @@ public class PackagePluginMojo extends AbstractTychoPackagingMojo {

@Override
public void execute() throws MojoExecutionException {
synchronized (LOCK) {
ReactorProject reactorProject = DefaultReactorProject.adapt(project);
pdeProject = (EclipsePluginProject) reactorProject
.getContextValue(TychoConstants.CTX_ECLIPSE_PLUGIN_PROJECT);

createSubJars();
ReactorProject reactorProject = DefaultReactorProject.adapt(project);
pdeProject = (EclipsePluginProject) reactorProject.getContextValue(TychoConstants.CTX_ECLIPSE_PLUGIN_PROJECT);

File pluginFile = createPluginJar();
project.getArtifact().setFile(pluginFile);
File testPluginFile = createTestPluginJar(reactorProject);
if (testPluginFile != null) {
projectHelper.attachArtifact(project, "jar", ArtifactType.TYPE_ECLIPSE_TEST_FRAGMENT, testPluginFile);
}
createSubJars();

File pluginFile = createPluginJar();
project.getArtifact().setFile(pluginFile);
File testPluginFile = createTestPluginJar(reactorProject);
if (testPluginFile != null) {
projectHelper.attachArtifact(project, "jar", ArtifactType.TYPE_ECLIPSE_TEST_FRAGMENT, testPluginFile);
}
}

Expand Down

0 comments on commit 44469c2

Please sign in to comment.