How to Solve Errors encountered by maven

Could not transfer artifact
org.apache.maven.surefire:surefire-junit-platform:pom:2.22.2 from/to
alimaven (http://maven.aliyun.com/nexus/content/groups/public/):
java.lang.RuntimeException: Unexpected error:
java.security.InvalidAlgorithmParameterException: the trustAnchors
parameter must be non-empty

Solution:

Just load this dependency

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

Read More: