diff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.template
index 50299a3cda..bbcd490712 100644
--- a/dev-tools/maven/pom.xml.template
+++ b/dev-tools/maven/pom.xml.template
@@ -140,9 +140,6 @@
 @lucene.solr.dependency.management@
     </dependencies>
   </dependencyManagement>
-  <prerequisites>
-    <maven>2.2.1</maven>
-  </prerequisites>
   <dependencies>
     <dependency> 
       <groupId>junit</groupId>
@@ -385,7 +382,7 @@
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>
-            <id>enforce-java-compat-version-and-maven-2.2.1</id>
+            <id>enforce-java-compat-version-and-maven-3.2.1</id>
             <goals>
               <goal>enforce</goal>
             </goals>
@@ -396,8 +393,8 @@
                   <version>[${java.legacy-compat.version},)</version>
                 </requireJavaVersion>
                 <requireMavenVersion>
-                  <message>Maven 2.2.1+ is required.</message>
-                  <version>[2.2.1,)</version>
+                  <message>Maven 3.2.1+ is required.</message>
+                  <version>[3.2.1,)</version>
                 </requireMavenVersion>
                 <requirePluginVersions/>
               </rules>
diff --git a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
index 610323f7f0..1406144b72 100644
--- a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
+++ b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
@@ -83,7 +83,7 @@ public class GetMavenDependenciesTask extends Task {
   private static final Pattern COMPILATION_OUTPUT_DIRECTORY_PATTERN 
       = Pattern.compile("(lucene|solr)/build/(?:contrib/)?(.*)/classes/(?:java|test)");
   private static final String UNWANTED_INTERNAL_DEPENDENCIES
-      = "/(?:test-)?lib/|test-framework/classes/java|/test-files|/resources";
+      = "/(?:test-)?lib/|build/(?:solr-)?test-framework|/test-files|/resources";
   private static final Pattern SHARED_EXTERNAL_DEPENDENCIES_PATTERN
       = Pattern.compile("((?:solr|lucene)/(?!test-framework).*)/((?:test-)?)lib/");
 
@@ -395,13 +395,13 @@ public class GetMavenDependenciesTask extends Task {
         for (ExternalDependency dep : extDeps) {
           StringBuilder builder = dep.isTestDependency ? testScopeBuilder : compileScopeBuilder;
           appendDependencyXml(builder, dep.groupId, dep.artifactId, "    ", null, 
-                              dep.isTestDependency, dep.isOptional, dep.classifier, null);
+                              dep.isTestDependency, dep.isOptional, dep.classifier, false);
           // Test POMs for solrj, solr-core, lucene-codecs and lucene-core modules
           // need to include all compile-scope dependencies as test-scope dependencies
           // since we've turned off transitive dependency resolution.
           if ( ! dep.isTestDependency && modulesWithSeparateCompileAndTestPOMs.contains(module)) {
             appendDependencyXml(testScopeBuilder, dep.groupId, dep.artifactId, "    ", null,
-                                true, dep.isOptional, dep.classifier, null);
+                                true, dep.isOptional, dep.classifier, false);
           }
         }
       }
@@ -440,18 +440,9 @@ public class GetMavenDependenciesTask extends Task {
    */
   private void appendAllInternalDependencies(StringBuilder builder) {
     for (String artifactId : internalCompileScopeDependencies.keySet()) {
-      List<String> exclusions = new ArrayList<>();
-      exclusions.addAll(internalCompileScopeDependencies.get(artifactId));
-      SortedSet<ExternalDependency> extDeps = allExternalDependencies.get(artifactId);
-      if (null != extDeps) {
-        for (ExternalDependency externalDependency : extDeps) {
-          if ( ! externalDependency.isTestDependency && ! externalDependency.isOptional) {
-            exclusions.add(externalDependency.groupId + ':' + externalDependency.artifactId);
-          }
-        }
-      }
       String groupId = ivyModuleInfo.get(artifactId);
-      appendDependencyXml(builder, groupId, artifactId, "      ", "${project.version}", false, false, null, exclusions);
+      boolean makeIntransitive = ! modulesWithTransitiveDependencies.contains(artifactId);
+      appendDependencyXml(builder, groupId, artifactId, "      ", "${project.version}", false, false, null, makeIntransitive);
     }
   }
 
@@ -515,9 +506,8 @@ public class GetMavenDependenciesTask extends Task {
           Set<String> classifiers = dependencyClassifiers.get(coordinate);
           if (null != classifiers) {
             for (String classifier : classifiers) {
-              Collection<String> exclusions = getTransitiveDependenciesFromIvyCache(groupId, artifactId, version);
               appendDependencyXml
-                  (dependenciesBuilder, groupId, artifactId, "      ", version, false, false, classifier, exclusions);
+                  (dependenciesBuilder, groupId, artifactId, "      ", version, false, false, classifier, true);
             }
           }
         }
@@ -647,7 +637,7 @@ public class GetMavenDependenciesTask extends Task {
             int splitPos = dependency.indexOf(':');
             String groupId = dependency.substring(0, splitPos);
             String artifactId = dependency.substring(splitPos + 1);
-            appendDependencyXml(newPropertyValue, groupId, artifactId, "    ", null, false, false, null, null);
+            appendDependencyXml(newPropertyValue, groupId, artifactId, "    ", null, false, false, null, false);
           }
           if (newPropertyValue.length() > 0) {
             newPropertyValue.setLength(newPropertyValue.length() - 1); // drop trailing newline
@@ -673,7 +663,7 @@ public class GetMavenDependenciesTask extends Task {
           int splitPos = dependency.indexOf(':');
           String groupId = dependency.substring(0, splitPos);
           String artifactId = dependency.substring(splitPos + 1);
-          appendDependencyXml(newPropertyValue, groupId, artifactId, "    ", null, true, false, null, null);
+          appendDependencyXml(newPropertyValue, groupId, artifactId, "    ", null, true, false, null, false);
         }
       }
       if (newPropertyValue.length() > 0) {
@@ -884,7 +874,7 @@ public class GetMavenDependenciesTask extends Task {
  */
   private void appendDependencyXml(StringBuilder builder, String groupId, String artifactId, 
                                    String indent, String version, boolean isTestDependency, 
-                                   boolean isOptional, String classifier, Collection<String> exclusions) {
+                                   boolean isOptional, String classifier, boolean makeIntransitive) {
     builder.append(indent).append("<dependency>\n");
     builder.append(indent).append("  <groupId>").append(groupId).append("</groupId>\n");
     builder.append(indent).append("  <artifactId>").append(artifactId).append("</artifactId>\n");
@@ -900,17 +890,12 @@ public class GetMavenDependenciesTask extends Task {
     if (null != classifier) {
       builder.append(indent).append("  <classifier>").append(classifier).append("</classifier>\n");
     }
-    if ( ! modulesWithTransitiveDependencies.contains(artifactId) && null != exclusions && ! exclusions.isEmpty()) {
+    if (makeIntransitive) {
       builder.append(indent).append("  <exclusions>\n");
-      for (String dependency : exclusions) {
-        int splitPos = dependency.indexOf(':');
-        String excludedGroupId = dependency.substring(0, splitPos);
-        String excludedArtifactId = dependency.substring(splitPos + 1);
-        builder.append(indent).append("    <exclusion>\n");
-        builder.append(indent).append("      <groupId>").append(excludedGroupId).append("</groupId>\n");
-        builder.append(indent).append("      <artifactId>").append(excludedArtifactId).append("</artifactId>\n");
-        builder.append(indent).append("    </exclusion>\n");
-      }
+      builder.append(indent).append("    <exclusion>\n");
+      builder.append(indent).append("      <groupId>*</groupId>\n");
+      builder.append(indent).append("      <artifactId>*</artifactId>\n");
+      builder.append(indent).append("    </exclusion>\n");
       builder.append(indent).append("  </exclusions>\n");
     }
     builder.append(indent).append("</dependency>\n");
