Creating a src/main/java folder structure in Eclipse without Maven

前端 未结 8 1548
醉酒成梦
醉酒成梦 2020-12-12 15:24

How do I create the src/main/java and src/test/java in my default web application project in Eclipse without Maven? My current folder structure is

相关标签:
8条回答
  • 2020-12-12 16:19

    If the package structure is setup as src.main.java.com.inventica, instead of com.inventica, that’s usually because under project properties > Java build path > Source, the source folder is setup as src instead of src/main/java. There’s no easy way to fix this, so remove src as a source folder and click ok.

    Now Eclipse will show a folder hierarchy src/main/java. Browse to the java folder > right-click > build path > use as source folder.

    After this, you may have to fix the Eclipse .project and .classpath files to have it use Maven to manage dependencies, builds etc.

    Typically, you can copy this from a working project since there isn’t anything project specific here assuming you’re structured as a standard Maven project.

    0 讨论(0)
  • 2020-12-12 16:23

    If you don't find the Included Path just add the path it will resolve.

    0 讨论(0)
提交回复
热议问题