简体   繁体   中英

Clean and build an Eclipse java project with one click

Is it possible to clean and build a java project in Eclipse with one click? I don't want to go to Project -> clean -> OK and than to project menu 'Build project'

In Project->Clean I select "Clean projects selected below", select my project(s) and check "Start a build immediately" with "Build only selected projects".

Then go to Window->Preferences->General->Keys, search "Build clean" and enter my own binding for this command. For example, Ctrl + D .

Then, when I press Ctrl + D and Enter I have clean and build.

When you have

Project --> Build Automatically

checked, it will be automatically rebuilt after cleaning it.

If you need something more powerful than clean and deploy, I suggest to learn Ant build tool. http://ant.apache.org/

Just configure it for your project and prepare the build script, than configure the build script for the clean and build target. If you need, also to deploy it on your server (glassfish, weblogic or whatever you want). With Ant you can configure more situation (test, production..)

选择项目并转到菜单栏:选择Windows然后 - >选择首选项然后 - >选择键然后 - >选择构建和清理

只需Ctrl + S然后Build ,它就会像新的一样好!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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