Download and install GIT for Windows (http://git-scm.com/downloads)
Set up system environment variables GIT_SSH pointing to ssh binaries (usually C:\Program Files\Git\bin\ssh.exe) and user account environment variables HOME = %USERPROFILE%
In Eclipse, install EGit and GitHub Mylyn Connector.
In Eclipse, create new ssh key (Windows->Preferences->SSH2) and upload public key (*.pub) to Github. Make sure the Eclipse variable ssh2 home is set to where you save the created key. Usually found in Windows->Preferences->SSH2.
In Eclipse, create new project. Right click project and choose Team->Share->Git. Then Team->Add index. Then Team->Commit. This will save it in your local git repository.
In Github create repository and note its HTTP and/or SSH URL. Usually its https://github.com/[username]/[reponame].git or ssh://git@github.com:[username]/[reponame].git
In Eclipse, right click project and select Team->Remote->Push. When SSH is use, username=git password is emtpy. When HTTPS is use, enter your Githug username and password and select "Store in Secure Store"
Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts
27 October 2012
10 April 2012
Eclipse SVN Setup
Requirements
- Eclipse IDE for Java EE developers
- with Subversive plugin
- Tomcat 6 binary distribution (or what's on production)
- Java 1.6 (or what's on production)
Environment Setup
- Setup eclipse
- Setup the Installed JREs
- Window > Preferences > Java > Installed JREs. Select Add if a JRE is not yet configured.
- Select Standard VM in the JRE Type window and click Next.
- Populate the JRE Home field with the location of your Java installation.
- Setup Server Runtime Environment.
- Window > Preferences > Server > Runtime Environments. Select Add if a Tomcat Server is not yet configured.
- Select Apache > Apache Tomcat v.6.0 in New Service Runtime Environment. Click Next.
- Set the Tomcat installation directory to the location of the Tomcat binary distribution folder.
- Select the right JRE.
- Setup the Installed JREs
- Check out the customer project
- Open the SVN Repository Exploring Perspective (Window > Open Perspective > SVN Repository Exploring)
- Right click on the SVN Repositories view > New > Repository Location...
- Enter https://svn.... in the URL field and enter in Authentication info.
- A new repository location should appear in the SVN Repositories view. Right click the repository and select Check Out.
- This action will checkout the project into your workspace.
- Once done, return to the Java EE perspective and ensure a new project named "customer-portal" is in your Package Explorer (or Project Explorer) view.
- Exclude Eclipse resource files (.settings
folder, .project file, .classpath file) and /build folders from SVN to
prevent from being checked in (especially the /build folder).
- First, determine if you can see the resource files by expanding the customer-portal project. If you can see them, skip the next step.
- If
you cannot see the resource files, in the Package Explorer view, click
on the View Menu button (it's a white arrow pointing down, next to the
package explorer's Collapse All, Link with Editor, Minimize, Maximize
controls), and select Resources...
- Deselect .*resources from the Select the elements to exclude from the view box.
- Click OK. The resources files should now appear in the package explorer view
- Select the three resource files (.settings folder, .project file, .classpath file) and right click > Team > Add to svn:ignore...
- Select OK.
- Do
the same for the /build folder (if it does not exist yet, create the
folder "build" in the root of the customer-portal project).
- A question mark should appear in the folder indicating that it's not version controlled.
- Right click the folder > Team > Add to svn:ignore. Click OK.
- Load the project's build file
- Open the Ant view by selecting Window > Show View > Ant
- Expand the customer-portal project and locate build.xml file
- Drag and drop the build file onto the Ant view.
- The build file should now appear in the view, which once expanded shows a list of all tasks in the build file.
- Confirm the environment is setup correctly by running sandbox-war or production-war, and that the war files appear under /build (a refresh F5 might be needed to show the folders).
27 April 2009
Using Eclipse with Subversion
I finally decided to set-up my previously-configured-solely-for-thesis laptop to include any software application projects that I may undertake. The first thing I did was to configure my favorite Java IDE, Eclipse, to work with a familiar version control system, Subversion. These are the steps I took.
1. Download Eclipse IDE: www.eclipse.org/downloads. In my case, I downloaded Eclipse Ganymede. The downloaded application is in zip file. All I did was to extract the contents on my desired location.
2. I also decided to set-up a local repository for my future projects. I chose Subversion (for more info, visit www.subversion.tigris.org). I downloaded and installed Subversion 1.4.5 into my laptop.
3. Once Subversion was installed, I created a new repository location.

4. I made sure that I have Subclipse plug-in. This is a plug-in for Eclipse that will enable it to use Subversion. It can be installed in two ways, first is by automatically downloading the plug-in using Eclipse’s Software Update (Help->Software Update) and searching through the database. Another method is to manually download the necessary Executable Jar Files and putting it on the plugins folder under eclipse. Luckily, after searching through my old files, I was able to retrieve the .jar files I needed. After doing any of the two methods, Eclipse needs to be restarted.
4b. For SpringSource Tool Suit (STS), Open STS Dashboard > Go to Extensions > Look for Subeclipse, check the checkbox and click install (If you don't see it, it implies it is already installed)

5. On Eclipse, I opened the SVN Repository Exploring Perspective(Window->Open Perspective->Other)

6. Two tabbed windows appeared(SVN Repository and SVN Annotate). On SVN Repository, right click->New->Repository Location-> typed file:///e:/svn/eclipse_backup on the text box->click Finish.

7. If done correctly, the SVN Repository will have a new entry as seen below.

9. Right click on the new repo location and select "Checkout". This will give you a local copy that you can then commit to the repo.
1. Download Eclipse IDE: www.eclipse.org/downloads. In my case, I downloaded Eclipse Ganymede. The downloaded application is in zip file. All I did was to extract the contents on my desired location.
2. I also decided to set-up a local repository for my future projects. I chose Subversion (for more info, visit www.subversion.tigris.org). I downloaded and installed Subversion 1.4.5 into my laptop.
3. Once Subversion was installed, I created a new repository location.
4. I made sure that I have Subclipse plug-in. This is a plug-in for Eclipse that will enable it to use Subversion. It can be installed in two ways, first is by automatically downloading the plug-in using Eclipse’s Software Update (Help->Software Update) and searching through the database. Another method is to manually download the necessary Executable Jar Files and putting it on the plugins folder under eclipse. Luckily, after searching through my old files, I was able to retrieve the .jar files I needed. After doing any of the two methods, Eclipse needs to be restarted.
4b. For SpringSource Tool Suit (STS), Open STS Dashboard > Go to Extensions > Look for Subeclipse, check the checkbox and click install (If you don't see it, it implies it is already installed)
5. On Eclipse, I opened the SVN Repository Exploring Perspective(Window->Open Perspective->Other)
6. Two tabbed windows appeared(SVN Repository and SVN Annotate). On SVN Repository, right click->New->Repository Location-> typed file:///e:/svn/eclipse_backup on the text box->click Finish.
7. If done correctly, the SVN Repository will have a new entry as seen below.
9. Right click on the new repo location and select "Checkout". This will give you a local copy that you can then commit to the repo.
Subscribe to:
Posts (Atom)