Well, actually having to fight with "accidental" addition of codes is more a problem of process rather than a problem with technology. My steps would be:
- Prevent committing the generated .java files in the CVS/SVN repository
- Embed matisse form generation in a continuous integration project.
For step 1:
Use a sensible naming convention and stick with the standard for all the gui object, e.g.: put all the forms inside a common package and use the .svnignore directive on java files in it.
For step 2:
Fabrizio Giudici has a nice tutorial on how to build a netbeans project (yes using matisse) inside a continuous integration environment.
http://weblogs.java.net/blog/fabriziogiudici/archive/2006/11/setting_up_netb.html
Note that he talks about installing netbeans first on a machine with a gui then moving the jar files in an headless machine. IIRC it was possible to install Netbeans version 4.x in an headless environment without using the gui (since it is a java application, the only steps to do were to unzip the files and create a sensible shell file launching the application with the correct jvm/classpath combo).
Anyway, if you can't enforce both rules, or you can't find how to generate the matisse artifacts in the CI server, consider the possibility to scrap the use of matisse entirely.