Setting up eclipse, subclipse and Visual SVN Server
If you are tired of the usual copy all, zip backup your application files then I suggest you try using SVN. But let me clarrify, SVN is
not a backup management tool. Instead it's a way of properly tagging each file, fix/update wherein you can put comment in each change.
This will help us track our changes and reverse to a stable code when our code failed. (There are many articles about SVN just try googling it).
This tutorial assumes that an eclipse IDE (regardless which: java, php, etc) is already installed in your computer (windows OS).
In case not you can try downloading eclipse-java here: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-java-galileo-SR1-win32.zip. It's a zip file and can be extracted in your root drive like c:.
After download update your eclipse installation by clickng Help->Install New Software->Add and in Location type: http://subclipse.tigris.org/update_1.6.x. Restart your eclipse.
You may ask why use svn when eclipse already have a built in cvs, well personally I find svn more user friendly.
Now that our client is setup we need an SVN Server that can be deployed on a windows environment. I found Visual SVN which you can download here: http://www.visualsvn.com/files/VisualSVN-Server-2.0.7.msi. Install and add user.
How to add user to Visual SVN:
1.) Run Visual SVN
2.) Right click users->Create user
3.) Enter a name and password and click ok
How to create a repository
1.) Run Visual SVN
2.) Right click Repositories->Create repository
3.) For this tutorial enter "test" in the Repository Name
4.) Check "Create default structure...". This will initialize to have branches, trunk and tags in the root directory.
Now that we have a test repository, let's try creating a project using eclipse:
1.) Open up the eclipse IDE
2.) Select File->New->Other, then select SVN->Checkout Projects from SVN
3.) In the "Checkout from SVN" window select "Create a new repository location" click next
4.) In the Url field enter the location of our newly created "test" repository,
in case you forgot - in the Visual SVN window under Repositories, right click "test" and select "Copy URL to Clipboard"
5.) Then in the select folder, usually we are developing in the trunk folder so select it
6.) In the "Checkout from SVN", select "Check out as project configured using the New Project Wizard"
7.) Select "Java Project" and enter a name
8.) The SVN based project created should now appear in the eclipse ide
Now our SVN client and server are setup.
How to add a file and commit:
1.) Under src directory create a new class, named Test.java
2.) Right click Test.java, then select Team->Add to Version Control
3.) Finally to commit select the file or you can select the whole project->Team->Commit
Fonte: http://czetsuya-tech.blogspot.com/2009/10/setting-up-eclipse-subclipse-and-visual.html
terça-feira, agosto 30, 2011
Assinar:
Postagens (Atom)