1 Importing a Git project
To import a Git project into an eclipse project, open the command line terminal and move to eclipse workspace:
user@host:~$ cd eclipse-workspace/
clone the Git project into a newly created project folder:
user@host:~/eclipse-workspace$ git clone https://github.com/davidflanagan/jstdg7 Flanagan-JavaScript-Book-7Ed
The Flanagan-JavaScript-Book-7Ed folder is going to be the base folder of the eclipse project.
Run eclipse IDE and open the "eclipse-worskspace" folder.
To import the project, select the option File -> Import -> General -> Project from Folder or Archive and click on Next button.
This opens a the "Import Projects from File System or Archive" window, click on "Directory" button. This opens a file chooser, navigate to the newly created folder and click on Open to import the project into eclipse IDE.
2 Importing a Maven project
Download a maven project, for example by cloning a git repo or by using the maven archetype plugin
In my case I am going to clone the maven project from git
Open the command line terminal and move to eclipse workspace:
user@host:~$ cd eclipse-workspace/
clone the Maven project into a newly created project folder:
git clone https://github.com/heroku/java-getting-started heroku-getting-started
You have cloned the Git project into the heroku-getting-started folder. That folder is going
to be the base folder of the eclipse project.
Run eclipse IDE and open the "eclipse-worskspace" folder.
To import the project, select the option File -> Import -> Maven -> Existing Maven Projects and click on Next button.
This opens a window that allows you to chose the project root directory, click on the Browse button.
This open a file selector, select the folder of the Maven project to be imported. This is what you get:
Select the pom of the project you want to import and click finish. In case you are importing a multi module maven project select the parent pom and all the poms of subproject you want to import.
3 Make eclipse IDE build faster
3.1 Turn Off Validations
As soon as you open a project, eclipse starts to build the project. Validation is part of projects building. If your workspace has many projects open, validation may take too long, threfore you may want to turn off validation to make building faster.
You can disable validators either for your project or for your workspace. To disable validators for your workspace, select Window -> Preferences -> Validation. This opens the Validation window. You can tick the second check box in the upper list "Suspend all Validators" or you can choose to disable individual validator by clearing the box next each validator.
3.2 Uncheck Auto Build
The menu item Project -> Build Automatically is checked by default. That means eclipse build all projects (both closed and opened projects) in your workspace whenever you open the workspace or run a clean command. So, if you your workspace holds many projects, it is convenient to uncheck the Build Automatically item.
Doing so, it will disable automatic building for the projects. To build the project you are currently working on, select the Project -> Clean item, uncheck Clean all projects and select Build only the selected project.
No comments:
Post a Comment