diff --git a/gmaven-plugin/src/main/java/org/codehaus/gmaven/plugin/MojoSupport.java b/gmaven-plugin/src/main/java/org/codehaus/gmaven/plugin/MojoSupport.java index 4276a44e..a9c4f811 100644 --- a/gmaven-plugin/src/main/java/org/codehaus/gmaven/plugin/MojoSupport.java +++ b/gmaven-plugin/src/main/java/org/codehaus/gmaven/plugin/MojoSupport.java @@ -63,12 +63,16 @@ public abstract class MojoSupport */ protected MavenProject project; + private static final Object lock = new Object(); + /** * Main Mojo execution hook. Sub-class should use {@link #doExecute} instead. */ - public synchronized void execute() throws MojoExecutionException, MojoFailureException { + public void execute() throws MojoExecutionException, MojoFailureException { try { - doExecute(); + synchronized(lock) { + doExecute(); + } } catch (Exception e) { //