Quickly create MAVEN projects: Simple Java Engineering, WebApp

Source: Internet
Author: User

Http://www.cnblogs.com/buhaiqing/archive/2012/11/04/2754187.html

Will find all supported Arche types from MAVEN's repository, probably 500~600. Because it is too much, it is inconvenient to find it.

In fact, usually commonly used Arche type is also so few. Like I would use:

1.simple start

2. Web App

3. Groovy Basic

It is natural to consider whether there is a simple way to choose from the 3 list. The answer is of course: Yes

The implementation steps are as follows: (Native Maven repository directory in C:\Users\buha\.m2)

1. Using the MVN archetype:crawl command, it generates a Archetype-catalog.xml file in the C:\Users\buha\.m2\repository directory

2. Move the archetype-catalog.xml to the previous level directory, which is C:\Users\buha\.m2

3. Then run MVN archetype:generate-darchetypecatalog=local to achieve your desired goal.

Attach xml:

<?xml version= "1.0" encoding= "UTF-8"?>
<archetype-catalog xsi:schemalocation= "http://maven.apache.org/plugins/maven-archetype-plugin/ archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd "
Xmlns= "http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0"
xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" >
<archetypes>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-quickstart</artifactId>
<version>1.0</version>
</archetype>
<archetype>
<groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetype-webapp</artifactId>
<version>1.0</version>
</archetype>
</archetypes>
</archetype-catalog>

Quickly create MAVEN projects: Simple Java Engineering, WebApp

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.