IntelliJ:构建>重建项目菜单项与Maven全新安装 [英] IntelliJ: Build > Rebuild Project menu item versus Maven clean install

查看:65
本文介绍了IntelliJ:构建>重建项目菜单项与Maven全新安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于 Maven 驱动的项目.wikipedia.org/wiki/IntelliJ_IDEA"rel =" nofollow noreferrer> IntelliJ 2018年,我什么时候应该选择使用…

  • IntelliJ 2018.1菜单项Build> Rebuild Project
  • Maven面板的cleaninstall生命周期项目

在哪种情况下合适?

我的情况是使用vaadin-archetype-application-multimodule Vaadin 8 应用程序vaadin.com/docs/v8/framework/getting-started/getting-started-archetypes.html"rel =" nofollow noreferrer> Vaadin原型.

问题 IntelliJ Build> Rebuild Project是否调用maven? 是否有单个答案,其中说Rebuild Project根本不会调用Maven.但是没有给出何时使用路线与其他路线的指南.

解决方案

好吧,如果您在pom.xml文件(多模块项目中的新插件,新模块)中进行了实质性更改,则最好运行"mvn全新安装".我个人从未在Maven项目中使用重建项目".通常,我只是制作"项目,以便更新类文件,或者我开始真正的Maven构建以获取新的/更新的依赖项.

(对我而言)第三个重要选项是重新导入所有Maven项目"选项,如果纯Maven构建可以正常运行,则该选项非常有用,但是IntelliJ仍然认为项目中存在问题.

For a Maven-driven project in IntelliJ 2018, when should I choose to use…

  • The IntelliJ 2018.1 menu item Build > Rebuild Project
  • The Maven panel’s clean and install Lifecycle items

Under what circumstances is either appropriate?

My situation is a Vaadin 8 application using the vaadin-archetype-application-multimodule Vaadin archetype.

The Question, Does IntelliJ Build > Rebuild Project invoke maven? has a single Answer that says the Rebuild Project does not invoke Maven at all. But no guidance is given on when to use route versus the other.

解决方案

Well, if you make substancial changes within a pom.xml file (new plugins, new modules within a multi-module project), you'd better run "mvn clean install". I personally never use the "Rebuild Project" within a Maven project. usually I just "make" the project so the class files are updated, or I start a real Maven build to get new / updated dependencies.

The third important option (for me) is the "Reimport all Maven projects" option, which is quite useful if a pure Maven build runs fine, but IntelliJ still thinks that there is something wrong within your project.

这篇关于IntelliJ:构建>重建项目菜单项与Maven全新安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆