The syntax to skip the compilation of the test is code example
Example 1: mvn clean install skip test
mvn clean install -Dmaven.test.skip=true
Example 2: how to skip test in maven
Skipping tests in Maven
mvn clean install -Dmaven.test.skip=true
Skipping tests in Maven