java Maven项目右键没有maven菜单项的解决方案!

修改项目.project文件,确保有maven2Builder和maven2Nature2个标签:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>projectName</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

然后update Dependencies

原文地址:https://www.cnblogs.com/taomylife/p/7687585.html