imported maven project does not appear as java pro

2019-03-15 00:00发布

I checked out the existing project source code from SVN to a folder in my system. Then I opened eclipse. Import Project-> Existing Maven Project.

It imported without issues. However, Project Explorer shows it as just folders instead of packages. (Like when we create a package and then add classes to it, it shows a different icon for package root). I opened Navigator and Package Explorer as well. But they are showing them as folders as well.

I tried:

mvn eclipse:clean
mvn eclipse:eclipse

on the root of the project. But it did not help.

Can anyone help on this one?

My folder structure:

ecs->
     ecs-ejb->
        src/java/main/com/xxx
        pom.xml
     ecs->ear->
        src/java/main/com/xxx
        pom.xml
     pom.xml

13条回答
劳资没心,怎么记你
2楼-- · 2019-03-15 00:32

I also faced a similar issue. I resolved it by downloading the correct apache maven plugins in the maven repository org / apache/ Maven/ plugins. IN my case, everything was working fine earlier and I had deleted .m2 repository completely. After that I started getting these issues with same iDE and newer IDE versions as well. The pom.xml showed error related to lifecycle mappings. On downloading the correct plugin, the workspace worked fine.

查看更多
登录 后发表回答