2

I downloaded a fresh copy of Eclipse IDE for Java EE Developers (eclipse-jee-luna-SR1a-win32-x86_64.zip).

I created a new Maven project (J2EE 1.4 web application archetype) in a new Workspace. When trying to add a class, for example - RestClient - the Eclipse displays error (RestClient cannot be resolved to a type) and the context menu does not display the option "Search dependency for RestClient", as it appears in various videos such as "Adding Project Dependencies in m2eclipse (https://www.youtube.com/watch?v=H8QdjyCB8Nw)".

Snapshot from video: Eclipse Maven Search Dependency

The same behavior also occurs in fresh copy of JBoss Developer Studio (Version: 8.0.0.GA).

Is there a way to fix that? Thanxs!!!

7
  • Open the progress view when Eclipse starts. Do you see any entry which says "Updating Maven index from Central" or similar? In Preferences -> Maven, is the option "Download repository index on startup" enabled? Commented Jan 19, 2015 at 16:41
  • Yes ... I can see the update status and also the option "Download repository index on startup" is enabled. Commented Jan 19, 2015 at 16:50
  • I've tried to do the following: Open your "Maven Repositories" view. Open Global Repositories and right-click on central. Enable full index and rebuild, ... and the same thing. It seems very strange lack of item in the context menu on a fresy copy. The shortcut CTRL + SHIFT + T also does not result in anything. Commented Jan 19, 2015 at 16:53
  • Ctrl+Shift+T only shows types on the classpath. That will start to work after the dependency has been added and downloaded. Can you browse the content of the repository in the "Maven Repositories" view? Commented Jan 19, 2015 at 16:58
  • Can you check whether "Enable Full Index" is enabled for the repo in the view? Commented Jan 20, 2015 at 8:48

1 Answer 1

1

The feature has been removed in 2011: https://dev.eclipse.org/mhonarc/lists/m2e-users/msg01130.html

Go to http://search.maven.org and use fc:"name-of-class" i.e. fc:"RestClient"

Note: The search is quite slow; use Google instead :-)

Sign up to request clarification or add additional context in comments.

2 Comments

Although slightly change the original subject, as it was removed this feature, which is the most efficient way to manage dependencies in Eclipe Luna? Editing directly in the POM?
If you know the name of the dependency, you can select "Add Dependency" in the Maven menu of the project or you get this menu item when you use the context menu in an open POM editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.