Creating Maven projects in eclipse cannot add source folders such as Src / main / Java

Original link: https://www.cnblogs.com/FocusIN/p/6629244.html

Yesterday, after cloning code on GIT and generating maven, it was found that there was no Src / main / Java resource package, and the new prompt said it existed.

After reading this article, I successfully solved my problem.

Create a Java Web project through eclipse. The directory structure is as follows:

By default, only Src / main / resources is the source folder

According to Maven directory structure, Src / main / Java is also required; src/test/java; Src / test / resources, etc

When you create these source folders in eclipse, the following occurs:

The solution is as follows: two methods

I Open the navigator directory of eclipse, create missing source folder in turn, and then set output folder and other information like method 2.

  Windows -> Show View -> Navigator

From this directory, you can see the directory structure of the project on the hard disk.

For more information on eclipse settings, please refer to another blog: http://www.cnblogs.com/FocusIN/p/6403489.html

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>