Index: src/main/java/org/codehaus/mojo/versions/SetMojo.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/org/codehaus/mojo/versions/SetMojo.java	(revision 19960)
+++ src/main/java/org/codehaus/mojo/versions/SetMojo.java	(revision )
@@ -111,6 +111,16 @@
     private boolean processParent;
 
     /**
+     * Whether to include only child modules that actually descends from the root pom. If set to false, child modules that
+     * specify a parent other than the root pom will also be processed.
+     * If not set will default to true.
+     *
+     * @parameter expression="${strictParentHierarchy}" default-value="true"
+     * @since 1.3
+     */
+    private boolean strictParentHierarchy;
+
+    /**
      * Whether to process the project version. If not set will default to true.
      *
      * @parameter expression="${processProject}" default-value="true"
@@ -209,6 +219,8 @@
             final MavenProject project =
                 PomHelper.getLocalRoot( projectBuilder, getProject(), localRepository, null, getLog() );
 
+            final String rootVersion = project.getVersion();
+
             getLog().info( "Local aggregation root: " + project.getBasedir() );
             final Map<String, Model> reactor = PomHelper.getReactorModels( project, getLog() );
 
@@ -273,8 +285,12 @@
                     "Looking for modules which use " + ArtifactUtils.versionlessKey( sourceGroupId, sourceArtifactId )
                         + " as their parent" );
 
-                final Iterator j =
-                    PomHelper.getChildModels( reactor, sourceGroupId, sourceArtifactId ).entrySet().iterator();
+                final Iterator j;
+                if (strictParentHierarchy) {
+                    j = PomHelper.getChildModels( reactor, sourceGroupId, sourceArtifactId ).entrySet().iterator();
+                } else {
+                    j = reactor.entrySet().iterator();
+                }
 
                 while ( j.hasNext() )
                 {
@@ -299,8 +315,8 @@
                                 + sourceVersion );
                     }
                     final boolean targetExplicit = PomHelper.isExplicitVersion( targetModel );
-                    if ( ( updateMatchingVersions.booleanValue() || !targetExplicit ) && StringUtils.equals(
-                        parent.getVersion(), PomHelper.getVersion( targetModel ) ) )
+                    if ( ( updateMatchingVersions.booleanValue() || !targetExplicit ) &&
+                            versionMatchesParent( parent, targetModel, rootVersion ) )
                     {
                         getLog().debug(
                             "    module is " + ArtifactUtils.versionlessKey( PomHelper.getGroupId( targetModel ),
@@ -336,6 +352,11 @@
         {
             throw new MojoExecutionException( e.getMessage(), e );
         }
+    }
+
+    private boolean versionMatchesParent( Parent parent, Model targetModel, String rootVersion ) {
+        String versionToCompare = strictParentHierarchy ? parent.getVersion() : rootVersion;
+        return StringUtils.equals( versionToCompare, PomHelper.getVersion( targetModel ) );
     }
 
     /**
