diff options
author | Henri Sara <henri.sara@itmill.com> | 2011-08-16 06:48:36 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2011-08-16 06:48:36 +0000 |
commit | 03d5062a779d382769f50dcd7f4a3ff492493e87 (patch) | |
tree | 08ced0fa8a07bb530d3fc38084535f11abbf5cbb /build | |
parent | f410abd96d887657293eae0a67d45962805d8db3 (diff) | |
download | vaadin-framework-03d5062a779d382769f50dcd7f4a3ff492493e87.tar.gz vaadin-framework-03d5062a779d382769f50dcd7f4a3ff492493e87.zip |
#7392 split manual build out from core build script - first step
svn changeset:20397/svn branch:6.7
Diffstat (limited to 'build')
-rw-r--r-- | build/build.xml | 70 | ||||
-rw-r--r-- | build/build_manual.xml | 86 |
2 files changed, 93 insertions, 63 deletions
diff --git a/build/build.xml b/build/build.xml index 2a7cf67105..8a052b1a89 100644 --- a/build/build.xml +++ b/build/build.xml @@ -203,9 +203,6 @@ <pathelement path="${lib-gwt-user}" /> <pathelement path="${lib-gwt-dev}" /> </path> - - <property name="docdir" value="${checkout-path}/docs"/> - <available file="${docdir}/manual/book.xml" property="manual.source.available"/> </target> <target name="internal-package-zip" depends="init"> @@ -806,68 +803,15 @@ <target name="docs" depends="init, javadoc, manual"> </target> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <!-- Manual: Build from external repository. --> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - <target name="manual-init" depends="init" if="manual.source.available"> - </target> - - <!-- Build manual. --> - <target name="manual-build" depends="manual-init" if="manual.source.available"> - <!-- The HTML and Eclipse Manual must be built with separate runs --> - <ant dir="${docdir}" antfile="build/build.xml" inheritAll="false"> - <property name="version" value="${version.full}"/> - </ant> - <ant dir="${docdir}" antfile="build/build.xml" target="manual-eclipse" inheritAll="false"> - <property name="version" value="${version.full}"/> + <target name="manual"> + <ant antfile="build/build_manual.xml" target="manual" inheritall="false" inheritrefs="false"> + <property name="version.full" value="${version.full}"/> + <property name="checkout-path" value="${checkout-path}" /> + <property name="result-path" value="${result-path}"/> + <property name="output-dir" value="${output-dir}"/> + <property name="product-file" value="${product-file}"/> </ant> </target> - - <!-- Copy the manual from sub Ant results to our output directory. --> - <target name="manual-copy" depends="manual-init" if="manual.source.available"> - <copy todir="${output-dir}/WebContent/docs"> - <fileset dir="${docdir}/build/result/package/WebContent/docs"> - <exclude name="**/.svn" /> - <include name="book-of-vaadin.pdf" /> - </fileset> - </copy> - </target> - - <!-- Package documentation in a documentation Zip package. --> - <!-- * Built Eclipse plugin is not included in this package. --> - <target name="manual-package" depends="manual-init, manual-copy" if="manual.source.available"> - <zip destfile="${result-path}/${product-file}-docs-${version.full}.zip"> - <zipfileset prefix="docs" dir="${result-path}/${base-name}/WebContent/docs"> - <patternset> - <include name="api/**" /> - <include name="book-of-vaadin.pdf" /> - <include name="example-source" /> - </patternset> - </zipfileset> - <zipfileset prefix="docs" dir="${docdir}/build/result/package/WebContent/docs"> - <patternset> - <include name="book/**" /> - <include name="tutorial/**" /> - <include name="vaadin-tutorial.pdf" /> - </patternset> - </zipfileset> - </zip> - </target> - - <!-- Publishes Eclipse plugin version of the manual as TeamCity artifacts. --> - <!-- These are actually published during manual build, but with wrong path. --> - <target name="manual-publish-eclipse" if="manual.source.available"> - <echo>##teamcity[publishArtifacts '${docdir}/build/result/package/eclipse/plugins/*.jar']</echo> - <echo>##teamcity[publishArtifacts '${docdir}/build/result/package/eclipse/features/*.jar']</echo> - </target> - - <target name="manual-source-not-available" unless="manual.source.available"> - <echo>Skipping Book of Vaadin build as it is not available in ${checkout-path}/docs</echo> - </target> - - <target name="manual" depends="init, manual-source-not-available, manual-init, manual-build, manual-copy, manual-package, manual-publish-eclipse"> - </target> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> diff --git a/build/build_manual.xml b/build/build_manual.xml new file mode 100644 index 0000000000..5f0f69c69c --- /dev/null +++ b/build/build_manual.xml @@ -0,0 +1,86 @@ +<?xml version="1.0"?> + +<project name="Book of Vaadin" basedir="../" default="manual"> + + <!-- Properties that need to be given by the caller: + output-dir, result-path, version.full, product-file, checkout-path, user.name and jarsigner.bin --> + + <target name="init"> + <!-- Create result dirs unless already exist --> + <mkdir dir="${output-dir}" /> + <mkdir dir="${output-dir}/WebContent" /> + <mkdir dir="${output-dir}/WebContent/docs" /> + <mkdir dir="${output-dir}/WebContent/docs/example-source" /> + + <property name="docdir" value="${checkout-path}/docs"/> + + <available file="${docdir}/manual/book.xml" property="manual.source.available"/> + </target> + + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- Manual: Build from external repository. --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <!-- Build manual. --> + <target name="manual-build" depends="init" if="manual.source.available"> + <!-- The HTML and Eclipse Manual must be built with separate runs --> + <ant dir="${docdir}" antfile="build/build.xml" inheritAll="false"> + <property name="result-path" value="build/result"/> + <property name="output-dir" value="build/result/package" /> + <property name="version" value="${version.full}"/> + </ant> + <ant dir="${docdir}" antfile="build/build.xml" target="manual-eclipse" inheritAll="false"> + <property name="result-path" value="build/result"/> + <property name="output-dir" value="build/result/package" /> + <property name="version" value="${version.full}"/> + </ant> + </target> + + <!-- Copy the manual from sub Ant results to our output directory. --> + <target name="manual-copy" depends="init" if="manual.source.available"> + <copy todir="${output-dir}/WebContent/docs"> + <fileset dir="${docdir}/build/result/package/WebContent/docs"> + <exclude name="**/.svn" /> + <include name="book-of-vaadin.pdf" /> + </fileset> + </copy> + </target> + + <!-- Package documentation in a documentation Zip package. --> + <!-- * Built Eclipse plugin is not included in this package. --> + <target name="manual-package" depends="init, manual-copy" if="manual.source.available"> + <zip destfile="${result-path}/${product-file}-docs-${version.full}.zip"> + <zipfileset prefix="docs" dir="${output-dir}/WebContent/docs"> + <patternset> + <!-- FIXME --> + <include name="api/**" /> + <include name="book-of-vaadin.pdf" /> + <include name="example-source" /> + </patternset> + </zipfileset> + <zipfileset prefix="docs" dir="${docdir}/build/result/package/WebContent/docs"> + <patternset> + <!-- FIXME --> + <include name="book/**" /> + <include name="tutorial/**" /> + <include name="vaadin-tutorial.pdf" /> + </patternset> + </zipfileset> + </zip> + </target> + + <!-- Publishes Eclipse plugin version of the manual as TeamCity artifacts. --> + <!-- These are actually published during manual build, but with wrong path. --> + <target name="manual-publish-eclipse" if="manual.source.available"> + <echo>##teamcity[publishArtifacts '${docdir}/build/result/package/eclipse/plugins/*.jar']</echo> + <echo>##teamcity[publishArtifacts '${docdir}/build/result/package/eclipse/features/*.jar']</echo> + </target> + + <target name="manual-source-not-available" unless="manual.source.available"> + <echo>Skipping Book of Vaadin build as it is not available in ${checkout-path}/docs</echo> + </target> + + <target name="manual" depends="init, manual-source-not-available, manual-build, manual-copy, manual-package, manual-publish-eclipse"> + </target> + +</project> |