summaryrefslogtreecommitdiffstats
path: root/liferay
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-10-11 15:41:49 +0300
committerVaadin Code Review <review@vaadin.com>2013-10-16 08:55:03 +0000
commite70ba25c2d1a43dccd43e6ece8f7c126355332c0 (patch)
tree64023cb6be2e8ff3a1778ae711b7cde4e00be72a /liferay
parentf9ea9b31d4b97714fefeb7970600c1058f794e5e (diff)
downloadvaadin-framework-e70ba25c2d1a43dccd43e6ece8f7c126355332c0.tar.gz
vaadin-framework-e70ba25c2d1a43dccd43e6ece8f7c126355332c0.zip
Added liferay module for building liferay.zip #12748
Change-Id: I16c7ba25387b3e1ad9a56e800c49755306b44890
Diffstat (limited to 'liferay')
-rw-r--r--liferay/build.xml72
-rw-r--r--liferay/ivy.xml30
2 files changed, 102 insertions, 0 deletions
diff --git a/liferay/build.xml b/liferay/build.xml
new file mode 100644
index 0000000000..a13cb37366
--- /dev/null
+++ b/liferay/build.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<project name="liferay" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <description>
+ Builds the Liferay ZIP archive
+ </description>
+
+ <include file="../common.xml" as="common" />
+ <include file="../build.xml" as="vaadin" />
+
+ <property name="module.name" value="vaadin-liferay" />
+ <property name="result.dir" value="result" />
+ <property name="lib.dir" value="${result.dir}/lib" />
+ <property name="work.dir" value="${result.dir}/work" />
+ <property name="liferay.zip" location="${result.dir}/lib/${module.name}-${vaadin.version}.zip" />
+
+ <target name="publish-local" depends="build-zip" if="build.release">
+ <antcall target="common.publish-local">
+ <param name="conf" value="deps" />
+ </antcall>
+ </target>
+
+ <target name="fetch-jars">
+ <echo>Retriving prebuilt jars</echo>
+ <!-- Retrieve pre-build jars -->
+ <ivy:resolve />
+ <mkdir dir="${lib.dir}" />
+ <ivy:retrieve pattern="${lib.dir}/[artifact].[type]" conf="deps" />
+ </target>
+
+ <target name="unpack" depends="fetch-jars">
+ <echo>Unpacking jars into working directory</echo>
+ <mkdir dir="${work.dir}" />
+ <unjar src="${lib.dir}/vaadin-client-compiled.jar" dest="${work.dir}">
+ <patternset>
+ <include name="VAADIN/widgetsets/**/*" />
+ </patternset>
+ </unjar>
+ <unjar src="${lib.dir}/vaadin-themes.jar" dest="${work.dir}">
+ <patternset>
+ <include name="VAADIN/themes/base/**/*" />
+ <include name="VAADIN/themes/chameleon/**/*" />
+ <include name="VAADIN/themes/liferay/**/*" />
+ <include name="VAADIN/themes/runo/**/*" />
+ <include name="VAADIN/themes/reindeer/**/*" />
+ </patternset>
+ </unjar>
+ <unjar src="${lib.dir}/vaadin-push.jar" dest="${work.dir}">
+ <patternset>
+ <include name="VAADIN/vaadinPush.js" />
+ <include name="VAADIN/vaadinPush.debug.js" />
+ </patternset>
+ </unjar>
+ <unjar src="${lib.dir}/vaadin-server.jar" dest="${work.dir}">
+ <patternset>
+ <include name="VAADIN/vaadinBootstrap.js" />
+ </patternset>
+ </unjar>
+ </target>
+
+ <target name="build-zip" depends="unpack">
+ <echo>Building Liferay zip</echo>
+ <zip zipfile="${liferay.zip}">
+ <zipfileset dir="${work.dir}" />
+ </zip>
+ </target>
+
+ <target name="clean">
+ <antcall target="common.clean" />
+ </target>
+
+</project> \ No newline at end of file
diff --git a/liferay/ivy.xml b/liferay/ivy.xml
new file mode 100644
index 0000000000..fb6d152e15
--- /dev/null
+++ b/liferay/ivy.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
+ xmlns:m="http://ant.apache.org/ivy/maven">
+
+ <info organisation="com.vaadin" module="vaadin-liferay" revision="${vaadin.version}" />
+
+ <configurations>
+ <conf name="build" />
+ <conf name="build-provided" />
+ <conf name="deps" visibility="private" />
+ </configurations>
+
+ <publications>
+ <artifact type="zip" ext="zip" />
+ </publications>
+
+ <dependencies>
+ <dependency org="com.vaadin" name="vaadin-client-compiled"
+ rev="${vaadin.version}" conf="deps -> build" transitive="false"/>
+ <dependency org="com.vaadin" name="vaadin-themes"
+ rev="${vaadin.version}" conf="deps -> build" transitive="false"/>
+ <dependency org="com.vaadin" name="vaadin-push"
+ rev="${vaadin.version}" conf="deps -> build" transitive="false" />
+ <dependency org="com.vaadin" name="vaadin-server"
+ rev="${vaadin.version}" conf="deps -> build" transitive="false" />
+ </dependencies>
+
+</ivy-module>
o">.Run Vaadin Testbench Tests}" /> <!-- ================================================================== --> <!-- Configuration --> <!-- ================================================================== --> <!-- Browsers to use for testing --> <property name="browsers-windows" value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" /> <property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" /> <property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" /> <property name="browsers" value="${browsers-windows}" /> <!-- Number of times to retry a test if it fails --> <property name="retries" value="2" /> <!-- Screen shot base directory --> <fail unless="com.vaadin.testbench.screenshot.directory" message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." /> <!-- Screen shot resolution --> <property name="com.vaadin.testbench.screenshot.resolution" value="1500x850" /> <!-- Host running Testbench Hub --> <property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" /> <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" /> <property name="com.vaadin.testbench.debug" value="false" /> <target name="initialize"> <!-- classpath must include test bench jar and its dependencies --> <path id="classpath"> <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" /> </path> </target> <!-- fileset containing all TestBench tests to run --> <fileset dir="${test.xml.dir}" id="html-test-files"> <include name="src/**/*.html" /> <exclude name="integration-testscripts/**/*.html" /> </fileset> <!-- This target converts HTML tests files to java junit tests. One test file for each browser is created. --> <target name="create-tests" depends="initialize, remove-temp-testclasses"> <!-- Temporary output directory, created and removed by this script --> <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." /> <property name="class-dir" value="${test-output-dir}/classes" /> <pathconvert pathsep=" " property="testfiles" refid="html-test-files" /> <java classname="com.vaadin.testbench.util.TestConverter" classpathref="classpath" fork="true"> <sysproperty key="com.vaadin.testbench.test.retries" value="${retries}" /> <jvmarg value="-Duser.language=en" /> <jvmarg value="-Duser.country=US" /> <arg value="${test-output-dir}" /> <arg value="${browsers}" /> <arg line="${testfiles}" /> </java> </target> <!-- This target complies the generated java junit tests. --> <target name="compile-tests" depends="create-tests"> <mkdir dir="${class-dir}" /> <javac includeantruntime="false" srcdir="${test-output-dir}" destdir="${class-dir}" debug="on" fork="yes" failonerror="false" encoding="UTF8"> <classpath> <path refid="classpath" /> </classpath> </javac> </target> <!-- ================================================================== --> <!-- Running Tests --> <!-- ================================================================== --> <target name="check-parameters"> <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." /> <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined." /> </target> <target name="run-tb2-tests" depends="check-parameters,compile-tests"> <property name="report.qualifier" value="tb2" /> <property name="report.dir" location="${test.xml.dir}/result/reports-${report.qualifier}" /> <delete dir="${report.dir}" /> <mkdir dir="${report.dir}" /> <fileset dir="${test-output-dir}" id="tests-fileset"> <include name="**/**.java" /> </fileset> <antcontrib:for threadCount="30" parallel="true" keepgoing="true" param="target"> <path> <fileset refid="tests-fileset" /> </path> <sequential> <antcall target="execute-tests"> <param name="target" value="@{target}" /> <reference refid="classpath" /> </antcall> </sequential> </antcontrib:for> </target> <!-- This target runs the generated and compiled junit tests --> <target name="execute-tests"> <!-- Junit does not create the report dir so we need to ensure it exists --> <mkdir dir="${report.dir}" /> <junit fork="yes" showoutput="no" printsummary="no" maxmemory="96m"> <classpath> <path refid="classpath" /> <pathelement path="${class-dir}" /> </classpath> <formatter type="xml" /> <jvmarg value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" /> <jvmarg value="-Dcom.vaadin.testbench.deployment.url=${com.vaadin.testbench.deployment.url}" /> <!-- Define where the reference screenshots and diff files are saved --> <jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" /> <!-- Resolution for screenshots --> <jvmarg value="-Dcom.vaadin.testbench.screenshot.resolution=${com.vaadin.testbench.screenshot.resolution}" /> <jvmarg value="-Dcom.vaadin.testbench.debug=${com.vaadin.testbench.debug}" /> <jvmarg value="-Dcom.vaadin.testbench.screenshot.block.error=${com.vaadin.testbench.screenshot.block.error}" /> <jvmarg value="-Djava.awt.headless=true" /> <!-- true/false system arguments --> <jvmarg value="-Dcom.vaadin.testbench.screenshot.softfail=${com.vaadin.testbench.screenshot.softfail}" /> <jvmarg value="-Dcom.vaadin.testbench.screenshot.reference.debug=${com.vaadin.testbench.screenshot.reference.debug}" /> <jvmarg value="-Dcom.vaadin.testbench.screenshot.cursor=${com.vaadin.testbench.screenshot.cursor}" /> <batchtest todir="${report.dir}"> <filelist dir="${test-output-dir}" files="${target}" /> </batchtest> </junit> </target> <!-- Remove temporary source and compiled java files --> <target name="remove-temp-testclasses"> <delete failonerror="false"> <fileset dir="${test-output-dir}"> <include name="**/**.java" /> <include name="**/**.class" /> </fileset> </delete> </target> <!-- Remove old error screenshots --> <target name="remove-error-screens"> <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" /> <delete> <fileset dir="${com.vaadin.testbench.screenshot.directory}/errors"> <include name="**/**.*" /> </fileset> </delete> </target> <!-- ================================================================== --> <!-- Main Targets --> <!-- ================================================================== --> <!-- The default target. --> <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tb2-tests" /> <!-- Runs all TestBench 2 tests --> <target name="tb2-tests" unless="tests.tb2.skip"> <property name="test-output-dir" location="${test.xml.dir}/result/testbench-junit-classes" /> <property name="retries" value="2" /> <!-- Parameters for the test.xml script. --> <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." /> <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined." /> <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" /> <property name="com.vaadin.testbench.debug" value="false" /> <antcall inheritall="true" inheritrefs="true" target="run-tb2-tests" /> </target> </project>