Importing exercises

Now, see how to import the exercises inside Eclipse. Eclipse works with a workspace and working sets. The workspace is a physical directory where we put our projects.

Working sets are logical folders used inside Eclipse as collectors of projects usually organized by argument.

For example, a set of projects that describe a forum can all be put together in a working set and we can call it forum. Another set of projects can be used for an air reservation application, so we can put them in another working set called air-reservation.

The exercises projects, as we mentioned before, are written as a modular tree structure with parents and children. The parent folders are used as collectors of chapters, so they are not important in our system environment. We now create two Eclipse working sets, one for the children (book) and one for the parents (book-parent).

So, when we start Eclipse for the first time, we should set the workspace by choosing the directory we want to use:

Okay, the workspace is ready. Now configure the view with the working sets. Click on the little down arrow near the Project Explorer title and choose Working Sets:


A new window will be opened. In this window, choose the following dialog so we can start to create the working sets:


After that click on the New... button and choose the working set type:


Java is the better type for us. After you have done this, click on the Next > button and create the new book working set:


Repeat the same operations for the second working set: book-parent:

Now select all the created working sets and click on OK to end the configuration of the working sets:

Now we have to import the exercises. Click on File | Import:


We are importing a Maven project so select Maven | Existing Maven Projects:

Click on Next; you should select the root directory for the exercises that you have downloaded. Once you have selected it, you will see a list of all sub- projects. By default the first working set you have created is selected, so choose child projects to add to it and click on Next >:


The same operation must be done with the parent projects. So now select the book-parent working set and click on Next >:

Once done, go to the Select Working Set screen again and click on OK to refresh:

Now we will see a list of working sets:


If we open the working set we can see all ordered parent and child projects:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.36.192