VisualWebBuildInstructions
Contents |
How To Build Visual Web
These intructions are updated sporadically as the build infrastructure is enhanced and soon will be osoleted by these "Working With NB sources" instructions.
Get Basic Tools
- Install Java SE 5 update 6 or later -> http://java.sun.com and set JAVA_HOME environment variable
- Install ANT 1.7.0 --> http://ant.apache.org
- Install CVS client --> http://cvshome.org; for Windows --> http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/ versions 1.11.17 - 1.11.22
- Put java, ant and cvs in your path
How to Access CVS Server
- CVSROOT=:pserver:USER@cvs.netbeans.org:/cvs (where USER can be your NetBeans account user id or 'anoncvs')
- cvs -d $CVSROOT login (for more info, go to http://visualweb.netbeans.org/servlets/ProjectSource)
Checkout Source & Build
Check out source:
- from Trunk:
- cvs -d $CVSROOT -z6 -q co -P nbbuild
- ant -f nbbuild/build.xml -D"cluster.config=visualweb" checkout
- from $BranchName:
- cvs -d $CVSROOT -z6 -q co -P -r$BranchName nbbuild
- ant -f nbbuild/build.xml -D"cluster.config=visualweb" checkout
Refresh source:
- cvs update -dP (make sure to be in the top level source tree directory when running this command)
Build:
- cd nbbuild
- set ANT_OPTS=-Xmx512m (to avoid OME)
- ant -D"cluster.config=visualweb"(to build NetBeans & visualweb)
- ant -D"rebuild.cluster.name=nb.cluster.visualweb" rebuild-cluster (to rebuild just VW cluster)
Clean:
- ant -D"cluster.config=visualweb" clean (to clean NetBeans, visualweb and other modules in visualweb config)
Run sanity tests:
- replace J2EE_HOME with the Glassfish location in visualweb/test/data/DefaultDeploymentTargets.properties
- ant commit-validation-vw
More on sanity tests...
Automated Builds
- NB 6.0 production CB (including visualweb):It's scheduled to run every hour and each round takes about 30 minutes
Note:
Build failures are sent to broken_builds@netbeans.org. Committers have to subscribe to this mailing lists (send a message to broken_builds-subscribe@netbeans.org) and monitor the traffic there.
There is also a NetBeans plugin called build monitor which periodically reads the RSS feed from hudson and displays red/green light on the IDE status line.
How to Add a new module into VW cluster
- Do not modify visualwebsuite, that should not be touched
- Add your new module under visualweb in nbbuild/cluster.properties
- cd into the nbbuild directory
- ant -D"cluster.config=visualweb" clean;
- ant -D"cluster.config=visualweb"
- ant commit-validation-vw
Note you do not need to modify the golden files if your friend dependencies are only within the visualweb cluster for now.
Other useful commands
- cd nbbuild; ant print-cvs-modules (to get a list of all the base NB modules needed for the build, not including any pack clusters)
- ant -p (to print all the invokable targets in the build.xml)
Trouble Shooting Tips
- Another way to build visualweb cluster:
ant build-nozip -Dcluster.config="visualweb" -Ddo-not-rebuild-clusters=true (optional)
- Can't build on Windows:
1. after checking out the sources and building unsuccessfully, delete openide. 2. checkout openide 3. cd nbbuild 4. ant real-clean 5. ant build-nozip build-visual-cluster-only
- Another way to checkout source:
#!/bin/sh for module in "ant apisupport autoupdate classfile core db debuggercore debuggerjpda diff editor extbrowser form graph html httpserver i18n ide image j2ee j2eeserver java javacvs javadoc javawebstart jellytools jemmy junit languages lexer libs logger nbbuild monitor openide openidex performance profiler projects properties refactoring schema2beans serverplugins scripting subversion tasklist tomcatint usersguide utilities versioncontrol visualweb web websvc xml xtest"; do /usr/dist/exe/cvs -z6 -q co -PA $module; done;
- When I ran the clean commandline that you have listed on the Build Instructions Website I get this error:
localclean: [Delete] Deleting directory c:\users\js138578\vwp_bin\clean-src\nbbuild\testuserdir [Delete] Deleting directory c:\users\js138578\vwp_bin\clean-src\nbbuild\build BUILD FAILED c:\users\js138578\vwp_bin\clean-src\nbbuild\build.xml:1030: Unable to delete file c:\users\js138578\vwp_bin\clean-src\nbbuild\build\public-package-jars\org-jdesktop-layout.jar
I actually had to delete build/public-packages-jars/* from a Windows explorer since for some reason Cygwin would not let me delete this.