Java Engineering converted to MAVEN project

Source: Internet
Author: User

1. Preface

In development often to build a Maven sub-project, for students without templates from the Java project to convert is also a good choice. This article provides an introduction to how to create a MAVEN project from a Java project, and I believe it is helpful to transform a Java project into a MAVEN project.

2. Create a Java project.

Create a Java project as shown in:

3. Convert to Maven project.

Select Convert to Maven project, Configure, right-click this project. The following information about the sky can be seen:


Click Finish and then this project directory will produce a pom.xml file, such as:

4. Configure the parent project of the Pom.xml.

To add the configuration of the parent section in the Pom.xml file, the configuration of this section is as follows:

<parent>

<groupId>com.alu.dashboard.common</groupId>

<artifactId>qosac.dashboard.common</artifactId>

<version>${module_version}</version>

</parent>

5. Transform the project.

Open the catalog for this project and delete all folders and files except SRC and pom.xml:

6. Build the directory.

Create the main and test two directories under SRC, and then create the Java directories under the two directories respectively. Build the resources directory below Src/main.

7. Re-import the modification works.

Re-import the project in Eclipse and import it using Maven-Existing maven module. Once the project has been built, it has become a standard MAVEN project.

8. Summary

The work of the Web project to MAVEN Web module is similar, and if necessary I will describe the process of its transformation in a future article.

Java Engineering converted to MAVEN 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.