Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: Re: Re: Re: Problems deploying lams_tool_example


 
Search: 

10: Re: Re: Re: Re: Re: Re: Problems deploying lams_tool_example
In response to 9 08/30/06 03:09 PM
[ Reply | Forward ]
> What is a good way to deal with CVS and these configuration files?
> Should I edit them each time I grab some new source code version?

I have to rebuild LAMS a lot everyday and at the beginning it was getting really tedious to do the re-editing again and again. So I create a batch file (.bat) that does the whole lot for me. Here's the content on my update.bat (of course this is for windows):

--
cd c:\lams2.0\
rmdir /S /Q lams-source
rmdir /S /Q repository
mkdir repository
mkdir lams-source
cd lams-source
c:\lams2.0\cvs.exe -z3 -d :pserver:anonymous@lamscvs.melcoe.mq.edu.au:/usr/local/cvsroot co all
copy /Y c:\lams2.0\common.properties c:\lams2.0\lams-source\lams_build\common.properties
copy /Y c:\lams2.0\windows.properties c:\lams2.0\lams-source\lams_build\windows.properties
cd C:\lams2.0\lams-source
cd lams_common
call ant rebuild-db
cd c:\lams2.0\lams-source\lams_build
call ant assemble-ear
call ant deploy-ear
call ant deploy-tools
call ant copyfiles
echo "Done!"
copy /Y c:\lams2.0\lams.xml c:\lamsconf
--

Note that my c:\lams2.0 directory contains all the LAMS 2.0 application "stuff". the c:\lams2.0\lams-source dir contains all the cvs code.

So the batch first gets to the lams2.0 directory and wipes out the entire source code directory and the repository one as well, then it creates them back again and checks out the source from cvs completely (you might want to do a cvs update instead of a complete new checkout -your call). Then it copies the backed up common.properties (here's when you can copy any other .properties file as well) to their correponding directories (overwriting the cvs ones) and then starts the building process again. Finally after compiling, it copies the lams.xml file to the directory that is specified in the .properties file that you copied before.

Note that your lams_tool_[your_tool_name] goes in the lams-source directory and since it isn't in CVS you need to make sure you back it up *before* you run the script and the copy it back to the lams-source directory before you start the building process again.

Hope that helps.

Ernie

Posted by Ernie Ghiglione

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum