You need the following to be installed on your machine
The whole source tree has NetBeans project metadata so you can just use NetBeans to develop NetBeans.
hg clone http://hg.netbeans.org/main
Use this CVSROOT (e.g. for -d option): :pserver:<username>@cvs.netbeans.org:/cvs (Replace <username> with your netbeans.org account name.)
export CVSROOT=:pserver:<username>@cvs.netbeans.org:/cvs
Anonymous access is possible with username anoncvs and an empty password.
export CVSROOT=:pserver:anoncvs@cvs.netbeans.org:/cvs
It is also important to always run cvs checkout with -P and cvs update with -Pd flags. If you don't do this your build will fail. Check your CVS documentation for the meanings of those flags. You may wish to create a .cvsrc file so you do not have to remember these flags for every command. For example:
cvs -z3 -q update -d -P checkout -P diff -u rdiff -u tag -c
There are a few web tools available
If you push changes back to the Mercurial server you have to be subscribed to broken_builds@netbeans.org (send an empty message to broken_builds-subscribe@netbeans.org). Any build breakage must be dealt with immediately to avoid blocking others' work. (Reply to the alias as soon as you see that you are at fault to let others know you are working on the problem.)
You'd be fine with any decent PC or laptop. As usual more RAM, faster CPU are better than less RAM, slower CPU. The source tree in CVS is big. Don't try to check out or update sources via dial-up connection. It'd require a lot of patience and time, both are precious these days.
You should increase the heap size for Ant, the default is not enough, e.g. by setting environment variable
export ANT_OPTS="-Xmx196m"
Some modules require additional heap to build. To increase javac's, the compiler's, heap size add
build.compiler=extJavac javac.compilerargs=-J-Xmx512mto nbbuild/user.build.properties (this file doesn't exist after checked out, must create it first). In NB 6.1+ you can also use ~/.nbbuild.properties for settings which should apply to any NB checkout on the machine unless overridden in user.build.properties.
If you want everything, do this (NB 6.0 or earlier):
mkdir nbsrc cd nbsrc cvs checkout -r release60 nbbuild ant -f nbbuild/build.xml checkout ant -f nbbuild/build.xml ant -f nbbuild/build.xml clean
ant checkout will do the right thing, i.e. it will check out the rest of the source tree from the same branch/tag where nbbuild is coming from.
NetBeans IDE consists of module clusters. A cluster is a collection of modules which together implement related functionality. Here is the list
To work on a specific cluster you need to have modules in that cluster checked out from CVS and also clusters which your cluster depends on.
Example: Ruby support only
Based on the cluster dependency matrix we know that we need
mkdir nbsrc cd nbsrc # For CVS access only; for NB 6.1 in Hg, you must get the whole repo: cvs checkout nbbuild # End CVS only # An example "well-known" cluster, if you wish to use a custom list of clusers, use nb.clusters.list rather than cluster.config. echo cluster.config=ruby>> nbbuild/user.build.properties # For CVS access only ant -f nbbuild/build.xml checkout # End CVS only ant -f nbbuild/build.xml ant -f nbbuild/build.xml tryme ant -f nbbuild/build.xml clean
For the full list of cluster configurations see the file nbbuild/cluster.properties in your CVS checkout.
You can also have a custom list of clusters which doesn't correspond to any "well-known" cluster configuration. For example if you work on the Ruby support in NetBeans you probably want this
echo nb.clusters.list=nb.cluster.nb,nb.cluster.platform,nb.cluster.ide,nb.cluster.ruby,nb.cluster.java,nb.cluster.apisupport,nb.cluster.harness,nb.cluster.profiler>> nbbuild/user.build.properties
to add NetBeans module development support, including the profiler, to the same build which you would use yourself.
NetBeans build uses JDK 1.5.x and some code that compiles with JDK 6 will not compile with 1.5.x. (Check the Java Platform combo in the Libraries tab of one of your modules. This controls nbjdk.home in nbbuild/user.build.properties. It must be set to a JDK 5 instance.) Check this file to make sure it exists and have a line like this
nbjdk.home=/opt/jdk5
On Windows, the file separator must be escaped since it is a metacharacter; e.g.
nbjdk.home=C:\\Program Files\\Java\\jdk1.5.0_14
In NB 6.1+ you can also create ~/.nbbuild.properties for settings which should apply to any NB checkout on the machine unless overridden in user.build.properties. (Changes made from the IDE will always be stored in user.build.properties.)
All you have to do is to checkout the nbbuild module from appropriate branch using appropriate timestamp. The rest is automatically handled by the checkout target from nbbuild/build.xml
For example get sources for NetBeans 6.0 Milestone 10:
mkdir nbsrc cd nbsrc cvs checkout -rrelease60-m10 -D"2007/06/28 14:31 UTC" nbbuild ant -f nbbuild/build.xml checkout
The rest of build procedure is the same as above. Information about tag/branch and timestamp is stored in file nbbuild/CVS/Tag