Guosmilesmile commented on code in PR #15843:
URL: https://github.com/apache/iceberg/pull/15843#discussion_r3147687820
##########
spark/v3.4/build.gradle:
##########
@@ -49,6 +49,14 @@
project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") {
}
}
+ configurations {
+ parquetTestArtifactsRuntime {
+ canBeConsumed = false
+ canBeResolved = true
+ transitive = false
+ }
+ }
+
Review Comment:
When I add `testImplementation (project(path: ':iceberg-parquet',
configuration: 'testFixturesRuntimeElements'))` in spark I meet a error.
```> Module 'org.apache.iceberg:iceberg-parquet' has been rejected:
Cannot select module with conflict on capability
'org.apache.iceberg:iceberg-parquet-test-fixtures:1.10.0-SNAPSHOT' also
provided by ['project :iceberg-parquet' (testFixturesApiElements), 'project
:iceberg-parquet' (testFixturesRuntimeElements)]
```
Spark tests already compile against the main :iceberg-parquet artifact and
its testFixtures, but some test code/resources from parquet are only needed at
execution time. Keeping them in a separate runtime-only configuration avoids
exposing parquet's internal test classes on the test compile classpath, and
transitive = false makes sure we only pull in that test jar itself rather than
an extra dependency graph.
parquetTestArtifactsRuntime is an internal, resolvable-only configuration.
canBeConsumed = false means it is not published for other projects to consume,
canBeResolved = true allows this project to resolve it into files and append
them to the test classpath, and transitive = false ensures we only pull the
:iceberg-parquet testArtifacts jar itself rather than its full transitive
dependency graph.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]