Thursday, November 3, 2011

How to use SVN with VLT in CQ / WEM

Use Case : You can not do all the operation using svn with CRXDE or CRXDE light. Also if you are using some other development tool, You can use File system to perform SVN operations.

Pre requisite : You have svn and vlt already set up
For svn set up use svn product guideline
for vlt set up refer

Solution :

Initial Set up :
$ cd /projects
$ svn mkdir
$ svn co
$ vlt export -v http://localhost:4502/crx /apps/geometrixx geometrixx
$ cd geometrixx/
$ svn add META-INF/ jcr_root/
$ svn ci

Changes made in File System and update to local repository (JCR)  If you are using vlt sync then you don't have to do this:

$ cd /projects/geometrixx
$ vlt -v import http://localhost:4502/crx . /
$ vlt add <File you added>
$ vlt ci
$ vlt st
$ vlt ci

Changes made in SVN and update to File system :
$ cd /projects/geometrixx
$ svn st
M META-INF/vault/properties.xml
M jcr_root/apps/geometrixx/components/contentpage/.content.xml
$ svn up
If you are using vlt sync then you don't have to use this option
$ vlt ci

Changes made in repository and update it back to file system (With vlt sync you don't have to use this)
1) go to: content/jcr_root/<Path>
2) vlt up --force

Changes made in a file in local file system and update repository:

For example you are changing one file

1) go to: .../jcr_content/libs/foundation/components/text
2) edit something in text.jsp
3) see the modified files vlt st
4) see the changes: vlt diff text.jsp
5) commit the changes: vlt ci test.jsp
6) reload page containing a text component and see that it worked

So direction could be any thing (After initial set up, You don't have to do it when using vlt sync)

repo change ---> vlt st ---> vlt up --> svn st --> svn ci

svn change ----> svn st --> svn up --> vlt ci

file system change ---> vlt st ---> vlt ci And then svn st ----> svn ci

Now with vlt synch option you can synch between your eclipse project and crx. This helps not to use vlt ci every time you make file system changes and use vlt up when you make crxde changes.

More infirmation about vlt synch can be found here


  1. It was wonderful getting such nice information. Great to see new social alternative for us and many more others, who are not thrilled with the status quo of social media. Please do share and updated with us. appreciate your time. Keep up the hard work.