CVS Access
CVS is the tool you use to access the NetBeans sources here on netbeans, either from
the command line, or even using the CVS support built into the IDE itself!
Before you start you should know how the sources are organized, both in terms
of directory structure,
and also branches (most important for login access).
You can
browse the CVS archives online
to get an overview of modules and projects.
Read the Cederqvist manual
included with most CVS clients for more general information.
Legal Notice
By downloading builds, source code, or accessing the CVS repository, you
acknowledge that you have read, understood, and agree to be bound by the
terms and conditions of the applicable licenses:
All the souce code made available on netbeans is provided to you
under the terms and conditions of Common Development and Distribution License
version 1.0 ("CDDL"). The text of the CDDL is available.
The software developed at netbeans may make use of third-party
software components which are distributed under different licenses than
the CDDL. Examples of such components may include Apache Ant,
Apache Tomcat, JUnit, JavaHelp runtime, Java Compiler - a wrapper around the JDK java compiler.
All those components are either open source software or redistributable
binary libraries. They are included in the builds, source code
downloads and the CVS repository. Their licenses can be found in the
- For the IDE installation the license is in the top-level directory
- For the feature pack the license is in the top-level directory of
the feature pack
- For a module source directory the license texts are in a
subdirectory named "external"
It is your obligation to read and accept all such terms and conditions
prior to the use of the builds and source code made available on the
netbeans website or in the netbeans CVS repository.
Getting the Sources
These guides show you how to get anonymous CVS access
to the NetBeans repository for different operating systems.
If you cannot connect due to a firewall, please read
how to use cvs from behind a firewall below.
- Using NetBeans (Recommended) — You can use the NetBeans IDE
itself to get the sources. This method is the same for every operating system.
|
NetBeans 5.0 CVS
Support
A step-by-step guide to getting the sources from cvs.netbeans,
using the CVS support in the NetBeans IDE 5.0.
NetBeans 4.1 CVS
Support
A step-by-step guide to getting the sources from cvs.netbeans,
using the CVS support in the NetBeans IDE 4.1.
|
- From the command line — Most Linux machines
have the command-line cvs client installed by default.
- If you should not have a CVS client, first
download
and install one of the available clients.
- Use the CVSROOT
:pserver:/cvs
for
anonymous access with a blank password. If you have a named account, use
your username in place of anoncvs
; CVS will prompt you for your password.
- This is how to check-out NetBeans sources from the command line using the Bourne shell (instructions valid as of NetBeans 6.0 only):
$ CVSROOT=:pserver:/cvs
$ export CVSROOT
$ cvs login
Enter password: For anonymous access, just hit Enter
$ mkdir netbeans
$ cd netbeans
$ cvs -z6 co -P nbbuild
Some output...
$ ant -f nbbuild/build.xml checkout
Lots of output...
For pre-6.0 releases, check out the alias stable
and do not run the Ant command.
- Using CVS on Windows — If you use Windows
and you don't have a CVS client yet, we recommend you
download and install this cvs client.
Choose cvs-1-11-17.zip or better.
This is how to configure CVS for checking out NetBeans sources:
Recommendation: The list of temporarily non-recommended Windows cvs clients
contains (but is not limited to): CVSNT, WinCVS, TortoiseCVS.
Note you may be prompted to accept license terms for any included third-party
binaries when you build from sources. See the description of third-party
extras on the source page for more info.
Non-anonymous Check-in Access
Using the anonymous login, you can check-out,
edit and use the sources on your computer.
To contribute your changes to the NetBeans repository,
you'll need a free named account with check-in (write) privileges.
The only difference from the anonymous access is
that you enter your username and a non-blank password.
If you think you should have a checkin account,
please see Getting CVS Checkin Access.
Further Settings
If you are behind a firewall which blocks port 2401, you will need to take
some extra steps to get to CVS working.
If you are behind a SOCKS5 firewall, the easiest option is to use a SOCKS proxy,
and runsocks. Please ask your system administrator for details.
This is an example how to use a SOCKS proxy in Linux.
- First, configure your SOCKS5 proxy. For example on Linux RedHat
6.2, edit the file /etc/libsocks5.conf
to include a line like
socks5 - - - - your-socks-proxy.somewhere.com
The location of this file may vary between Linux distributions and versions.
- Then launch NetBeans using the command
runsocks netbeans
and follow through the procedures described as normal.
If you do not have a SOCKS proxy, you'll need to talk
to your network administrators about what
options you have for getting through your firewall.
CVS Flags
Flags are optional codes added to the cvs command to switch settings.
For example, you need to use the -P
option to prune empty directories
when checking out or updating sources,
and also the -d
option when updating them
to make sure that any new directories are checked out.
You can create a CVS preferences file to make setting the necessary flags easier:
Store your settings in a file named .cvsrc
in your home directory on Unix;
Windows users, consult the
Cederqvist manual
for details.
This is an example of recommended default settings.
Copy and paste the following lines in your .cvsrc
file:
cvs -z3
update -d -P
checkout -P
diff -u
rdiff -u
tag -c
SSH tunnels
If you would like a secure connection to the CVS repository
using an SSH tunnel.
Advanced
Maintaining Multiple Checkouts
If you use CVS on netbeans heavily, you probably have many or
most modules checked out; you may have multiple branches checked out in different
places; and so on. In fact you may have sources from other CVS repositories checked
out too. Since the daily bread of sharing a repository with many other people
is cvs update
(or cvs update -d
), you
would quickly go crazy changing directory into each module in turn and updating
in it alone.
So it is better to have all of your different checkouts in one big "active
sources" tree, and update from the top of it every morning or whenever you like.
Sometimes it is a good idea to check in changes to multiple modules simultaneously,
too, especially if you are making interdependent changes (i.e. checking in half
of them would break things).
There is a way to set up such a checkout tree with CVS. First, decide on some
tree structure and check out whatever you like. For example, it could look like
this:
src/ all active sources
nb_all/ everything on the netbeans trunk
openide/ trunk of openide pseudomodule
core/ etc.
html/
...
sandwich/ sandwich experimental branch
openide/ sandwich branch of openide
core/ sandwich branch of core
html/ trunk of html
... trunks of selected other modules...
ant/ Jakarta Ant project
... other repositories and branches...
Now find all of the "dummy" directories that do not correspond to an actual directory
in any CVS repository, and specifically were not created by any CVS checkout command.
In this example, there are src
, nb_all
, and sandwich
.
You should create the CVS metainformation directories for these manually. The
repository path CVSROOT/Emptydir
is magic and tells CVS you are making
a dummy directory. So for example:
src/
CVS/
Root one line: :pserver:/cvs
Repository one line: CVSROOT/Emptydir
Entries lines: D/nb_all//// and D/sandwich//// and D/ant//// etc.
nb_all/
CVS/
Root one line: :pserver:/cvs
Repository one line: CVSROOT/Emptydir
Entries lines: D/xxx//// for each subdirectory xxx
sandwich/
CVS/
Root one line: :pserver:/cvs
Repository one line: CVSROOT/Emptydir
Entries lines: D/xxx//// for each subdirectory xxx
Tag one line: Tsandwich
...
Now all CVS operations should work naturally within your master src
directory.