Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Bug 427365: Enable sisu-maven-plugin to run in thread-safe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mcculls committed Feb 4, 2014
1 parent a940783 commit 423e1d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/eclipse/sisu/mojos/IndexMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*
* @goal index
* @requiresDependencyResolution test
* @threadSafe
*/
public class IndexMojo
extends AbstractMojo
Expand Down Expand Up @@ -176,7 +177,10 @@ public void setOutputDirectory( final File outputDirectory )

public void execute()
{
new SisuIndex( outputDirectory ).index( new URLClassSpace( getProjectClassLoader(), getIndexPath() ) );
synchronized ( project )
{
new SisuIndex( outputDirectory ).index( new URLClassSpace( getProjectClassLoader(), getIndexPath() ) );
}
}

// ----------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/eclipse/sisu/mojos/MainIndexMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @goal main-index
* @phase process-classes
* @requiresDependencyResolution compile
* @threadSafe
*/
public class MainIndexMojo
extends AbstractMojo
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/eclipse/sisu/mojos/TestIndexMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @goal test-index
* @phase process-test-classes
* @requiresDependencyResolution test
* @threadSafe
*/
public class TestIndexMojo
extends AbstractMojo
Expand Down

0 comments on commit 423e1d2

Please sign in to comment.