Notice: We no longer support this class. #

We have switched to a versioning provider which stores pages and attachments in a database through J2EE CMP Entity Beans. #

A CVS File Provider has been created that uses ANT tasks for version control on a remote CVS server. The AntCvsFileProvider class is plug-and-play much like existing Providers. Even better, it actually works!

Download#

You can download the patch from the University of Calgary (6KB):

AntCvsFileProviderPatch.zip

Requirements: #

ant.jar

cvs or cvs.exe (v. 1.11.5+)

Note: We have had trouble with older CVS binaries and ANT. Make sure you have the latest cvs client binary installed!

Installation#

  1. Unzip the patch into the source directory
  2. Put ant.jar in your /lib directory
  3. Make sure cvs is in your path
  4. Make changes to your jspwiki.properties file as outlined in /etc/cvs_changes.txt
  5. Build and deploy as you normally would

This software is VERY NEW and thus we cannot support or guarantee it in any way. You will need to provide your own CVS server installation and configure the provider using the correct settings. This is all up to you!

This Provider was written by ThomasChau and KrisRead at the University of Calgary, in Alberta, Canada. For now, if you find bugs in this provider, contact us.


Questions#

Why use ANT for this? #

From the ANT home page...

Ant tasks are very robust. They have been banged on by many people. Ant tasks have been used in many different contexts, and have therefore been instrumented to take care of a great many boundary conditions and potentially obscure errors. Ant tasks are cross platform. Using Ant tasks means you have less of your own code to support. Ant code is supported by the entire Apache Ant community.

To tell the truth, Thomas and I tried getting the NetBeans approach working first. However, NetBeans seems to have been developed to facilitate GUI based development. The NetBeans API uses events and listeners that are too complicated for our simple provider. Next we tried the jCVS API. This APIs is very poorly documented. Although it should in theory be possible to do just about any kind of CVS tasks with either of these APIs, in practice we found it much simpler to use ANT.

-- KrisRead

What have you changed in JSPWiki?#

All we did was extend FileSystemProvider to create a new class called AntCvsFileProvider, and add a few lines to the jspwiki.properties file.

Have you tested your code?#

We are testing it now and ironing out our JUnit tests carefully. After our tests are a bit nicer we will submit the tests and code to the JSPWiki community.

Does it do any conflict resolution or anything else? #

The feature set is exactly the same as RCSFileProvider. The only reason to use this is if you are installing a Wiki on a machine without RCS (Windows for example) and already have a CVS server and want to use it for version control.

Will it be included in a future JSPWiki release?#

Only if the JSPWiki authors think its useful! We have no objections.


Sounds very cool! I would certainly like to see a provider interfacing with CVS... But how's the performance? Doesn't Ant add quite a lot of overhead?

-- JanneJalkanen


We haven't benchmarked performance yet. So far we have only had it working for about two days, as a small experiment. Essentially our client wanted the Wiki contents stored on an existing remote CVS server, and this seemed like the fastest development route. Our test drivers take a while to run, but I think that this has less to do with Ant and more to do with network communication speed. I am not sure why Ant would require a lot of overhead as you suggest (but I am not an Ant expert).

Do you have any suggestions for benchmarking our Wiki provider class?

-- KrisRead


Hmm, does not look bad, but some suggestions:
  • Use some options to define cvs connectivity type (local dir, pserver, ext etc.)
  • I am not sure one wants to initialize doing a checkout every time you start the server afaiu

Fixed the URL! Thanks Jacob. Update on the performance of this provider: its just fine so far! We are running more than 10 jspwiki instances on a single server all using this provider to contact a cvs server on the network. From the user perspective there are no noticable delays...

Right now we only care about pserver connectivity, so it is unlinely we will be extending this provider for ext and other methods. If someone would like to do so, go right ahead. As for doing a checkout when the server starts... well we don't often restart our server, so its not a big problem for us. The checkout is very quick anyhow.

-- KrisRead


What about attachments? It seems that they are not stored in the CVS. How difficult would it be to add that functionality? Is that also handled by FileSystemProvider?

-- JacekJarmulak


They are handled by another class, we haven't looked at this... I suppose it would be fairly easy. -- KrisRead

Attachments can be added to CVS as binary files I guess. I never did anything like this with Ant though.. -- MuraliRavipudi


Trying to use AntCvsFileProvider but get a null pointer exception... An unknown exception java.lang.NullPointerException was caught by Error.jsp.

same is the problem with versioningProvider can someone shed some light on this? Thanx for ur help

--AJ

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-26) was last changed on 16-Mar-2005 17:33 by JMiner