You should use the new available m2e plugin for Maven integration in Eclipse. With help of that plugin, you should create a new project and move your sources into that project. These are the steps:
- Check if m2e (or the former m2eclipse) are installed in your Eclipse distribution. If not, install it.
- Open the “New Project Wizard”:
File > New > Project... - Open
Mavenand selectMaven Projectand clickNext. - Select
Create a simple project(to skip the archetype selection). - Add the necessary information: Group Id, Artifact Id, Packaging ==
jar, and a Name. - Finish the Wizard.
- Your new Maven project is now generated, and you are able to move your sources and test packages to the relevant location in your workspace.
- After that, you can build your project (inside Eclipse) by selecting your project, then calling from the context menu
Run as > Maven install.