简体   繁体   English

在Eclipse上按F11时,Maven自动安装项目

[英]Maven install project automatically when pressing F11 on eclipse

I have a maven project in Eclipse. 我在Eclipse中有一个Maven项目。 Everytime when I need to do maven install , I have to right click on the project/POM and select maven install . 每当我需要进行maven install ,都必须右键单击项目/ POM,然后选择maven install But when I press F11 , it shows me a list of Run As possibilities, which again I need to select maven install : 但是,当我按F11键时,它向我显示了“ Run As可能性的列表,再次需要选择maven install

在此处输入图片说明

How can I make it automatically select maven install as default whenever I press F11 or the run button ? 每当我按下F11run button时,如何使其自动将maven install选择为默认maven install

Try these steps: 请尝试以下步骤:

  1. Go to Window -> Preferences . 转到Window -> Preferences
  2. In the left top corner there is a text field type keys in it as shown below: 在左上角有一个文本字段类型keys ,如下所示:

在此处输入图片说明

  1. Then type install on the text box available on the right side then select Run Maven Install as shown below: 然后在右侧的文本框中键入install ,然后选择Run Maven Install ,如下所示:

在此处输入图片说明

  1. Then there is a lable with Binding below. 然后是下面带有Binding的标签。 Select the shortcut keys that you want to use for mvn install as shown below: 选择要用于mvn install的快捷键,如下所示:

在此处输入图片说明

Here Ctrl+M is the shortcut key that I used. 这里Ctrl+M是我使用的快捷键。 Don't forget to click on Apply and Close button. 不要忘记单击“ Apply and Close按钮。 It should work. 它应该工作。

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

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