Author: krosenvold Date: Wed May 25 19:24:38 2011 New Revision: 1127643 URL: http://svn.apache.org/viewvc?rev=1127643&view=rev Log: [MENFORCER-106] @threadSafe
Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java maven/enforcer/trunk/pom.xml Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java?rev=1127643&r1=1127642&r2=1127643&view=diff ============================================================================== --- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java (original) +++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java Wed May 25 19:24:38 2011 @@ -35,10 +35,11 @@ import org.codehaus.plexus.personality.p /** * This goal displays the current platform information. - * + * * @goal display-info * @author <a href="mailto:bri...@apache.org">Brian Fox</a> * @version $Id$ + * @threadSafe */ public class DisplayInfoMojo extends AbstractMojo @@ -47,14 +48,14 @@ public class DisplayInfoMojo /** * Path Translator needed by the ExpressionEvaluator - * + * * @component role="org.apache.maven.project.path.PathTranslator" */ protected PathTranslator translator; /** * The MavenSession - * + * * @parameter default-value="${session}" * @readonly */ @@ -62,7 +63,7 @@ public class DisplayInfoMojo /** * POM - * + * * @parameter default-value="${project}" * @readonly * @required Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java?rev=1127643&r1=1127642&r2=1127643&view=diff ============================================================================== --- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java (original) +++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java Wed May 25 19:24:38 2011 @@ -45,6 +45,7 @@ import org.codehaus.plexus.personality.p * @requiresDependencyResolution test * @goal enforce * @phase validate + * @threadSafe * @author <a href="mailto:bri...@apache.org">Brian Fox</a> * @version $Id$ */ @@ -183,7 +184,11 @@ public class EnforceMojo if ( ignoreCache || shouldExecute( rule ) ) { // execute the rule - rules[i].execute( helper ); + //noinspection SynchronizationOnLocalVariableOrMethodParameter + synchronized ( rule ) + { + rule.execute( helper ); + } } } catch ( EnforcerRuleException e ) Modified: maven/enforcer/trunk/pom.xml URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/pom.xml?rev=1127643&r1=1127642&r2=1127643&view=diff ============================================================================== --- maven/enforcer/trunk/pom.xml (original) +++ maven/enforcer/trunk/pom.xml Wed May 25 19:24:38 2011 @@ -152,7 +152,7 @@ </distributionManagement> <properties> <maven.version>2.0.9</maven.version> - <maven.plugin.plugin.version>2.5.1</maven.plugin.plugin.version> + <maven.plugin.plugin.version>2.7</maven.plugin.plugin.version> <site.deploy.url>scp://people.apache.org/www/maven.apache.org</site.deploy.url> </properties>