-
Notifications
You must be signed in to change notification settings - Fork 8
Eclipse Workspace Setup
Voyant Tools edited this page Mar 24, 2021
·
1 revision
The instructions below pertain to setting up a workspace in Eclipse Kepler on Mac for working with the Voyant Notebooks codebase.
Working with Github
- The Voyant Notebooks code consists of the 'trombone' and 'Voyant' projects under github user @sgsinclair. In order to work with them, sign up for an account on github.com, and download the Github desktop client from mac.github.com.
- Create a 'git' folder in your the root folder of the user your are currently logged in as. The easiest way to navigate to this root folder is to open up the Terminal app. The initial directory when Terminal opens should be this directory. Simply type 'mkdir git'.
Eclipse Downloads
- Download Eclipse IDE for Java EE Developers, unzip the download and add the resultant 'eclipse' folder to your Applications directory.
- Download Apache Tomcat 7, listed under the heading 'Core'. Unzip the download and copy the resultant directory 'apache-tomcat-7.0.47' into your '/usr/local' directory. (Note: The 'usr' directory is hidden. You can navigate to it via the Terminal App.)
- Download the Sysdeo Eclipse Tomcat Launcher plugin, version 3.3. Unzip the download and place the 'com.sysdeo.eclipse.tomcat_3.3.0' folder under 'plugins' in the 'eclipse' folder you just placed in Applications.
- Open the 'com.sysdeo.eclipse.tomcat_3.3.0' folder and copy the 'DevLoaderTomcat7.jar' to the '/usr/local/apache-tomcat-7.0.47/lib' folder
Eclipse Workspace Setup
- Open Eclipse, and select either the default or your preferred workspace folder. Go to 'Eclipse->Preferences'.
- Select 'Tomcat' in the Preferences window, select 'Tomcat version 7.x', and set 'Tomcat home' to '/usr/local/apache-tomcat-7.0.47'. ('Configuration file' and 'Contexts directory' will be automatically filled in.) Click OK.
- Go to 'File->Import'. In the Import window select 'Git->Projects from Git' and Click Next.
- Select 'Clone URI', and then click Next again.
- In the Location box, for 'URI' type 'https://github.com/sgsinclair/trombone.git', ('Host' and 'Repository Path' will be automatically filled in) and click Next.
- Select the 'master' branch, click Next.
- In the 'Local Destination' window, 'Directory' should be set to '/Users/[your mac login username]/git/trombone'. Click Next.
- The 'trombone' project will be imported from github. Select 'Import as general project', click Next, and click Finish on the next 'Import Projects' window.
- If not already so, open the Eclipse Project Explorer by going to 'Window->Show View->Project Explorer' ('Package Explorer' works too). Context click (a.k.a. 'right-click') the 'trombone' project, select 'Configure' and 'Convert to Maven Project'.
- Repeat the project import process above for 'Voyant', substituting 'Voyant.git' for 'trombone.git' in step 6, keeping in mind the capital 'V' in the project name.
- Convert the 'Voyant' project to a Maven project as you did in step 9 for 'trombone'.
- Context click on the 'Voyant' project and click on 'Properties'. Click on 'Java Build Path' on the left and then click on the 'Projects' tab.
- Click 'Add' and select the trombone project, and click OK.
- Click on 'Tomcat' on the left and check 'Is a Tomcat Project' in the 'General' tab. Set 'Context name' to '/voyant', and set 'Subdirectory to set as web application root' to '/src/main/webapp'.
- Then click on the 'DevLoader Classpath' tab, check 'Activate DevLoader', and click 'Check All'.
- Uncheck the following items in the DevLoader list and click OK:
- .m2/repository/javax/servlet/servlet-api/3.0-alpha-1/servlet-api-3.0-alpha-1.jar
- Everything under .m2/repository/org/eclipse/jetty/
- /trombone/target/test-classes
- org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER
Starting up Voyant Notebooks
- To start Voyant Notebooks, click on the Apache Tomcat button in the Eclipse toolbar, which will start up the server for the webapp. (The button looks like a cat - the one without the X or curved arrow.)
- Once you see the message, 'INFO: Server startup in X ms', you can go to your browser and find Voyant Notebooks running at 'localhost:8080/voyant/notebook/'.