Skip to content

Commit

Permalink
LEP-2308
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.liferay.com/repos/public/portal/trunk@4726 05bdf26c-840f-0410-9ced-eb539d925f36
  • Loading branch information
brianchandotcom committed Mar 7, 2007
1 parent de75def commit 0e292e8
Show file tree
Hide file tree
Showing 32 changed files with 408 additions and 33 deletions.
6 changes: 6 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ jdbc.drivers=firebird.jar,hsql.jar,interbase.jar,jtds.jar,mysql.jar,ojdbc14.jar,

javascript.files=jquery.js,cookie.js,interface.js,j2browse.js,class.js,sniffer.js,liferay.js,portal.js,ajax.js,alerts.js,swfobject.js,service.js,calendar/calendar_stripped.js,calendar/calendar-setup_stripped.js,colorpicker/colorpicker.js,dragdrop/coordinates.js,dragdrop/drag.js,dragdrop/dragdropzone.js,dragdrop/resize.js,portlet/layout_configuration.js,portlet/messaging.js

##
## Auto Deploy
##

auto.deploy.dir=/home/liferay/deploy

##
## Deploy WARs
##
Expand Down
2 changes: 1 addition & 1 deletion definitions/liferay-look-and-feel_4_3_0.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ means you can find the files for the Classic theme in
For convenience, the root-path attribute can be referenced in the rest of the
theme element as ${root-path}.

The default value is "/${theme-id}".
The default value is "/".
-->
<!ELEMENT root-path (#PCDATA)>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public boolean equals(Object obj) {

private String _themeId;
private String _name;
private String _rootPath = "/${theme-id}";
private String _rootPath = "/";
private String _templatesPath = "${root-path}/templates";
private String _imagesPath = "${root-path}/images";
private String _templateExtension = "vm";
Expand Down
18 changes: 17 additions & 1 deletion portal-ejb/src/com/liferay/portal/tools/BaseDeployer.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,22 @@ protected void updateWebXML(
File webXML, File srcFile, String displayName)
throws Exception {

if (!webXML.exists()) {
String content = "";

content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
content +=
"<!DOCTYPE web-app PUBLIC \"-//Sun Microsystems, Inc.//" +
"DTD Web Application 2.3//EN\" " +
"\"http://java.sun.com/dtd/web-app_2_3.dtd\">\n\n";
content += "<web-app>\n";
content += "</web-app>";

FileUtil.write(webXML, content);

System.out.println(" Adding Servlet " + webXML);
}

String content = FileUtil.read(webXML);

int pos = content.indexOf("<web-app");
Expand Down Expand Up @@ -482,7 +498,7 @@ protected void updateWebXML(
FileUtil.write(webXML, newContent, true);

System.out.println(
" Modifying Servlet " + webXmlVersion + " " + webXML );
" Modifying Servlet " + webXmlVersion + " " + webXML);
}

protected String baseDir;
Expand Down
2 changes: 1 addition & 1 deletion portal-ejb/src/com/liferay/portal/util/ReleaseInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ReleaseInfo {

static String codeName = "Machen";

static String build = "3788";
static String build = "3791";

static String date = "March 6, 2007";

Expand Down
10 changes: 5 additions & 5 deletions portlets/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</target>

<target name="clean-module">
<delete file="../${module.name}.war" failonerror="false" />
<delete file="${project.dir}/${module.name}.war" failonerror="false" />
<delete dir="${module.name}.war/WEB-INF/classes/com" failonerror="false" />

<delete failonerror="false">
Expand Down Expand Up @@ -65,7 +65,7 @@

<copy
file="sample-spring-portlet.war"
tofile="../sample-spring-portlet-${lp.version.file.name}.war"
tofile="${project.dir}/sample-spring-portlet-${lp.version.file.name}.war"
/>
</target>

Expand Down Expand Up @@ -126,7 +126,7 @@

<war
basedir="${module.name}.war"
destfile="../${module.name}-${lp.version.file.name}.war"
destfile="${project.dir}/${module.name}-${lp.version.file.name}.war"
excludes="WEB-INF/web.xml*"
webxml="${module.name}.war/WEB-INF/web.xml"
/>
Expand Down Expand Up @@ -186,8 +186,8 @@
</target>

<target name="build-lang">
<ant dir="../portal-ejb" target="build-lang-cmd">
<property name="lang.dir" value="../portlets/sample-struts-portlet.war/WEB-INF/classes/content/test" />
<ant dir="${project.dir}/portal-ejb" target="build-lang-cmd">
<property name="lang.dir" value="${project.dir}/portlets/sample-struts-portlet.war/WEB-INF/classes/content/test" />
<property name="lang.file" value="Language" />
</ant>
</target>
Expand Down
2 changes: 1 addition & 1 deletion sql/portal-data-release.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
insert into Release_ (releaseId, createDate, modifiedDate, buildNumber, verified) values ('1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 3788, TRUE);
insert into Release_ (releaseId, createDate, modifiedDate, buildNumber, verified) values ('1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 3791, TRUE);
150 changes: 127 additions & 23 deletions themes/build.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,141 @@
<?xml version="1.0"?>

<project name="themes" basedir="." default="deploy">
<project name="themes" basedir="." default="deploy" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="../build-common.xml" />

<target name="deploy">
<java
classname="com.liferay.portal.tools.ThemeDeployer"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<target name="clean">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="clean" />
</antcall>
</target>

<target name="clean-module">
<delete includeemptydirs="true" quiet="true" failonerror="false">
<fileset
dir="${module.name}.war"
excludes="_diffs/**,WEB-INF/**"
/>
</delete>
</target>

<target name="war" depends="merge">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="war" />
</antcall>
</target>

<!-- Required Arguments -->
<target name="war-module">
<jar
basedir="${module.name}.war"
destfile="${project.dir}/${module.name}-${lp.version.file.name}.war"
/>
</target>

<jvmarg value="-Ddeployer.base.dir=./" />
<jvmarg value="-Ddeployer.dest.dir=${app.server.deploy.dir}" />
<jvmarg value="-Ddeployer.app.server.type=${app.server.type}" />
<jvmarg value="-Ddeployer.theme.taglib.dtd=${project.dir}/util-taglib/classes/META-INF/liferay-theme.tld" />
<jvmarg value="-Ddeployer.util.taglib.dtd=${project.dir}/util-taglib/classes/META-INF/liferay-util.tld" />
<jvmarg value="-Ddeployer.unpack.war=true" />
<target name="deploy" depends="merge">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="deploy" />
</antcall>
</target>

<!-- Optional Arguments -->
<target name="deploy-module">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>

<jvmarg value="-Ddeployer.tomcat.lib.dir=${app.server.tomcat.lib.global.dir}" />
<jar
basedir="${module.name}.war"
destfile="${tstamp.value}"
excludes="_diffs/**"
/>

<!-- Dependent Libraries -->
<move file="${tstamp.value}" tofile="${auto.deploy.dir}/${module.name}.war" />
</target>

<arg value="${project.dir}/util-java/util-java.jar" />
<arg value="${project.dir}/util-taglib/util-taglib.jar" />
<target name="loop-modules">
<for param="module.name">
<path>
<dirset dir="." includes="*.war" />
</path>
<sequential>
<antelope:stringutil string="@{module.name}" property="module.name.beginindex">
<lastindexof string="${file.separator}" />
</antelope:stringutil>

<math
datatype="int"
operand1="${module.name.beginindex}"
operand2="1"
operation="+"
result="module.name.beginindex"
/>

<antelope:stringutil string="@{module.name}" property="module.name.endindex">
<lastindexof string=".war" />
</antelope:stringutil>

<antelope:stringutil string="@{module.name}" property="module.name">
<substring beginindex="${module.name.beginindex}" endindex="${module.name.endindex}" />
</antelope:stringutil>

<if>
<or>
<equals arg1="${deploy.specific.wars}" arg2="" />
<antelope:contains string="${deploy.specific.wars}" substring="${module.name}" />
</or>
<then>
<if>
<equals arg1="${loop.modules.cmd}" arg2="clean" />
<then>
<antcall target="clean-module" />
</then>
<elseif>
<equals arg1="${loop.modules.cmd}" arg2="war" />
<then>
<antcall target="war-module" />
</then>
</elseif>
<elseif>
<equals arg1="${loop.modules.cmd}" arg2="deploy" />
<then>
<antcall target="deploy-module" />
</then>
</elseif>
<elseif>
<equals arg1="${loop.modules.cmd}" arg2="merge" />
<then>
<antcall target="merge-module" />
</then>
</elseif>
</if>
</then>
</if>
</sequential>
</for>
</target>

<target name="merge">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="merge" />
</antcall>
</target>

<!-- Specific WARs -->
<target name="merge-module">
<copy todir="${module.name}.war">
<fileset
dir="${project.dir}/portal-web/docroot/html/themes/_common"
excludes="templates/init.vm"
/>
</copy>

<arg line="${deploy.specific.wars}" />
</java>
<if>
<available file="${module.name}.war/_diffs" />
<then>
<copy todir="${module.name}.war" overwrite="yes">
<fileset
dir="${module.name}.war/_diffs"
/>
</copy>
</then>
</if>
</target>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 4.3.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_4_3_0.dtd">

<look-and-feel>
<compatibility>
<version>4.2.0</version>
</compatibility>
<theme id="base-advanced" name="Base Advanced">
<root-path>/</root-path>
<templates-path>${root-path}/templates</templates-path>
<images-path>${root-path}/images</images-path>
<template-extension>vm</template-extension>
<settings>
<setting key="hello" value="world" />
<setting key="hi" value="mom" />
</settings>
<roles>
<role-name>User</role-name>
</roles>
<color-scheme id="01" name="Blue">
<css-class>blue</css-class>
<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
</color-scheme>
<color-scheme id="02" name="Green">
<css-class>green</css-class>
</color-scheme>
<color-scheme id="03" name="Orange">
<css-class>orange</css-class>
</color-scheme>
<layout-templates>
<standard>
<layout-template id="exclusive">
<template-path>/layouttpl/standard/exclusive.tpl</template-path>
<thumbnail-path>/layouttpl/standard/exclusive</thumbnail-path>
</layout-template>
<layout-template id="max">
<template-path>/layouttpl/standard/max.tpl</template-path>
<thumbnail-path>/layouttpl/standard/max</thumbnail-path>
</layout-template>
</standard>
<custom>
<layout-template id="freeform" name="Freeform">
<template-path>/layouttpl/custom/freeform.tpl</template-path>
<thumbnail-path>/layouttpl/custom/freeform</thumbnail-path>
</layout-template>
<layout-template id="1_column" name="1 Column">
<template-path>/layouttpl/custom/1_column.tpl</template-path>
<thumbnail-path>/layouttpl/custom/1_column</thumbnail-path>
</layout-template>
<layout-template id="2_columns_i" name="2 Columns (50/50)">
<template-path>/layouttpl/custom/2_columns_i.tpl</template-path>
<thumbnail-path>/layouttpl/custom/2_columns_i</thumbnail-path>
</layout-template>
<layout-template id="2_columns_ii" name="2 Columns (30/70)">
<template-path>/layouttpl/custom/2_columns_ii.tpl</template-path>
<thumbnail-path>/layouttpl/custom/2_columns_ii</thumbnail-path>
</layout-template>
<layout-template id="2_columns_iii" name="2 Columns (70/30)">
<template-path>/layouttpl/custom/2_columns_iii.tpl</template-path>
<thumbnail-path>/layouttpl/custom/2_columns_iii</thumbnail-path>
</layout-template>
<layout-template id="3_columns" name="3 Columns">
<template-path>/layouttpl/custom/3_columns.tpl</template-path>
<thumbnail-path>/layouttpl/custom/3_columns</thumbnail-path>
</layout-template>
<layout-template id="1_2_1_columns" name="1-2-1 Columns">
<template-path>/layouttpl/custom/1_2_1_columns.tpl</template-path>
<thumbnail-path>/layouttpl/custom/1_2_1_columns</thumbnail-path>
</layout-template>
<layout-template id="2_2_columns" name="2-2 Columns">
<template-path>/layouttpl/custom/2_2_columns.tpl</template-path>
<thumbnail-path>/layouttpl/custom/2_2_columns</thumbnail-path>
</layout-template>
</custom>
</layout-templates>
</theme>
</look-and-feel>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!DOCTYPE plugin-package PUBLIC "-//Liferay//DTD Plugin Package 4.3.0//EN" "http://www.liferay.com/dtd/liferay-plugin-package_4_3_0.dtd">

<plugin-package>
<name>Sample Base Advanced Theme</name>
<module-id>liferay-samples/sample-base-advanced-theme/4.2.1/war</module-id>
<types>
<type>theme</type>
</types>
<tags>
<tag>sample</tag>
</tags>
<short-description>
This is a base theme with advanced configuration set in liferay-look-and-feel.xml.
</short-description>
<change-log>
Adapted to the latest version of Liferay
</change-log>
<page-url>http://www.liferay.com/web/guest/downloads/samples</page-url>
<author>Liferay, Inc.</author>
<licenses>
<license osi-approved="true">MIT</license>
</licenses>
<liferay-versions>
<liferay-version>4.2.*</liferay-version>
</liferay-versions>
</plugin-package>
Loading

0 comments on commit 0e292e8

Please sign in to comment.