You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2018/12/20 14:30:56 UTC
[1/2] lucene-solr:master: LUCENE-8611: Fix Maven test compilation by
making lucene-test-framework's dependencies transitive for all modules that
depend on it,
by not writing out the / section for it in
the grandparent PO
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 7a5aa3dfe -> 421a3ac0c
refs/heads/master 1f0e875db -> 86bc028f0
LUCENE-8611: Fix Maven test compilation by making lucene-test-framework's dependencies transitive for all modules that depend on it, by not writing out the <dependencyManagement>/<exclusions> section for it in the grandparent POM.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/86bc028f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/86bc028f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/86bc028f
Branch: refs/heads/master
Commit: 86bc028f0da1b6945fd7d89ba6e1fa08b47d6266
Parents: 1f0e875
Author: Steve Rowe <sa...@apache.org>
Authored: Thu Dec 20 09:30:16 2018 -0500
Committer: Steve Rowe <sa...@apache.org>
Committed: Thu Dec 20 09:30:16 2018 -0500
----------------------------------------------------------------------
.../apache/lucene/dependencies/GetMavenDependenciesTask.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86bc028f/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
----------------------------------------------------------------------
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 2c20abd..610323f 100644
--- a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
+++ b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
@@ -94,6 +94,7 @@ public class GetMavenDependenciesTask extends Task {
private static final Set<String> globalOptionalExternalDependencies = new HashSet<>();
private static final Map<String,Set<String>> perModuleOptionalExternalDependencies = new HashMap<>();
+ private static final Set<String> modulesWithTransitiveDependencies = new HashSet<>();
static {
// Add modules here that have split compile and test POMs
// - they need compile-scope deps to also be test-scope deps.
@@ -105,6 +106,11 @@ public class GetMavenDependenciesTask extends Task {
// Format is "groupId:artifactId"
globalOptionalExternalDependencies.addAll(Arrays.asList
("org.slf4j:jul-to-slf4j", "org.slf4j:slf4j-log4j12"));
+
+ // Add modules here that should NOT have their dependencies
+ // excluded in the grandparent POM's dependencyManagement section,
+ // thus enabling their dependencies to be transitive.
+ modulesWithTransitiveDependencies.addAll(Arrays.asList("lucene-test-framework"));
}
private final XPath xpath = XPathFactory.newInstance().newXPath();
@@ -894,7 +900,7 @@ public class GetMavenDependenciesTask extends Task {
if (null != classifier) {
builder.append(indent).append(" <classifier>").append(classifier).append("</classifier>\n");
}
- if (null != exclusions && ! exclusions.isEmpty()) {
+ if ( ! modulesWithTransitiveDependencies.contains(artifactId) && null != exclusions && ! exclusions.isEmpty()) {
builder.append(indent).append(" <exclusions>\n");
for (String dependency : exclusions) {
int splitPos = dependency.indexOf(':');
[2/2] lucene-solr:branch_7x: LUCENE-8611: Fix Maven test compilation
by making lucene-test-framework's dependencies transitive for all modules
that depend on it,
by not writing out the / section for it in
the grandparent
Posted by sa...@apache.org.
LUCENE-8611: Fix Maven test compilation by making lucene-test-framework's dependencies transitive for all modules that depend on it, by not writing out the <dependencyManagement>/<exclusions> section for it in the grandparent POM.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/421a3ac0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/421a3ac0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/421a3ac0
Branch: refs/heads/branch_7x
Commit: 421a3ac0c2962ce8025952451cd4a285c483dd54
Parents: 7a5aa3d
Author: Steve Rowe <sa...@apache.org>
Authored: Thu Dec 20 09:30:16 2018 -0500
Committer: Steve Rowe <sa...@apache.org>
Committed: Thu Dec 20 09:30:33 2018 -0500
----------------------------------------------------------------------
.../apache/lucene/dependencies/GetMavenDependenciesTask.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/421a3ac0/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
----------------------------------------------------------------------
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 2c20abd..610323f 100644
--- a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
+++ b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
@@ -94,6 +94,7 @@ public class GetMavenDependenciesTask extends Task {
private static final Set<String> globalOptionalExternalDependencies = new HashSet<>();
private static final Map<String,Set<String>> perModuleOptionalExternalDependencies = new HashMap<>();
+ private static final Set<String> modulesWithTransitiveDependencies = new HashSet<>();
static {
// Add modules here that have split compile and test POMs
// - they need compile-scope deps to also be test-scope deps.
@@ -105,6 +106,11 @@ public class GetMavenDependenciesTask extends Task {
// Format is "groupId:artifactId"
globalOptionalExternalDependencies.addAll(Arrays.asList
("org.slf4j:jul-to-slf4j", "org.slf4j:slf4j-log4j12"));
+
+ // Add modules here that should NOT have their dependencies
+ // excluded in the grandparent POM's dependencyManagement section,
+ // thus enabling their dependencies to be transitive.
+ modulesWithTransitiveDependencies.addAll(Arrays.asList("lucene-test-framework"));
}
private final XPath xpath = XPathFactory.newInstance().newXPath();
@@ -894,7 +900,7 @@ public class GetMavenDependenciesTask extends Task {
if (null != classifier) {
builder.append(indent).append(" <classifier>").append(classifier).append("</classifier>\n");
}
- if (null != exclusions && ! exclusions.isEmpty()) {
+ if ( ! modulesWithTransitiveDependencies.contains(artifactId) && null != exclusions && ! exclusions.isEmpty()) {
builder.append(indent).append(" <exclusions>\n");
for (String dependency : exclusions) {
int splitPos = dependency.indexOf(':');