Currently I have perforce that I am importing my project into eclipse from. After I import my project into eclipse I right click on the project go to configure and convert to maven project. After doing all of this I do NOT have autocomplete for the code working and I do NOT have ctrl+click working.
System Specs:
- OS: Windows 7 x64
- RAM: 8gb
- CPU: Intel core i5
- HDD: 128gb SDD
- Eclipse Version: Juno 4.2 JavaEE
- Maven m2e Version: 1.1.0
- Perforce Version: 2012.2.486944
Attempts at a Fix
- I have noticed that when I right click on my project and look to go to Java Build Path it does not exist.
- Under my right click menu properties and under builders I only have "Maven Project Builder"
- I have tried to add the proper
<buildCommand>for the java builder and the proper<natures>in the.projectfile. This does NOT fix my issue but does add the Java Build Path I couldn’t see in 1. (below is my unaltered .project file) - I have navigated to the
.metadata>.pluginsand deleted theorg.eclipse.jdt.coreto eclipse rebuild its indices.
Error Received when trying ctrl+click autocomplete or a right click>References>Workspace
The resource is not on the build path of a Java project
.project file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>project</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Is there something simple that I have overlooked, or a step that I forgot to do? Any help regarding this issue would be great.
(*I have searched though issues relating to the ctrl+click and the autocomplete but none of the solutions that I have found have helped and none seem to match the eclipse+perforce+maven issue, but sorry in advance if this topic was covered in a different post)
Alright here is what I did and found out.
I started over with a new copy of eclipse 4.2 EE and redownloaded all of the plugins that I needed: m2e and perforce
If you have a flat Maven Project
If you have a multi module Maven Project
My oversight was that the project I was having issues with I did not realize was a multi module maven project and importing it from perforce and trying to convert the parent folder to a maven project did not cause maven to look at all of the poms in the parent’s sub-directories. Hope this helps anyone else having this issue.