Adding a project to Subversion

Apache Subversion is a free, cross-platform version control system developed by the Apache Foundation, intended as successor to CVS (which is still available in NetBeans).

If you wish to know more about Subversion please visit:

http://subversion.apache.org/

Here we will see how to add a connection to a Subversion server.

Getting ready

In this recipe we will assume that no Subversion server is available on the local machine.

So for this recipe to work we will need to visit and create an account at http://sourceforge.net.

Sourceforge offers free SVN repositories; it has limited capabilities but will be perfect for our needs.

To create a project, follow the steps below:

  1. Create a New Project, this can be achieved by either clicking File and then New Project or by pressing Ctrl+Shift+N.
  2. On New Project window on categories side choose Java and on Projects side select Java Application and click Next >.
  3. Under Name and Location: Under Project Name enter NBCookbookSVN and click Finish.

Once the account and a new project have been created in Sourceforge we need to configure NetBeans to use Subversion. To do this, follow the steps below.

Note that the steps below might not be necessary if SVN is already installed in the system path:

  1. On the toolbar click on Tools then Options.
  2. In the Options dialog click on the Miscellaneous button.
  3. Then click on the Versioning tab.
  4. Under Versioning Systems click on Subversion.
  5. Navigate to Subversion's installation folder by clicking Browse... and select it.
  6. Back on the Options dialog click OK.
Getting ready

All the steps provided in this recipe can also be performed with your own Subversion server of choice such as (open-source) Google Code or e.g. your company's internal SVN server, for example.

How to do it...

To start we will need to add the project to Subversion. Here are the steps to do it:

  1. Right-click NBCookbookSVN node, select Versioning and Import into Subversion Repository....
  2. Under Subversion Repository: Enter the repository URL (the one provided by Sourceforge when account was created), user and Password.
  3. Click Next.
  4. Under Repository Folder: Leave the Repository Folder with its default value and under Specify the Message field enter Project Creation and click Next.
  5. And finally on Files to import leave all the files selected and click on Finish.
How to do it...

How it works...

NetBeans acts as a mediator between Subversion and the user, abstracting all of the manual commands in favor of a simplified UI.

So when NetBeans needs to send all of the locally-created code to Sourceforge's server, all the work is hidden from the user, although on the status bar it is possible to see a progress bar indicating that the IDE is sending the code.

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

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