[opencms-dev] How to automate OpenCms module

Achim Westermann achim.westermann at questico.de
Mon Apr 19 12:14:45 CEST 2010


Hi Steve,

no, the approach to re-install a module for a small programming change is slow. It first deletes the whole module, publishes this, then 
imports the module, analyzes links and publishes that. A potential restart of the tomcat is also needed in case the module carries classes / 
jar libraries (as exportpoints).

We use this in combination with the Eurelis OpenCms ANT build to first merge our development with CVS (multiple developers) and then install 
the built module on the test system. It is no big benefit for syncing minor changes but a big plus for having an official version at module 
level.

HTH,

Achim

Steve Bryan wrote:
> Hi Achim and Robert
> 
> Thanks for sharing your info on this! I was recently trying to use OpenCms
> shell to synchronise code and jsps from Eclipse to OpenCms, but failed
> because there didn't seem to be a 'Synchronize' function available (we use
> Ant to copy files to the sync directory, but then currently have to manually
> sync using the OpenCms front end button). 
> 
> What you say has made me think I could redefine our module structure a
> little so the modules include all the files I need to synch, then use
> deleteModule and importModule commands rather than the Synchronize function,
> to sync all or selected modules.
> 
> Is this quite fast? I would be concerned the jsp template developer has to
> wait a while after each little change to see the effect in OpenCms. It is a
> bit painful using our ANT + OpenCms sync method but I would only be
> interested trying this if it gives benefits of speed.
> 
> Thanks
> Steve
> 
> 
> -------- Original-Nachricht --------
> 
> Date: Fri, 16 Apr 2010 15:34:42 +0200
> From: "Achim Westermann" <Achim.Westermann at gmx.de>
> Subject: Re: [opencms-dev] Blog entry: "How to automate OpenCms module
> 	import"
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Message-ID: <20100416133442.301530 at gmx.net>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi Robert, 
> 
> thanks for sharing. We use ant for this. A snippet to give an idea: 
> 
> ----------------
> 
> <target name="IDE_TO_VFS" description="Builds and uploads the module to
> local OpenCms" depends="CREATE_MODULE">
> 
> 		<delete
> file="${opencms.basedir}/${opencms.webappname}/WEB-INF/packages/modules/${na
> me.zip}" failonerror="false" />
> 		<copy file="${file.zip}"
> todir="${opencms.basedir}/${opencms.webappname}/WEB-INF/packages/modules/"
> />
> 
> 		<echo file="shell.input">
> 			login ${opencms.username} ${opencms.password}
> 			setCurrentProject Offline
> 			deleteModule "${module.module.name}"
> 			importModuleFromDefault "${name.zip}"
> 			exit
> 		</echo>
> 
> 		<!-- Rund the cmsshell :-->
> 		<java classname="org.opencms.main.CmsShell" fork="true"
> input="shell.input" classpathref="opencms.webapplication.classpath"
> failonerror="true">
> 			<arg
> value="-base=${opencms.basedir}/${opencms.webappname}/WEB-INF" />
> 			<arg value="-defaultWebApp=opencms" />
> 			<arg value="-servletMapping=opencms" />
> 		</java>
> 
> 		<delete file="shell.input" quiet="true" />
> 	</target>
> 
> ----------------
> 
> kind regards, 
> 
> Achim
> 
> 
> -------- Original-Nachricht --------
>> Datum: Fri, 16 Apr 2010 15:02:30 +0200
>> Von: Robert Spielmann <robert.spielmann at codecentric.de>
>> An: opencms-dev at opencms.org
>> Betreff: [opencms-dev] Blog entry: "How to automate OpenCms module import"
> 
>> Hello world,
>>
>> I've just published a blog entry: "How to automate OpenCms module 
>> import" - it describes a shell script we have written for continuous, 
>> daily integration through automated deployment of OpenCms modules.
>>
>> See 
>> http://blog.codecentric.de/2010/04/opencms-automatic-module-import-howto/
>>
>> The article is available in German and English.
>>
>> Regards,
>>
>> Robert Spielmann
>> IT Consultant
>>
>> -- 
>> Agile Software GmbH
>> Merscheider Str. 1
>> 42699 Solingen
>>
>> B?ro:  +49 (212) 233628-42
>> Mobil: +49 (151) 14705709
>> Fax:   +49 (212) 233628-79
>>
>> Mail:  robert.spielmann at codecentric.de
>> Web:   http://www.codecentric.de
>> Blog:  http://blog.codecentric.de
>>
>> Gesch?ftsf?hrer: Mirko Novakovic, Rainer Vehns
>> Sitz der Gesellschaft: Solingen
>> Registergericht: Amtsgericht Wuppertal, HRB 19214
>>
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 


-- 
Achim Westermann
Java Developer IT Online Content

TEL   +49 (0)30 22 44 55 - 419
FAX   +49 (0)30 22 44 55 - 111
MAIL  achim.westermann at questico.de
WEB  www.questico.de

Questico AG
Zimmerstraße 68
Eingang Markgrafenstraße 58
10117 Berlin

Eingetragen beim AG Berlin Charlottenburg
HRB Nr. 76491
Vorstand: Sylvius Bardt (Vors.), Tim Schiffers, Dr. Ulrich Kohl, Michael Knapstein
Aufsichtsratsvorsitzender: Michael Wölfle



More information about the opencms-dev mailing list