Synch jetspeed

To do this you need to have:

  • Subversion
  • HEAD version of the KP-Lab trunk
  • A snapshot of Apache Jetspeed-2
  • Eclipse or other tool visual patching tool

You need to know:

  • The revision of Jetspeed-2 currently synched in
  • Username and password for KP-Lab SVN

These instructions assume that the user is using an Unix/Linux based system and Eclipse.

Step1: Checkout the KP-Lab trunk

Open a console and checkout the sources

svn co kplab

It will ask you for a username and password. Provide the ones you have.

Step2: Checkout the Apache Jetspeed-2

Get the revision number

If you don't know this already, you have to checkout on the file in the KP-Lab trunk. You can find the under the sources portal/jetspeed-revision.txt. A command

tail kplab/portal/jetspeed-revision.txt

in the previous console should show you the number.

Get the source snapshot

Now you need to get that revision of the Jetspeed-2. In this case the revision number is 1234567, replace that value with the one you have.

svn co -r 1234567 jetspeed-2

Step3: Create the diff

Now you have to create a unified diff which can then be patched. In the console:

cd jetspeed-2
svn -r BASE:HEAD diff >> jetspeed-update.patch

Now you should have the patch in a file named jetspeed-update.patch.

Step4: Apply the patch

Open Eclipse (or some other visual patching tool you have). Import the KP-Lab sources as a project there. Right click on the project and choose Team->Apply patch. In the first screen choose the patch file and press Next. Next choose the location where to apply the patch. Choose folder kplab/portal and press Next. Now you should see the status of the patch. The lines which are selected were non-conflicting, this should be the case for most of the files. If not, there has gone something wrong. Verify all the other files that they are producing an sensible result. The ones that say (file does not exist) in the end can be checked without checking as these are new files. Apply the patch.

To be certain of the not automatically matched patches, you can use some other directory comparison tool like Meld to check the differences. Usually there shouldn't be too many of these if the synching is done regularily.

Step5: Update Jetspeed version

If you still have the console open you should still be in Jetspeed sources directory. If not, cd you self to there.

svn update
svn info

You should see the revision on number of the sources. Copy that and open the kplab/portal/jetspeed-revision.txt and update the revision number. It is really important to keep this up to date as wrong version number makes the next synching really diffilcult to do. It this happens you are forced to use the manual synching.

Step6: Check build

Test if everything still builds. Usually

mvn clean && mvn

executed in the KP-Lab sources directory should do that. If it builds successfully everything should be ok. Note, that you need Maven2 installed to do this.

Step7: Commit changes

As you should in Eclipse now, just right click on the project and choose Team->Synchronize. Wait for the results, check that there are no conflicting files and commit the changes.

Other ways:

You could use some other visual diff/merging tools like Meld to synchronize the sources. This is slower as you have to go through the files semi-manually, but in the other end gives you a nice overview of the file structure :D.

Development DevelopmentJetspeed

  Page Info My Prefs Log in
This page (revision-7) last changed on 18:24 25-Mar-2017 by Mikko Wuokko.

Referenced by

JSPWiki v2.4.102