-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: AAMP-2.0.4
-
Component/s: ant-assembly-maven-plugin
-
Sprint:DevOps Sprint 10
During the graph generation, there are unexpected nodes (resolved children) which should have been filtered out following the Maven rules on transitive dependencies scope: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Transitive_Dependencies
[WARNING] Unexpected child node: hsqldb:hsqldb:jar:1.8.0.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test) [WARNING] Unexpected child node: org.nuxeo.runtime:nuxeo-runtime-scripting:jar:5.9.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test) [WARNING] Unexpected child node: org.nuxeo.runtime:nuxeo-runtime-test:jar:5.9.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test) [WARNING] Unexpected child node: org.nuxeo.ecm.core:nuxeo-core-test:jar:5.9.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test) [WARNING] Unexpected child node: org.nuxeo.runtime:nuxeo-runtime-launcher:jar:5.9.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test) target/it/test3/build.log:[WARNING] Unexpected child node: junit:junit:jar:4.8.1 (test) for org.nuxeo.ecm.platform:nuxeo-platform-test:jar:5.9.1 (test)
That is due to Aether implementation which builds a full graph with "no assumption on any relationships between the scopes". Even our own org.nuxeo.build.maven.graph.ScopeDependencySelector.ScopeDependencySelector(String...) is not enough to prevent unwanted dependencies being collected before their scope is managed regarding their parent scope.
Current implementation is filtering out the dependency nodes if:
- parent scope is test, child scope is provided or test,
- parent scope is not test and child scope is test.
Since the Aether upgrade, it seems enough to simply filter out non-root nodes which scope is test or provided.
In the mean time, the logged message level can be decreased to DEBUG.
- is required by
-
NXBT-1165 Remove transitive dependencies scope filtering
- Open