For this course, you will be required to use a number of specific software tools. On this page, we provide information on using each, including links to brief tutorials.
We have created the following screencasts to help you get started:
Git is an open source version control system (VCS). Git differs from traditional VCS in that it is fully distributed - each client maintains a full copy of each repository. It also simplifies branching and merging.
We have created a central git server which all students must use. You will receive an email from the course staff with your login information. We have provided a brief tutorial below on using git in Eclipse. You may find it easier to use a command line client, in which case we highly encourage you to learn more about git and do so.
You must maintain your course-code in our provided git repository. Course staff will verify that students are diligently commiting code, and that all students in each team are committing the effort that they describe in their documentation.
|Command-line git gotchas|
These tips may be useful to you if you are using git from the command line, rather than through egit (ie, you are placing the key in the .ssh folder)
Atlassian's Fisheye, Crucible, Confluence, Jira and Clover
We providing every team with access to Atlassian's Fisheye, Crucible, JIRA, and Clover products. These products are serious professional products used by many large companies and are provided generously to us by Atlassian for your use during this class. Fisheye provides a very easy to use web-based interface to view your source and review revisions. Crucible powers code reviews, allowing team members to individually review source code (organized by commit, file, etc). JIRA is a powerful issue-tracking system which integrates with Fisheye and Crucible. Clover is an IDE plugin to measure code coverage.
We will set each team up with Fisheye, Crucible, and JIRA projects. Your git repository will automatically be linked to Fisheye. You will receive a login for all of these sites once teams are formed. For your team project, you must use JIRA for tracking issues and Crucible for performing code reviews. You may use other tools to verify test coverage, but we highly suggest that you use clover. Atlassian provides very thorough documentation for their products on their website, and we will also provide demonstrations in class and in office hours:
Glassfish & Eclipse
If you have no experience with a component model framework and decide to use EJB, we very strongly encourage you to choose Glassfish as an application server and Eclipse as an IDE. Due to the large number of application servers and IDEs, we can only guarantee to be able to support you if you use Glassfish and Eclipse (Sorry, NetBeans and IntelliJ fans are on their own here). We do not suggest using a database server other than Derby or MySQL.
If this is your first time installing Glassfish & Eclipse, you may follow this (brief) install guide:
- Make sure that you have JDK 6 or 7 installed. If not, you should download it from oracle.com. If you are running Mac OS X 10.5 or later, you already have JDK 6.
- Install the Eclipse IDE for Java EE developers
- Install the Glassfish Plugin for Eclipse and start the internal glassfish server## If you get an error that the server requires a JDK but is running in a JRE, double click on the server label (where it says "Internal Glassfish 3.1") and click on the link "Runtime Environment." If there is not a JDK to select there, click "Installed JRE preferences" and add your newly installed (from step 1) JDK. On Windows this would be in C:\Program Files\Java\jdk1.x.x . Then save the changes and start the server by following the instructions on the plugin installation page.
- Install the Atlassian Eclipse Connector (optional, allows you to view and create JIRA issues directly from Eclipse)
- Install Clover for Eclipse (the course staff will email the license to the entire course once the team project begins)
- Install EGit for Eclipse
If you would like to use MySQL, you should now install it.
If you're seeing an error like
Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 18 in method edu.columbia.cs4156.demo.Person._persistence_isAttributeFetched(Ljava/lang/String;)Z at offset 4
Try adding the following line to your persistence.xml:
Configuring Eclipse with Git
While git is built to be used from the command line, there is an excellent integration with Eclipse called EGit, which you should have installed as part of your environment setup above. Please follow these steps to configure EGit with the class repositories:
- Retrieve your private key as emailed to you. The file should be named <your uni>. Save it to your computer.
- Open Eclipse, then the preferences window (Under "Eclipse" on Mac or "Windows" on Windows). Expand the "General" tab, then the "Network Connections" tab
- Select "SSH2" and then click "Add private key." Add your private key that you just downloaded, then click "Apply"
- Navigate down in the preferences list to "Team" and expand it, then expand "Git"
- Click "Configuration" then "New Entry." Title the entry "user.name" and set the value to be your full name.
- Click "New Entry" again, this time set the entry name to "user.email" and the value to your COLUMBIA email, <your-uni>@columbia.edu (this is vital!). The window should now look like this:
- Click "OK"
- Add the "Git Repositories" view by going to "Window", "Show View", "Other", then "Git Repositories"
- In the new view, click "Clone a git repository and add the clone to this view" (looks like this: )
- For the URL, enter ssh://email@example.com/your-uni/hmwk<N>.git (where N is the number of the homework you are starting on). Make sure that "Store in secure store" is not checked, then click Next
- If asked to verify the RSA key fingerprint, click "Yes"
- Make sure that "Master" is checekd as the branch to clone, then click "Next"
- You may change the local destination to be wherever you would like your files saved. Make sure to note where it is.
- Create your projects
- Finally, link the projects back into EGit by right-clicking them, then selecting "Team... Share Project". Select "Git" then select the repository you just created, and "Finish"
Working with EGit
As you develop your project, you'll want to make commits to your repository. To do so, open the "Git Staging" view so that you have both Git Staging and Git Repositories open.
Adding files to Git
Git will ignore files by default, unless you specifically tell it to track them. It is very important that you add every file that you create, or they will not be tracked/commited. To add a file, right click on it in Package Explorer view and select "Team...Add". Note that you can do this on entire folders, recursively adding all children.
To commit changes, right click on your project and select "Team... Commit." Enter a commit message. If you enter a JIRA issue number, JIRA/Fisheye will automatically cross reference your commit to that issue (enter the issue as KEY-NUMBER where KEY is the keyname for your project and NUMBER is the issue number). Then click the commit button.
Pushing Changes to the Server
At this point, you have made a commit, but the only one who knows about it is your machine: you have not actually sent your commit to the server yet. To "push" your commits to the server, right click on your project and select "Team... Push" then "OK"
Pulling Changes from others
To update your repository to have the latest code from your teammates, right click on the project and select "Team... Pull"
More help for EGit
Lars Vogell has created an excellent tutorial for EGit.