Create Maven project in Eclipse, cannot add source folder such as Src/main/java

Source: Internet
Author: User
Tags java web

Create a Java Web project from eclipse with the following directory structure:

The default is only src/main/resources this source folder

According to the MAVEN directory structure, Src/main/java is also required; Src/test/java; Src/test/resources, etc.

When you create these source folder in Eclipse, the following conditions occur:

Resolved as follows:

One. Open the Navigator directory for Eclipse, and then create the missing source folder in turn.

I don't know how to open it, but I can see it.

Two. Do the following:

1. Open the project's build path, we see the following information, in fact, those source folder is present, just show missing

2. Select the source folder for the two missing, then click Remove on the right

3. Then add the source folder in turn to

4. But then we go back to build path and see the following: the new source folder does not have the output folder set

So, let's make the following settings:

A. Select the source folder, click Edit on the right, and then the second item, select the specific folder

B. Set

The results are as follows:

Create Maven project in Eclipse, cannot add source folder such as Src/main/java

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.