Apache Solr open-source search software
Added a junit test scope dependency in the grandparent POM to work around a Maven 2.2.X bug in which transitive test dependency resolution omits junit as duplicate everywhere it occurs, resulting in the absence of the junit jar from the test classpath, and then test compilation failure. This manifested only in Solr's clustering contrib, but I'm putting it in the grandfather POM to insure it doesn't happen elsewhere. Under Maven 3.0.4, this behavior no longer occurs, so when we upgrade the minimum Maven version to 3.0.4+, the junit test scope dependency in the grandfather POM can be removed.
Steven Roweb383f4a044f2
diff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.templateindex 8e122923f33..c1f3a0faf83 100644--- a/dev-tools/maven/pom.xml.template+++ b/dev-tools/maven/pom.xml.template@@ -362,6 +362,19 @@</dependency></dependencies></dependencyManagement>+ <dependencies>+ <dependency>+ <!-- Maven 2.2.X has a bug that omits as duplicate all JUnit -->+ <!-- dependencies from the classpath when compiling solr-clustering, -->+ <!-- causing test compilation to fail. Maven 3.0.4 test compilation -->+ <!-- succeeds with the exact same dependencies, so apparently the -->+ <!-- bug has been fixed. This dependency can be removed when the -->+ <!-- minimum Maven version is upgraded to 3.0.4+. -->+ <groupId>junit</groupId>+ <artifactId>junit</artifactId>+ <scope>test</scope>+ </dependency>+ </dependencies><build><directory>lucene/build/lucene-parent</directory><pluginManagement>@@ -385,6 +398,11 @@<target>${java.compat.version}</target></configuration></plugin>+ <plugin>+ <groupId>org.apache.maven.plugins</groupId>+ <artifactId>maven-dependency-plugin</artifactId>+ <version>2.4</version>+ </plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-deploy-plugin</artifactId>