Revision: 5973
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5973&view=rev
Author: manningr
Date: 2010-11-20 02:08:52 +0000 (Sat, 20 Nov 2010)
Log Message:
-----------
Make this mojo thread safe. Since this mojo works with an external file which is essentially shared state, two concurrent threads could be problematic. So execute is synchronized. This mojo typically is only ever used once during a build, so it is technically not necessary to do this; better to be safe than sorry.
Modified Paths:
--------------
trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java
Modified: trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java
===================================================================
--- trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java 2010-11-20 01:17:09 UTC (rev 5972)
+++ trunk/maven-plugin-workspace/squirrelsql-update-site-plugin/src/main/java/net/sf/squirrel_sql/BuildUpdateSiteMojo.java 2010-11-20 02:08:52 UTC (rev 5973)
@@ -46,6 +46,7 @@
*
* @goal build-update-site
* @phase package
+ * @threadSafe
*/
public class BuildUpdateSiteMojo extends AbstractMojo
{
@@ -103,7 +104,7 @@
* @throws MojoExecutionException
* if the releaseDirectory isn't specified, doesn't exist or cannot be read.
*/
- public void execute() throws MojoExecutionException
+ synchronized public void execute() throws MojoExecutionException
{
String channelName = "snapshot";
String releaseName = "snapshot";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|