Synchronizing with Ant

From OpenCms Wiki
Revision as of 17:49, 7 March 2007 by Ebessette (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here's the ant target I use for synchronizing with OpenCMS.

<project name="OpenCms Build Script" basedir="." default="synchronize">

	<property name="opencms.username" value="username" />
	<property name="opencms.password" value="password" />
	<property name="opencms.project" value="Offline" />

	<target name="synchronize" description="Synchronize with the OpenCms VFS">

		<echo file="shell.input">
login ${opencms.username} ${opencms.password}
synchronize ${opencms.project}
exit
		</echo>

		<java classname="org.opencms.main.CmsShell" fork="true" input="shell.input">
			<classpath>
				
				...
			</classpath>
			<arg value="-base=${tomcat.path}/webapps/opencms/WEB-INF" />
			<arg value="-defaultWebApp=opencms" />
			<arg value="-servletMapping=opencms" />
		</java>

		<delete file="shell.input" quiet="true" />
	</target>
</project>
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox