You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2013/06/17 23:04:14 UTC

svn commit: r1493936 - /maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java

Author: rfscholte
Date: Mon Jun 17 21:04:13 2013
New Revision: 1493936

URL: http://svn.apache.org/r1493936
Log:
Fix for M2, which already succeeds for M3

Modified:
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java?rev=1493936&r1=1493935&r2=1493936&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java Mon Jun 17 21:04:13 2013
@@ -286,6 +286,7 @@ public class EnforcerRuleUtils
     {
         // try these first.
         String modelGroup = model.getGroupId();
+        String modelArtifactId = model.getArtifactId();
         String modelVersion = model.getVersion();
 
         try
@@ -309,6 +310,9 @@ public class EnforcerRuleUtils
                 // MENFORCER-30, handle cases where the value is a property like ${project.parent.version}
                 modelVersion = (String) helper.evaluate( modelVersion );
             }
+            
+            // Is this only required for Maven2?
+            modelArtifactId = (String) helper.evaluate( modelArtifactId );
         }
         catch ( NullPointerException e )
         {
@@ -323,7 +327,7 @@ public class EnforcerRuleUtils
             // as above
         }
         return ( StringUtils.equals( groupId, modelGroup ) && StringUtils.equals( version, modelVersion ) && StringUtils
-            .equals( artifactId, model.getArtifactId() ) );
+            .equals( artifactId, modelArtifactId ) );
     }