Build MAVEN projects with batch commands under Windows (Java, javaweb)

Source: Internet
Author: User

Think that using the IDE to generate MAVEN projects will get stuck, very slowly. A cmd Batch command was written with CMD to generate the MAVEN project. The effect is as follows

Build Project import idea after the structure is as follows

The batch command code is as follows

@echo Off::echo Please select the project type: Echo 1.maven-archetype-quickstartecho 2.maven-archetype-webappset/p webtype= Please select project type::: Echo %webtype%set/p dgroupid= dgroupid=set/p dartifactid= dartifactid=::echo%webtype%%dgroupid%%dartifactid%if selected webtype% equ 1 (call mvn archetype:generate-darchetypecatalog=internal-dgroupid=%dgroupid%-dartifactid=%dartifactid %-darchetypeartifactid=maven-archetype-quickstart-dinteractivemode=false) Else (call MVN archetype:generate- darchetypecatalog=internal-dgroupid=%dgroupid%-dartifactid=%dartifactid%-darchetypeartifactid= Maven-archetype-webapp-dinteractivemode=false) If%webtype% equ 2 (MD%~dp0\%dartifactid%\src\main\javamd%~dp0\%D ARTIFACTID%\SRC\TEST\JAVAMD%~dp0\%dartifactid%\src\test\resources) Pause

  

Copy the code, create a new Notepad file, paste the code in, and save the file as a. bat suffix, such as

Click to run, follow the prompts to fill in. Thank you

Using batch commands to generate MAVEN projects (Java, javaweb) under Windows

Related Article

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.