[opencms-dev] How to automate OpenCms module

Steve Bryan steve at bright-interactive.com
Mon Apr 19 10:53:11 CEST 2010


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
> 




More information about the opencms-dev mailing list