Moving to WTP
The Kaukolu Eclipse project has been recreated and structurally revamped to leverage the capabilities of the Eclipse Web Tools Platform. In WTP terms, Kaukolu is now a "Dynamic Web Project". All important changes and implications are outlined in this document. For more information about Eclipse WTP, please refer to the WTP websites at http://www.eclipse.org/webtools/main.php. The new project resides in trunk/kaukolu. Please check out the new project and test it extensively.
The number one reason to restructure the project was to make development more comfortable. Since the tools are now aware of Kaukolu being a JSP project, certain advantages can be observed: For one, the platform is now aware of the notion of a deployment descriptor and links to it at the project's root level (given it is located in the WEB-INF directory). Moreover, handling libraries and the classpath has become more comfortable: Deleting a library from WEB-INF/lib through the filesystem and triggering a project refresh will result in the project's classpath being updated automatically by WTP. All sorts of validators are also available now, including XML and JSP validators. Most importantly though, the hardwired (development-)dependency to the Jetty servlet container is gone. WTP uses special Server projects which allow running different kinds of servlet containers in the context of Eclipse, and to which WTP projects can be bound. This allows for things like hot code replacement, one-click-deployment and port monitoring. In particular, no system wide configuration files are required, everything can be configured from within Eclipse.
This paragraph sums up the structural changes Kaukolu has undergone. The directory structure now looks like this:
[kaukolu] + [build] + [src] + [tests] + [WebContent] + [WEB-INF] + [lib] ... web.xml ... index.html Wiki.jsp ... + [doc]
build: Compiled classes, managed by WTP.
src: Contains the program source code (production code).
tests: Unit tests.
WebContent: (X)HTML, JSPs, basically everything related to the www-ish nature of Kaukolu, including the deployment descriptor and libraries specific to Kaukolu. Important note: the lib/ subdirectory is managed by WTP. Everything you put here will be automatically added to the classpath and appear under 'Java Resources --> Libraries --> Web App Libraries' in the 'Project Explorer' in the J2EE perspective (the preferred perspective for developing web applications).
doc: All sorts of documentation goes here.
For the sake of completeness and traceability, let me sum up where some things went which were formerly found in different locations:
build/ --> build/ doc/ --> doc/ etc/ --> WebContent/WEB-INF/ lib/ --> WebContent/WEB-INF/lib META-INF/ --> WebContent/META-INF releases/ --> x src/ --> src/ tests/ --> tests/ tomcat-4.1/ --> x WEB-INF/ --> WebContent/WEB-INF
Important: Everything in the former src/ folder which was not related to plain Java source code has been moved to WebContent/.
Other important changes
While restructuring, I tried dumping as much bloat as possible. In fact I eliminated several libraries from the project which didn't seem to have any purpose for us (at least Kaukolu seems to run fine without them). Libraries I sorted out include:
bsf.jar bsh-bsf-2.0b4.jar bsh-core-2.0b4.jar commons-codec-1.3.jar commons-fileupload-1.1.jar commons-httpclient-3.0.1.jar openrdf-util.jar openrdf-util-fixed-locking.jar hsqldb.jar jasper-compiler.jar jasper-runtime.jar nekohtml.jar xercesImpl-2.6.2.jar xml-apis-1.0.b2.jar
If you spot any libraries here which you think are vital and have been sorted out illegally, please let me know. In fact, I meanwhile readded some of them again, because they were required to run certain test cases (I find it rather questionable though to deploy libraries with the web app which are only required for testing, but oh well).
On the other hand, I had to manually add a couple of libraries to get Kaukolu running in a Tomcat 5.5:
in Tomcat installation dir:
I don't know why this was required, but anyway, it works for me. Other important changes include (in no particular order):
- *.tmpl files have been removed
- no more kaukolupages/ vs. wikipages/ redundancy, there are only wikipages/ now which are actually the former kaukolupages/