Skip to content

Instantly share code, notes, and snippets.

@farmerbradllc
Created February 5, 2013 17:33
Show Gist options
  • Select an option

  • Save farmerbradllc/4716095 to your computer and use it in GitHub Desktop.

Select an option

Save farmerbradllc/4716095 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="liferay-login-theme" basedir="." default="deploy">
<import file="../build-common-theme.xml" />
<target name="compile">
<if>
<available file="docroot/_diffs/images" />
<then>
<for param="file">
<path>
<fileset
dir="docroot/_diffs/images"
includes="**/screenshot.png"
/>
</path>
<sequential>
<propertyregex input="@{file}" override="yes" property="thumbnail.file" regexp="screenshot\.png" replace="thumbnail\.png" />
<java
classname="com.liferay.portal.tools.ThumbnailBuilder"
classpathref="portal.classpath"
>
<arg value="thumbnail.original.file=@{file}" />
<arg value="thumbnail.thumbnail.file=${thumbnail.file}" />
<arg value="thumbnail.height=120" />
<arg value="thumbnail.width=160" />
<arg value="thumbnail.overwrite=false" />
</java>
</sequential>
</for>
</then>
</if>
<if>
<not>
<isset property="theme.type" />
</not>
<then>
<property name="theme.type" value="vm" />
</then>
</if>
<if>
<equals arg1="${theme.parent}" arg2="_unstyled" />
<then>
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/_unstyled"
excludes="templates/**"
/>
</copy>
<copy todir="docroot/templates" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/_unstyled/templates"
excludes="init.${theme.type}"
includes="*.${theme.type}"
/>
</copy>
</then>
<elseif>
<equals arg1="${theme.parent}" arg2="_styled" />
<then>
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/_unstyled"
excludes="templates/**"
/>
</copy>
<copy todir="docroot/templates" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/_unstyled/templates"
excludes="init.${theme.type}"
includes="*.${theme.type}"
/>
</copy>
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/_styled"
/>
</copy>
</then>
</elseif>
<elseif>
<equals arg1="${theme.parent}" arg2="classic" />
<then>
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/classic"
excludes="_diffs/**,templates/**"
/>
</copy>
<copy todir="docroot/templates" overwrite="true" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/classic/templates"
includes="*.${theme.type}"
/>
</copy>
</then>
</elseif>
<elseif>
<isset property="theme.parent" />
<then>
<ant dir="${theme.parent}" target="compile" inheritAll="false" />
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="${theme.parent}/docroot"
excludes="_diffs/**,WEB-INF/*.properties,WEB-INF/*.xml"
/>
</copy>
</then>
</elseif>
</if>
<if>
<available file="docroot/_diffs" />
<then>
<copy todir="docroot" overwrite="true" preservelastmodified="true">
<fileset
dir="docroot/_diffs"
/>
</copy>
</then>
</if>
<if>
<available file="docroot/WEB-INF/src" />
<then>
<antcall target="build-common-plugin.compile" />
</then>
</if>
<if>
<available file="docroot/_diffs/WEB-INF/src/resources-importer" />
<then>
<delete dir="docroot/WEB-INF/src/resources-importer" />
<copy todir="docroot/WEB-INF/src/resources-importer" overwrite="true" preservelastmodified="true">
<fileset
dir="docroot/_diffs/WEB-INF/src/resources-importer"
/>
</copy>
</then>
</if>
</target>
<property name="theme.parent" value="../liferay-insurance-theme" />
<delete dir="WEB-INF/src/resources-importer"/>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment