You have correctly pointed out that the -Dmaven.test.skip=true will skip compiling the tests. This will also skip building the test artifacts like you mentioned. However, a common practice for large projects is to have testing utilities and various base classes shared among modules in the same project. The code below is accomplished by having a module require a test-jar of a previously built module:
<dependency>
<groupId>org.myproject.mygroup</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
If the -Dmaven.test.skip=true has been elaborately stated, then test-jars aren't built, and any module that relies on them will fail to build obviously. Following that, once you use -DskipTests, Maven does not run the tests, but it does compile them and build the test-jar, making it available for the subsequent modules.