Use Maven to customize a prototype project

Source: Internet
Author: User

A prototype project was customized using Maven six months ago. The steps are not complex and practical. Today, I suddenly remembered that I wanted to create a new one. Later I found that I had forgotten a lot and I had to work on it for more than half an hour. Now I will introduce this step to you and hope it will be useful to you. The tool I used here is myeclipse2014, which is not as mentioned by others and is operated through the command line.

Step 1: we want to create a prototype project because we want to save some time in future development and use the encapsulated items in future projects, therefore, we must first build a Maven project and then encapsulate it as needed. For example:


Step 2: after the project is created, run the following command: archetype: Create-from-project ,:



After executing this step, we will find that there will be an extra directory under the target directory of our project,



Demo_archetype is the prototype project generated by you. The default name is archetype. The folder name can be customized, and the name will be the name of your prototype project.

Step 3: after the project prototype is obtained, install the prototype (or skip this step). Next, release the project and run the Command deploy. Note that, instead of executing the deploy command in the original project, you need to execute the deploy command on the prototype project you generated, because you want to publish the generated demo_archetype Project (copy demo_archetype, and then import it separately as an import Project). Of course, you can modify it before publishing.



Step 4: After the release, you will be able to see the prototype you have released. I have published it to nexus here.


You can use it to create a project.



These are the steps .... I want to learn it once.


Use Maven to customize a prototype project

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.