[英]Maven does not recognise src/main/java as the source folder for code
I have an issue in that in eclipse the folder "java" in src/main/java is considered as a package. 我有一个问题,就是在Eclipse中,src / main / java中的文件夹“ java”被视为一个包。 The folder structure in which I have the code is "workspace\\map_reduce\\src\\main\\java\\map_reduce". 我具有代码的文件夹结构是“ workspace \\ map_reduce \\ src \\ main \\ java \\ map_reduce”。 When i do "mvn clean install" it works fine, but when i integrate it with eclipse, the folder stricture is "src/main/" and the package is "java.map_reduce". 当我执行“ mvn clean install”时,它可以正常工作,但是当我将其与eclipse集成时,文件夹约束为“ src / main /”,而程序包为“ java.map_reduce”。
I want the folder structure as "src/main/java" and the package as "map_reduce". 我希望文件夹结构为“ src / main / java”,而软件包为“ map_reduce”。
Can anyone tell me how to fix this issue. 谁能告诉我如何解决此问题。
右键单击[Project Explorer]中的项目,从弹出的上下文菜单中选择[Build Path]-> [Configure Build Path ...],切换到[source]选项卡,然后删除“ src / main /”并添加文件夹源为“ src / main / java”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.