]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7392 split manual build out from core build script - first step
authorHenri Sara <henri.sara@itmill.com>
Tue, 16 Aug 2011 06:48:36 +0000 (06:48 +0000)
committerHenri Sara <henri.sara@itmill.com>
Tue, 16 Aug 2011 06:48:36 +0000 (06:48 +0000)
svn changeset:20397/svn branch:6.7

build/build.xml
build/build_manual.xml [new file with mode: 0644]

index 2a7cf67105e2ec1074f510d1e413aeef1f673c40..8a052b1a895f39552088ad29c6a12a32ca61ea95 100644 (file)
             <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">
     <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 (file)
index 0000000..5f0f69c
--- /dev/null
@@ -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>