-
Notifications
You must be signed in to change notification settings - Fork 140
Fix for transitive depManager #1589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Do not collect management data for scope and optional, as those are "inherited" in graph (contextualized from parent). These two properties are special, only root (POM) ones should count.
|
To check, create this POM on disk: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>transitive-reproducer</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Transitive Reproducer</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.13</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>And using Maven 4.0.0-rc-4 and patched (master + this PR) execute this command: The To make Maven 4.0.0-rc-4 "behave", you must use |
Enhanced all dependency manager implementations with comprehensive documentation, better code organization, and improved maintainability: AbstractDependencyManager (base class): - Restructured Javadoc with clear sections and HTML formatting - Added helper methods to reduce code duplication in property management - Implemented input validation with descriptive error messages - Enhanced field and method documentation - Improved code organization and maintainability ClassicDependencyManager: - Enhanced documentation explaining Maven 2.x compatibility behavior - Detailed explanation of depth=1 "hop" and its critical importance - Clear usage recommendations and comparisons with other managers - Comprehensive method documentation for deriveChildManager override DefaultDependencyManager: - Added clear warnings about incompatibility with Maven/ModelBuilder - Detailed explanation of aggressive management behavior - Clear guidance on when to use vs. when NOT to use - Enhanced constructor documentation with behavior warnings TransitiveDependencyManager: - Marked as recommended manager for modern Maven usage - Detailed explanation of ModelBuilder compatibility - Comprehensive documentation of inheritance handling logic - Enhanced isInheritedDerived() method documentation NoopDependencyManager: - Clear documentation of use cases and thread safety guarantees - Enhanced singleton pattern documentation - Detailed method documentation explaining no-op behavior - Performance characteristics explanation Key improvements: - Reduced code duplication through helper methods - Added parameter validation with meaningful error messages - Consistent documentation structure across all implementations - Clear manager selection guidance for developers - Cross-references between related classes - Enhanced developer experience with usage recommendations
Do not collect management data for scope and optional transitively, as those are "inherited" in graph (contextualized from parent). Changes: * fixed transitive manager to properly handle "scope" and "optional" (only from root) * removed "transitive" capability from classic manager (added in 2.0.x), it was a mistake (along with UT) * documented in Javadoc what each do and how * fixed suppliers to supply what is really expected
PR #1581 left some typos in, that makes javadoc puke: ``` [ERROR] /home/cstamas/Worx/apache-maven/maven-resolver/maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java:161: error: unterminated inline tag [ERROR] * @deprecated use {@code @tempdir) (JUnit 5) Or {@code TemporaryFolder} (JUnit 4) instead ``` PR #1589 used forbidden chars.
Do not collect management data for scope and optional transitively, as those are "inherited" in graph (contextualized from parent).
Changes: