Setting the MAVEN boot configuration in MyEclipse

Source: Internet
Author: User

1. Run goals and phases from the menu

If you've already used maven, you should be familiar with basic goals and phases and how to invoke them at the command line, such as MVN installation or mvn cleanup. In MyEclipse, commands that run Maven can be done through the right-click menu.

Right-click your maven project's pom.xml file , select Run as, and then select a basic goal.

Run MAVEN goal 2. Create a simple, custom boot configuration

Other goals, such as the MVN Web site, are not in the default list of Maven Run as. You can add custom build configurations and make other goals.

(1) Right-click the Pom.xml file in your Maven project and select Run as>run configurations.

(2) Right-click Maven Build and select New.

Create a new build configuration

(3) Enter a configuration name and click Select to select the goals to run.

Note : If you click the Select button to specify that the goals goals list is empty, you need to start the full repository index. To do this, open the Maven repositories view and expand global repositories. Right-click Central, and then select Enable Full index. The index takes several minutes to update.

Build configuration Details

(4) Click on the variables in the Run Configuration window to select the variables for the base directory.

Select the project location variable for the base directory

(5) You must select the check box to modify the command, which is equivalent to the command line flag.

(6) Click the Refresh option and select Refresh Resources in the Finish check box.

Refresh Options

(7) Click the Common option, and then select the Debug and Run check box that appears in the menu, click Apply.

Common options

To run the command, use the Run/debug menu or right-click the Pom.xml file and select Run As>run configurations. Select the configuration that you want to run, and then click Run.

3. Create a custom boot configuration with parameters

Some MAVEN commands that use plug-ins may require custom values as part of the command, and this section demonstrates the Add parameter command.

(1) Right-click the Pom.xml file in your Maven project and select Run as>run configurations.

(2) whether to create a new configuration or to copy an existing configuration, avoid entering the same settings again.

(3) Click Select to choose a goal that requires additional parameters. For example, the command for GPG, signing, and deploying files has only one-D parameter: mvn deploy-dgpg-passphrase=thephrase.

(4) Click Add to add a parameter.

(5) Enter a name and value for the parameter, and then click OK.

Add a command parameter

(6) Click Apply, this command is available from the drop-down menu.

MyEclipse official Chinese online line, welcome to download Communication!

Setting the MAVEN boot configuration in MyEclipse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.