]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7381 Some build script cleanup, removed unnecessary files from test WAR
authorHenri Sara <henri.sara@itmill.com>
Thu, 18 Aug 2011 07:54:50 +0000 (07:54 +0000)
committerHenri Sara <henri.sara@itmill.com>
Thu, 18 Aug 2011 07:54:50 +0000 (07:54 +0000)
svn changeset:20452/svn branch:6.7

build/bin/package-diff.py
build/build.properties
build/build.xml

index 2add68695e93402240da1ab3d8b0c3441e01a2a7..c8cb63a7ed87fdc5338aabd1bbb31b56d7d2014a 100755 (executable)
@@ -103,7 +103,7 @@ except OSError:
 
 # List files in built version.
 builtversion = sys.argv[1]
-builtpackage = "build/result/vaadin-%s/WebContent/vaadin-%s.jar" % (builtversion, builtversion)
+builtpackage = "build/result/vaadin-%s/WebContent/WEB-INF/lib/vaadin-%s.jar" % (builtversion, builtversion)
 
 # Report differences
 
index 281a7acb6b166644dfa62346a8f8d4666d4b8a3f..82378c6dac59d0a306adc0e9b387fb4c19a6b29c 100644 (file)
@@ -3,6 +3,17 @@ checkout-path=build/checkout
 product-file=vaadin
 product-name=Vaadin
 toolkit-package=com/vaadin
-eclipse-workspace-name=vaadin-examples
-eclipse-launch-vmargs=-Xms256M -Xmx512M
 gwt-dir=lib/core/gwt
+
+# repository into which Maven snapshots should be published 
+snapshot.repository.url=http://oss.sonatype.org/content/repositories/vaadin-snapshots
+
+# These are required when compiling WebContent/VAADIN/widgetsets (and also
+# Java server-side classes).
+# Using special -noservlet packages to be able to use a different version of
+# the servlet specification than what the GWT JARs include.
+lib-gwt-dev=${gwt-dir}/gwt-dev-noservlet.jar
+lib-gwt-user=${gwt-dir}/gwt-user-noservlet.jar
+# FIXME: Should use ${gwt-version-dependencies}
+lib-gwt-validation=${gwt-dir}/validation-api-1.0.0.GA.jar
+lib-gwt-validation-src=${gwt-dir}/validation-api-1.0.0.GA-sources.jar
index 4e00d0248ca6879fd1f0dd8dcab4b084a3adea99..8bcbf228f9c97ce1c1705189a5428b9fd21da6a5 100644 (file)
@@ -15,7 +15,7 @@
     <target name="package-war" depends="clean-result, init, build, docs, internal-package-war, differences">
     </target>
 
-    <target name="package-liferay-zip" depends="clean-result, init, build, docs, internal-package-liferay, differences">
+    <target name="package-liferay-zip" depends="clean-result, init, build, internal-package-liferay">
     </target>
 
     <!-- Locations of Ant task JARs - build properties not yet read at this point -->
     <!-- ================================================================== -->
 
     <target name="init" depends="check-java-version">
-        <property file="build/build.properties" />
-        <property file="build/VERSION.properties" />
-       <antcontrib:propertyregex property="version.major" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1"/>
-       <antcontrib:propertyregex property="version.minor" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2"/>
-       <antcontrib:propertyregex property="version.revision" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3"/>
-
-        <property file="build/GWT-VERSION.properties" />
-        <property file="build/html-style.properties" />
-
-       <property name="snapshot.repository.url" value="http://oss.sonatype.org/content/repositories/vaadin-snapshots" />
-
         <!-- Current timestamp in different formats. -->
         <tstamp>
             <format property="build.date" pattern="yyyy-MM-dd"/>
             <format property="build.date.compact" pattern="yyyyMMdd"/>
         </tstamp>
 
+        <property file="build/VERSION.properties" />
+        <property file="build/GWT-VERSION.properties" />
+
+       <antcontrib:propertyregex property="version.major" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1"/>
+       <antcontrib:propertyregex property="version.minor" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2"/>
+       <antcontrib:propertyregex property="version.revision" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3"/>
+
         <!-- Default full version name. -->
         <!-- Nightly and other TeamCity builds will define their own. -->
         <property name="version.full" value="${version}.dev-${build.date.compact}"/>
         <echo>Base Version: ${version}</echo>
         <echo>Full Version: ${version.full}</echo>
 
+       <!-- Other properties -->
+        <property file="build/build.properties" />
+        <property file="build/html-style.properties" />
+
         <echo>Vaadin package is: ${toolkit-package}</echo>
 
         <!-- Create result dir unless already exists -->
         <mkdir dir="${result-path}" />
 
-        <!-- required when compiling WebContent/VAADIN/widgetsets (and also Java server-side classes) -->
-        <property name="lib-gwt-dev" location="${gwt-dir}/gwt-dev-noservlet.jar" />
-        <property name="lib-gwt-user" location="${gwt-dir}/gwt-user-noservlet.jar" />
-       <!-- FIXME: Should use ${gwt-version-dependencies} -->
-        <property name="lib-gwt-validation" location="${gwt-dir}/validation-api-1.0.0.GA.jar" />
-        <property name="lib-gwt-validation-src" location="${gwt-dir}/validation-api-1.0.0.GA-sources.jar" />
-
         <echo>We are using gwt version ${gwt-version}.</echo>
 
         <!-- Destination files -->
         <property name="lib-jar-name" value="${base-name}.jar" />
         <property name="lib-sources-jar-name" value="${base-name}-sources.jar" />
         <property name="lib-javadoc-jar-name" value="${base-name}-javadoc.jar" />
+       <property name="test-war-filename" value="${product-file}-tests-${version.full}.war"/>
 
         <echo message="Prepared to build ${product-file} version ${version.full} packages" />
 
         <!-- Add the files. -->
         <antcall target="add-test-war-files" inheritAll="true" inheritRefs="true" />
 
-       <property name="test-war-filename" value="${product-file}-tests-${version.full}.war"/>
-
         <war warfile="${result-path}/${test-war-filename}"> 
             <fileset dir="${output-dir}/WebContent">
                <!-- Already in JAR -->
                 <exclude name="themes/runo/**/*" />
                 <exclude name="themes/reindeer/**/*" />
                 <exclude name="widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/**/*" />
+
+               <!-- Not needed for testing -->
+                <exclude name="docs/**/*" />
+                <exclude name="docs" />
                
                 <include name="**/*" />
             </fileset>
 
     <!-- Definitions for building local components, i.e., not for an installation package. -->
     <target name="init-nonpackage">
-        <property file="build/build.properties" />
         <property file="build/VERSION.properties" />
         <property file="build/GWT-VERSION.properties" />
 
+        <property file="build/build.properties" />
+
         <!-- Definitions for building the client-side. -->
         <property name="widgetsets-output-dir" value="WebContent/VAADIN/widgetsets" />
 
-        <!-- required when compiling WebContent/VAADIN/widgetsets (and also Java server-side classes) -->
-        <property name="lib-gwt-dev" location="${gwt-dir}/gwt-dev.jar" />
-        <property name="lib-gwt-user" location="${gwt-dir}/gwt-user.jar" />
-
         <echo>We are using ${lib-gwt-dev}.</echo>
         <echo>Widget sets output dir: ${widgetsets-output-dir}</echo>
     </target>
             </classpath>
         </java>
        
-        <copy file="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" tofile="${output-dir}/WebContent/${lib-jar-name}" />
         <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo>
     </target>
 
     </target>
 
        <target name="manual">
+       <!-- Only pass the necessary properties -->
         <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 file="${build.properties.file}" />
                                <property name="version" value="${vaadin.version}"/>
                        <property name="version.full" value="${version}-${build.date.compact}"/>
-                               <!-- <property name="compile.only.default-widgetset" value="1"/> -->
                        </then>
-                       <!-- Otherwise version and snapshot.repository.url come from target "init" -->
+                       <!-- Otherwise version is set by the target "init" -->
                </antcontrib:if>
        </target>
 
     <!-- Copies the nightly build artifacts to the download server. -->
     <target name="nightly-download-publish" if="nightly.publish">
         <!-- Publish to the download server. -->
-        <echo>Installing ${output-dir}/WebContent/${lib-jar-name} to ${nightly.publish}</echo>
+        <echo>Installing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to ${nightly.publish}</echo>
         <echo>Hopefully you have permissions for the copy operation with SSH.</echo>
 
+       <!-- FIXME tries to publish a ZIP; how does the download site handle these? -->
         <property name="package.filename" value="${result-path}/${base-name}.zip"/>
 
         <!-- Copy the linux installation package and the JAR. -->
         <exec executable="scp" searchpath="true" resultproperty="nightly.install.scp.result">
             <arg value="-B"/>
-            <arg value="${output-dir}/WebContent/${lib-jar-name}"/>
+            <arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/>
             <arg value="${package.filename}"/>
             <arg value="${nightly.publish}"/>
         </exec>
     <target name="nightly-maven-publish" depends="nightly-maven-pom.xml">
         <property file="${gpg.passphrase.file}" />
 
-        <echo>Publishing ${output-dir}/WebContent/${lib-jar-name} to Maven repository</echo>
+        <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to Maven repository</echo>
        <artifact:mvn>
             <arg value="gpg:sign-and-deploy-file"/>
             <!-- .. is a workaround as maven runs in the build directory -->
-            <sysproperty key="file" value="../${output-dir}/WebContent/${lib-jar-name}" />
+            <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" />
             <sysproperty key="pomFile" value="maven/pom.xml" />
             <sysproperty key="repositoryId" value="vaadin-snapshots" />
             <sysproperty key="url" value="${snapshot.repository.url}" />
     </target>
        
     <target name="local-maven-publish" depends="local-maven-pom.xml">
-        <echo>Publishing ${output-dir}/WebContent/${lib-jar-name} to the local Maven repository</echo>
+        <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to the local Maven repository</echo>
        <artifact:mvn>
             <arg value="install:install-file"/>
             <!-- .. is a workaround as maven runs in the build directory -->
-            <sysproperty key="file" value="../${output-dir}/WebContent/${lib-jar-name}" />
+            <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" />
             <sysproperty key="pomFile" value="maven/pom.xml" />
         </artifact:mvn>
     </target>