Maven配置外掛跳過測試程式碼的編譯和執行:
<!-- 編譯外掛 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <!-- 略過測試程式碼的編譯,不推薦 --> <skip>true</skip> </configuration> </plugin> <!-- 單元測試外掛 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- 略過整個單元測試的執行,不推薦 --> <skip>true</skip> </configuration> </plugin>