Using bzr with NetBeans
NetBeans
is a popular IDE for Java which has inbuilt
support for SVN and CVS. However, it lacks inbuilt support for
bzr. While making my Networks project, I worked with
project, I used centralized bzr for source management and as my team-mates were on Windows and I on
Linux, we had a few adjustment problems. Hence, a sketch of the steps I used to get a bzr server up and
running on my system.
- Setting up bzr: Most of the material can be found at the
manual
- Installed
bzr
,
bzrtools
, and
bzr-gtk
. The last is not necessary,
but extremely useful.
- Introduced myself to bzr, using the
whoami
command.
- Made a new user
'networksproject'
and gave it necessary privileges. Normal
privileges should not be a problem if you are sure nothing malicious is going to happen to
your machine. However, as other will need to connect to this user remotely, one should not
curtail ssh rights.
- Logged in using the new account to make a repository(folder) named
networksproject
with three trunks(folders) corresponding to
three legs of the project.
- Logged back as the native user and then followed the second way as described in the
manual to first
checkout
an empty trunk, copied existing bits of code and then commit
the changes.
- To check it out from any machine:
bzr checkout sftp://networksproject@musicallyut-laptop-address/~/networksproject/MakeChunk
- Setting up bzr for NetBeans
However, things did not go very smoothly when we started cross compiling and trying to run
things. Nevertheless, once on the road, we learned the correct way of doing it. Hence,
the purported correct procedure to follow seems to be:
- NEVER share the entire project folder. We spent considerable time and energy in
weeding out files that were result of compilations and were not portable. Finally, we put the following in our
.bzrignore
file in the project directory
before the first
commit/checkout
:
*.class
*.jar
dist
build
nbproject
build.xml
- Once the skeleton project folder (without the above mentioned files) has been
checkout
, then in NetBeans, make a new project, choose the option to make it using
existing sources and then import the sources. This will make the platform dependent build
scripts, making it much easier to work even from the command line.
- The dependencies will need to be resolved
only
once on each machine if the above
procedure is followed. Otherwise, as the
nbproject
folder is overwritten on different
platform, Java finds it difficult to track dependencies among the projects after each
commit.
Back to Home
musically_ut
2014-04-03