Importing an entire project into Maven (Eclipse Juno)

I have a folder containing some Java code written specifically for Linux.

There is a pom.xml file and two folders: src and build

I installed Eclipse Juno on my Mac (10.7.5) and I understand that it has already enabled Maven. On a Linux machine, the code is executed by entering mvn package at the command line.

But after this stage, while the build artifact is running, it does not start on my Mac, because some of the commands are specific to Linux (I said).

How to import an entire project into Maven on my Mac? I mean, where to copy folders and pom file?

Thanks, N

+4
source share
2 answers

In addition to Evgeny Dorofeev, the answer is:

If your project is in the GIT repository and you are using eGit, you can import it as follows:

 File->Import->Git->Projects from Git 

After importing, you can convert your project into a Maven project and update the project settings.

+1
source

You can leave the maven project where it is. Go to

 File->import->Maven->Existing Maven Projects->Root directory 

and select the maven project directory.

If you do not see Maven in the Import menu, this means that you need to add the maven (m2e) plugin to your Juno. The fact that mvn works from the command line means that maven is installed on your PC.

+6
source

All Articles