如何在IntelliJ IDEA中清理或清理构建我的Maven项目? [英] How to clean or clean build my Maven project in IntelliJ IDEA?

查看:186
本文介绍了如何在IntelliJ IDEA中清理或清理构建我的Maven项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java项目中使用

如前所述,您也可以通过命令行/控制台来调用它.但是,如果已经在使用IntelliJ,我看不到重点.在工作时只需显示/隐藏此窗格即可.我每天无数次地使用 install 来构建完整的应用程序,并且每当我怀疑不是所有项目都是最新版本时都点击 clean .结果.

Build > 重建项目

如果在开发中运行应用程序时遇到怪异问题,请尝试菜单项 Build > Rebuild Project .

我问过 Build > Rebuild Project 之间有什么区别与进行Maven clean 相比.但是我仍然不了解确切的细节.因此,当事情看起来很古怪时,我都会纠正这艘船.

提示:

  • 当行为看起来很奇怪时,重新启动IntelliJ可能会有所帮助.
  • 保持Intellij更新.

I'm using Apache Maven in my Java project. in NetBeans there are build and clean build icons but there aren't in IntellIJ IDEA. How can I clean or clean build my project in it?

解决方案

Maven > Lifecycle > clean

Open the Maven Projects panel. Click lower-left corner for pop-up menu if that panel is not already visible.

In that panel, open the Lifecycle item. There you will find clean and install items for you to run.

As commented, you can also invoke this by command-line/console. But if already using IntelliJ, I do not see the point. Just show/hide this pane as you work. I use it countless times a day to hit install to build complete app, and hit clean whenever I suspect not all of the project is up-to-date in the build-results.

Build > Rebuild Project

If you are having weird problems in running the app in development also try the menu item Build > Rebuild Project.

I have asked what is the difference between a Build > Rebuild Project versus doing a Maven clean. But I still do not understand the precise details. So when things seem wonky, I do both to right the ship.

Tips:

  • Restarting IntelliJ may help when behavior seems odd.
  • Keep Intellij updated.

这篇关于如何在IntelliJ IDEA中清理或清理构建我的Maven项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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