MelleD opened a new pull request, #3628: URL: https://github.com/apache/tika/pull/3628
Fix https://issues.apache.org/jira/browse/TIKA-5066 Problem tika-bom is not usable together with spring-boot-starter-parent (or any project that wants to control its own third-party versions). tika-bom inherits from tika-parent. The flatten-maven-plugin configured in tika-parent uses flattenMode=resolveCiFriendliesOnly, so the published tika-bom still declares tika-parent as its parent. tika-parent imports a number of third-party BOMs, for example: ``` <dependency> <groupId>io.netty</groupId> <artifactId>netty-bom</artifactId> <version>${netty.version}</version> <type>pom</type> <scope>import</scope> </dependency> ``` When a consumer imports tika-bom, Maven resolves its parent chain and all of these managed versions (netty, jackson, jetty, grpc, log4j, ...) leak into the consumer's dependencyManagement, overriding versions managed by e.g. Spring Boot. Steps to reproduce see Ticket Fix is same approach as Apache Jena (https://github.com/apache/jena/issues/4107, commit [e1211db](https://github.com/apache/jena/commit/e1211dbd88649a374fc46cb61efe161b4df1a9f7)): Override flatten-maven-plugin in tika-bom/pom.xml with flattenMode=bom. The flattened (published) BOM no longer has a <parent> and only contains Tika's own dependencyManagement; third-party BOM imports from tika-parent are gone. Keep ${revision} for the BOM entries and use properties=resolve, so the flattened BOM defines revision and the entries stay resolvable for consumers. (Properties of an imported BOM do not affect the consumer's dependency management.) The plugin version is already managed in tika-parent, so no other change is needed. Verification tika-bom/.flattened-pom.xml contains no <parent> and no <scope>import</scope>. It has only the 90 org.apache.tika entries with ${revision}, which is defined in the resolved <properties>. The consumer project above resolves Spring Boot's Netty version after the change and Tika's version before it. tika-core still resolves to the Tika version (4.3.0-SNAPSHOT via ${revision}). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
