简体   繁体   English

“ mvn全新安装”和“ mvn全新安装”有什么区别?

[英]What is the difference between “mvn clean install” and “mvn clean verify install”?

I am using the Tycho plugin to compile an Eclipse plugin project. 我正在使用Tycho插件来编译Eclipse插件项目。 When I run the command 当我运行命令

mvn clean install my build passes mvn clean install我的构建通行证

When I run the command 当我运行命令

mvn clean verify install my build fails with the following: mvn clean verify install我的构建失败,并显示以下内容:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.1.0:
p2-metadata-default (default-p2-metadata-default) on project 
com.mysite.project: 
Execution default-p2-metadata-default of goal 
org.eclipse.tycho:tycho-p2-plugin:1.1.0:p2-metadata-default failed. 
IllegalArgumentException -> [Help 1]

The failure stacktrace is: 失败的堆栈跟踪为:

    at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getCanonicalArtifact(P2GeneratorImpl.java:193)
    at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:146)
    at org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:149)
    at org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:108)
    at org.eclipse.tycho.plugins.p2.P2MetadataDefaultMojo.execute(P2MetadataDefaultMojo.java:33)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    ... 21 more

From everything I can find on Maven, invoking the install phase should implicitly trigger the verify phase. 从我在Maven上可以找到的所有内容中,调用install阶段应隐式触发verify阶段。 What's going on here? 这里发生了什么?

personally, i never use mvn install when using tycho, because it will install the bundles into your local repo, and since you're build eclipse bundles , you do not have to push them to your maven repo. 就个人而言,我从不使用tycho时使用mvn install ,因为它将捆绑包安装到您的本地仓库中,并且由于您正在构建eclipse捆绑包 ,因此您不必将它们推送到您的maven仓库中。 back to your question, calling two phases in a single command is not necessary since the install phase should trigger the verify phase. 回到您的问题,由于安装阶段应触发验证阶段,因此无需在单个命令中调用两个阶段。

so use only mvn verify to build your product or only mvn install to achieve the exact same goal ( and have the built artifact pushed into your local repo ) 因此,仅可使用mvn verify来构建您的产品,或仅使用mvn install来实现完全相同的目标(并将已构建的工件推送到本地存储库中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM