Github user mridulm commented on the issue:
https://github.com/apache/spark/pull/15553
@srowen You are right; for normal build, this should be a no-op.
Currently, there is no way to suppress compilation of tests (we can
suppress running test via -DskipTests but it will still compile), same for
generation of documentation. Both of these together take a non trivial amount
of time for the build (particularly when not on ssd's).
In maven, -Dmaven.test.skip=true is to be used to suppress building of test
classes.
Unfortunately, this does not apply to dependency resolution and in our
builds, we reference test artifacts with 'test' scope.
Since test compilation is suppressed via the flag, the corresponding
dependencies will be missing causing build failures. The only way around this
in maven is to move all relevant test dependencies into a profile which is
triggered by appropriate condition (-Dmaven.test.skip != true).
For uniformity, I moved all dependencies and not just spark test
dependencies.
-Dmaven.javadoc.skip=true is used in maven to suppress javadoc generation,
but our documentation generation is directly associated with the verify phase
and bypasses maven.javadoc.skip support from maven.
Note that the profiles docBuild and testCompilation are not expected to be
directly set via -P, but inferred via the corresponding maven flags.
If there is a better way to achieve suppressing test class compilation and
documentation generation, please do let me know.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]