我使用maven作为构建工具并运行一些集成测试用例。我使用System.out.println()
在我的测试用例中记录了一些语句并执行了mvn verify
,甚至我没有clean install/package
jar。这些更改反映了日志记录。 mvn验证是否隐式执行install/package
或者它不需要构建jar。如果有任何想法请分享。
答案 0 :(得分:1)
maven目标verify
在包装后看到:Maven Build Lifecycle所以包装发生了。
答案 1 :(得分:0)
请参阅订单的mvn构建生命周期(以上都使用)https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html:
validate - validate the project is correct and all necessary information is available
compile - compile the source code of the project
test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package - take the compiled code and package it in its distributable format, such as a JAR.
integration-test - process and deploy the package if necessary into an environment where integration tests can be run
verify - run any checks to verify the package is valid and meets quality criteria
install - install the package into the local repository, for use as a dependency in other projects locally
deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.