Top Page

Developing Web Applications with Subversion

Subversion is a source-code version management tool. If you are not familier with Subversion, read the instruction described here.

How to manage your project with subversion

Since utgb-shell-1.1.5, svn-add command is supported, which automatically adds files to the Subvresion repository, and set svn:ignore property to temporary folders such as 'target', 'gwt-home', etc.

> utgb svn-add 
[SVNAdd]        svn add .
[SVNAdd]        svn add config
[SVNAdd]        svn add eclipse
[SVNAdd]        svn add src
[SVNAdd]        svn add README
[SVNAdd]        svn add pom.xml
[SVNAdd]        set svn:ignore on directory =., targets = target gwt-home www .project .classpath
[SVNAdd]        svn add db
[SVNAdd]        set svn:ignore on directory =db, targets = *.db
[SVNAdd]        svn add tomcat
[SVNAdd]        svn add tomcat/conf
[SVNAdd]        svn add tomcat/webapps
[SVNAdd]        set svn:ignore on directory =tomcat, targets = work

Which files and folders must be under version-control?

Here is the initial folder strucrture of the web application generated by UTGB shell:

README		Instruction file
config		configuration folder
db		database folder
eclipse		eclipse launch file folder
src		source codes
pom.xml		project description
war		GWT temporary directory for javascript codes

  • After the first compilation (utgb compile), target folder will be added. This folder is needed only when compiling your web application. So do not include the target folder under the version control.
  • And also, database files in db folder should not be put in the version control because your database may contain confidential information, or database files are tend to large (10M or more) for the Subversion.
  • When running utgb eclipse command, .project and .classpath files are generated, which contain the information of the necessary JAR (Java Archive) files in your project. We recommend not to put these files in the Subversion repository, because utgb eclipse command can generete these .project and .classpath files, and this step is required to download all necessary JAR libraries into your PC's local folder, (HOME)/.m2/repository.

Summary of files which must be ignored (use svn:ignore property)

db/(your database files)      if your data is confidential or too large (more than 10M)
target	 	  	      temporary files generated in compilation time
war/utgb		      temporary files generated when compiling GWT codes
.project		      Eclipse project file
.classpath		      Eclipse classpath setting file

All files except listed above are suited to the version control with Subversion.