Maven "Generating project in Batch mode" problem resolution

Source: Internet
Author: User

In Maven's five-minute primer, there is a command:

archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

The command of this sentence is to create a default project, but when I execute this command, the command line stops at

in Batch mode

This sentence will stop for a long time. "Of course, there are people in the past." 】

Add an-x parameter to see more information

archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -X

As you can see, the program stops at the following line.

for remote catalog: http://repo1.maven.org/maven2/archetype-catalog.xml

To query this file when the network is poor or other reasons, resulting in hanging there.

The workaround is simple.

1. 把上述地址复制到浏览器中,下载这个文件到本地。2. 把文件archetype-catalog.xml复制到目录.m2\repository\org\apache\maven\archetype\archetype-catalog\2.2下面。3. 在上述命令后增加参数-DarchetypeCatalog=local,变成读取本地文件即可。
4. With the company VPN, you can quickly download to the required dependent files.

Maven "Generating project in Batch mode" problem Resolution (GO)

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.