diff options
author | Artur Signell <artur@vaadin.com> | 2015-01-15 09:01:35 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2015-01-15 10:33:19 +0200 |
commit | 3f46830b28100ed918570bf46523c592580643be (patch) | |
tree | 5e1fefd231f210231a09d6a29a51757e6e0b59b2 | |
parent | 8361d1379c49ef5ce03d329d4e5fdcf63579e652 (diff) | |
download | vaadin-framework-3f46830b28100ed918570bf46523c592580643be.tar.gz vaadin-framework-3f46830b28100ed918570bf46523c592580643be.zip |
Fix release build
Change-Id: Ie915aeb31aff7a0c2f655ad9b54e00a582770984
-rw-r--r-- | all/build.xml | 13 | ||||
-rw-r--r-- | buildhelpers/build.xml | 120 | ||||
-rw-r--r-- | buildhelpers/ivy.xml | 4 | ||||
-rw-r--r-- | client-compiled/build.xml | 5 | ||||
-rw-r--r-- | common.xml | 155 | ||||
-rw-r--r-- | uitest/build.xml | 5 |
6 files changed, 140 insertions, 162 deletions
diff --git a/all/build.xml b/all/build.xml index 647ec3c970..37f728e529 100644 --- a/all/build.xml +++ b/all/build.xml @@ -41,14 +41,11 @@ </target> <target name="javadoc" depends="copy-jars"> - <!-- Ensure filtered webcontent files are available --> - <antcall target="common.filter.webcontent" /> - <antcontrib:if> <isset property="nojavadoc" /> <then> <jar file="${javadoc.jar}" compress="true"> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> </jar> </then> <else> @@ -83,7 +80,7 @@ <!-- Create a javadoc jar --> <jar file="${javadoc.jar}" compress="true"> <fileset dir="${javadoc.dir}" /> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> </jar> </else> </antcontrib:if> @@ -105,9 +102,6 @@ </target> <target name="zip" depends="copy-jars, javadoc"> - <!-- Ensure filtered webcontent files are available --> - <antcall target="common.filter.webcontent" /> - <zip destfile="${zip.file}"> <fileset dir="${temp.dir}"> <!-- Avoid conflicts with servlet and portlet API. They are @@ -121,9 +115,8 @@ <exclude name="*.pom" /> <exclude name="*-javadoc.jar" /> <exclude name="*-sources.jar" /> - </fileset> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> <fileset dir="${result.dir}/.."> <include name="README.TXT" /> </fileset> diff --git a/buildhelpers/build.xml b/buildhelpers/build.xml index c8121325fe..05b8c8397f 100644 --- a/buildhelpers/build.xml +++ b/buildhelpers/build.xml @@ -1,6 +1,7 @@ <?xml version="1.0"?> -<project name="vaadin-buildhelpers" basedir="." default="publish-local"> +<project name="vaadin-buildhelpers" basedir="." default="publish-local" + xmlns:ivy="antlib:org.apache.ivy.ant"> <description> Compiles build helpers used when building other modules. @@ -13,17 +14,26 @@ <property name="result.dir" location="result" /> <path id="classpath.compile.custom" /> - <target name="jar"> - <antcall target="common.jar"> - <reference torefid="extra.jar.includes" refid="empty.reference" /> - </antcall> + <property name="filtered.webcontent.dir" location="${result.dir}/WebContent" /> + <property name="release-notes-tickets-file" location="${result.dir}/release-notes-tickets.html" /> + <property name="release-notes-authors-file" location="${result.dir}/release-notes-authors.html" /> + + <target name="jar" depends="filter.webcontent"> + <antcall target="common.compile" /> + <property name="result.jar" + location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" /> + <property name="classes" location="${result.dir}/classes" /> + <property name="src" location="${result.dir}/../src" /> + + <jar destfile="${result.jar}" duplicate="fail" index="true"> + <fileset dir="${classes}" excludes="${classes.exclude}" + erroronmissingdir="false" /> + <fileset dir="${filtered.webcontent.dir}/.." + includes="WebContent/**" /> + </jar> </target> <target name="publish-local" depends="jar"> - <antcall target="common.sources.jar"> - <reference torefid="extra.jar.includes" refid="empty.reference" /> - </antcall> - <antcall target="common.javadoc.jar" /> <antcall target="common.publish-local" /> </target> @@ -31,32 +41,96 @@ <antcall target="common.clean" /> </target> - <target name="checkstyle"> - <antcall target="common.checkstyle"> - <param name="cs.src" location="src" /> - </antcall> + <target name="filter.webcontent" + depends="fetch-release-notes-tickets,fetch-release-notes-authors"> + <!-- Running without build.release-notes will cause an error, which + is ignored --> + <loadfile property="release-notes-tickets" srcFile="${release-notes-tickets-file}" + failonerror="false" /> + <loadfile property="release-notes-authors" srcFile="${release-notes-authors-file}" + failonerror="false" /> + + <delete dir="${filtered.webcontent.dir}" /> + <copy todir="${filtered.webcontent.dir}"> + <fileset dir="${vaadin.basedir}/WebContent"> + <include name="img/**" /> + </fileset> + </copy> + <copy todir="${filtered.webcontent.dir}"> + <fileset dir="${vaadin.basedir}/WebContent"> + <patternset> + <include name="release-notes.html" /> + <include name="license.html" /> + <include name="licenses/**" /> + <include name="css/**" /> + </patternset> + </fileset> + <filterchain> + <expandproperties /> + <replacetokens begintoken="@" endtoken="@"> + <token key="version" value="${vaadin.version}" /> + </replacetokens> + <replacetokens begintoken="@" endtoken="@"> + <token key="version-minor" + value="${vaadin.version.major}.${vaadin.version.minor}" /> + </replacetokens> + <replacetokens begintoken="@" endtoken="@"> + <token key="builddate" value="${build.date}" /> + </replacetokens> + <replacetokens begintoken="@" endtoken="@"> + <token key="release-notes-tickets" value="${release-notes-tickets}" /> + </replacetokens> + <replacetokens begintoken="@" endtoken="@"> + <token key="release-notes-authors" value="${release-notes-authors}" /> + </replacetokens> + </filterchain> + </copy> </target> - <target name="fetch-release-notes-tickets"> - <antcall target="common.exec-buildhelper"> + + <target name="fetch-release-notes-tickets" if="build.release-notes"> + <mkdir dir="${filtered.webcontent.dir}" /> + <antcall target="exec-buildhelper"> <param name="main.class" value="com.vaadin.buildhelpers.FetchReleaseNotesTickets" /> - <param name="output" value="${output}" /> - <param name="src" value="src" /> + <param name="output" location="${release-notes-tickets-file}" /> </antcall> </target> - <target name="fetch-release-notes-authors"> + <target name="fetch-release-notes-authors" if="build.release-notes"> <copy file="src/com/vaadin/buildhelpers/authormap.properties" - tofile="result/classes/com/vaadin/buildhelpers/authormap.properties" /> - <antcall target="common.exec-buildhelper"> + tofile="${result.dir}/classes/com/vaadin/buildhelpers/authormap.properties" /> + + <mkdir dir="${filtered.webcontent.dir}" /> + <antcall target="exec-buildhelper"> <param name="main.class" value="com.vaadin.buildhelpers.FetchReleaseNotesAuthors" /> - <param name="output" value="${output}" /> - <param name="src" value="src" /> + <param name="output" location="${release-notes-authors-file}" /> </antcall> <delete - file="result/classes/com/vaadin/buildhelpers/authormap.properties" /> + file="${result.dir}/classes/com/vaadin/buildhelpers/authormap.properties" /> + </target> + + <target name="exec-buildhelper"> + <antcall target="common.compile" /> + <fail unless="main.class" message="No main class given in 'main.class'" /> + <fail unless="output" message="No output file given in 'output'" /> + <ivy:resolve log="download-only" conf="build" /> + <ivy:cachepath pathid="deps" /> + <java classname="${main.class}" output="${output}" + failonerror="true" fork="yes"> + <classpath> + <pathelement location="${result.dir}/classes" /> + </classpath> + <classpath refid="deps" /> + <jvmarg value="-Dvaadin.version=${vaadin.version}" /> + </java> + </target> + + <target name="checkstyle"> + <antcall target="common.checkstyle"> + <param name="cs.src" location="src" /> + </antcall> </target> <target name="test" depends="checkstyle"> diff --git a/buildhelpers/ivy.xml b/buildhelpers/ivy.xml index cf04bfdc5d..8053328b54 100644 --- a/buildhelpers/ivy.xml +++ b/buildhelpers/ivy.xml @@ -21,10 +21,6 @@ </configurations> <publications> <artifact type="jar" /> - <artifact type="source" ext="jar" m:classifier="sources" /> - <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> - <artifact type="pom" ext="pom" /> - </publications> <dependencies> <!-- client-compiler, server and uitest also use commons-io --> diff --git a/client-compiled/build.xml b/client-compiled/build.xml index 3c780c280b..fb4f26bc73 100644 --- a/client-compiled/build.xml +++ b/client-compiled/build.xml @@ -112,15 +112,12 @@ </target> <target name="client-compiled-cache.jar" depends="default-widgetset-cache"> - <!-- Ensure filtered webcontent files are available --> - <antcall target="common.filter.webcontent" /> - <jar file="${compiled-cache.jar}" compress="true"> <fileset dir="${gwtar.dir}"> <include name="**/*.gwtar" /> </fileset> <union refid="client-compiled-cache.gwt.includes" /> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> </jar> </target> diff --git a/common.xml b/common.xml index 4f7d0e4f62..8c2919972d 100644 --- a/common.xml +++ b/common.xml @@ -30,83 +30,11 @@ <union id="empty.reference" /> - <property name="filtered.webcontent.dir" location="${vaadin.basedir}/result/filteredWebContent" /> - <property name="release-notes-tickets-file" location="${vaadin.basedir}/result/release-notes-tickets.html" /> - <property name="release-notes-authors-file" location="${vaadin.basedir}/result/release-notes-authors.html" /> - - <target name="filter.webcontent" unless="webcontent.filtered" depends="fetch-release-notes-tickets,fetch-release-notes-authors"> - <property name="webcontent.filtered" value="true" /> - <!-- Running without build.release-notes will cause an error, which - is ignored --> - <loadfile property="release-notes-tickets" srcFile="${release-notes-tickets-file}" failonerror="false" /> - <loadfile property="release-notes-authors" srcFile="${release-notes-authors-file}" failonerror="false" /> - - <delete dir="${filtered.webcontent.dir}" /> - <copy todir="${filtered.webcontent.dir}"> - <fileset dir="${vaadin.basedir}/WebContent"> - <include name="img/**" /> - </fileset> - </copy> - <copy todir="${filtered.webcontent.dir}"> - <fileset dir="${vaadin.basedir}/WebContent"> - <patternset> - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="licenses/**" /> - <include name="css/**" /> - </patternset> - </fileset> - <filterchain> - <expandproperties /> - <replacetokens begintoken="@" endtoken="@"> - <token key="version" value="${vaadin.version}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="version-minor" value="${vaadin.version.major}.${vaadin.version.minor}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="builddate" value="${build.date}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="release-notes-tickets" value="${release-notes-tickets}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="release-notes-authors" value="${release-notes-authors}" /> - </replacetokens> - </filterchain> - </copy> - </target> - - <target name="fetch-release-notes-tickets" unless="built.release-notes-tickets" if="build.release-notes"> - <mkdir dir="${vaadin.basedir}/result" /> - <subant buildpath="${vaadin.basedir}/buildhelpers" target="fetch-release-notes-tickets" antfile="build.xml" inheritall="true"> - <property name="output" location="${release-notes-tickets-file}" /> - </subant> - <property name="built.release-notes-tickets" value="1" /> - </target> - - <target name="fetch-release-notes-authors" unless="built.release-notes-authors" if="build.release-notes"> - <mkdir dir="${vaadin.basedir}/result" /> - <subant buildpath="${vaadin.basedir}/buildhelpers" target="fetch-release-notes-authors" antfile="build.xml" inheritall="true"> - <property name="output" location="${release-notes-authors-file}" /> - </subant> - <property name="built.release-notes-authors" value="1" /> - </target> - - <fileset dir="${filtered.webcontent.dir}" id="common.files.for.all.jars"> - <patternset> - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="licenses/**" /> - <include name="css/**" /> - <include name="img/**" /> - </patternset> - </fileset> - - <target name="pom.xml" description="Generates a pom.xml based on the Ivy configuration. Either for a snapshot or a release version" depends="pom.xml.release,pom.xml.snapshot"> </target> + <property name="common.jarfiles.dir" location="${vaadin.basedir}/buildhelpers/result/WebContent" /> + <target name="pom.xml.release" if="build.release"> <fail unless="result.dir" message="No result.dir parameter given" /> <property name="ivy.xml" location="${result.dir}/../ivy.xml" /> @@ -141,7 +69,7 @@ </target> - <target name="sources.jar" depends="compile, filter.webcontent"> + <target name="sources.jar" depends="compile"> <fail unless="result.dir" message="No result.dir parameter given" /> <fail unless="module.name" message="No module.name parameter given" /> <fail unless="src" message="No src directory parameter given" /> @@ -155,7 +83,7 @@ <include name="**/*.properties" /> </patternset> </fileset> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> <restrict> <union refid="extra.jar.includes" /> <name name="*.java" /> @@ -164,8 +92,8 @@ </target> - <target name="javadoc.jar" depends="dependencies, filter.webcontent"> - <fail unless="result.dir" message="No result.dir parameter given" /> + <target name="javadoc.jar" depends="dependencies"> + <fail unless="result.dir" message="No result.dir parameter given" /> <fail unless="module.name" message="No module.name parameter given" /> <property name="src" location="{$result.dir}/../src" /> <property name="javadoc.dir" value="${result.dir}/javadoc" /> @@ -178,34 +106,34 @@ out without using conf attribute. Using conf would make internal dependency resolution unnecessary complicated. --> - <isset property="nojavadoc" /> - <then> + <isset property="nojavadoc" /> + <then> <jar file="${javadoc.jar}" compress="true"> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> </jar> - </then> + </then> <else> - <javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${module.name}"> - <packageset dir="${src}" excludes="${classes.exclude}" /> - - <doctitle><h1>${module.name}</h1></doctitle> - <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> --> - <bottom>${javadoc.bottom}</bottom> - <link offline="true" href="http://docs.oracle.com/javase/6/docs/api/" packagelistLoc="build/javadoc/j2se-1.6.0" /> - <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" /> - <classpath refid="classpath.compile.dependencies" /> - </javadoc> - - <!-- Create a javadoc jar --> - <jar file="${javadoc.jar}" compress="true"> - <fileset dir="${javadoc.dir}" /> - <fileset refid="common.files.for.all.jars" /> - </jar> + <javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${module.name}"> + <packageset dir="${src}" excludes="${classes.exclude}" /> + + <doctitle><h1>${module.name}</h1></doctitle> + <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> --> + <bottom>${javadoc.bottom}</bottom> + <link offline="true" href="http://docs.oracle.com/javase/6/docs/api/" packagelistLoc="build/javadoc/j2se-1.6.0" /> + <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" /> + <classpath refid="classpath.compile.dependencies" /> + </javadoc> + + <!-- Create a javadoc jar --> + <jar file="${javadoc.jar}" compress="true"> + <fileset dir="${javadoc.dir}" /> + <fileset dir="${common.jarfiles.dir}" /> + </jar> </else> </antcontrib:if> </target> - <target name="jar" depends="compile, pom.xml, filter.webcontent"> + <target name="jar" depends="compile, pom.xml"> <fail unless="result.dir" message="No result.dir parameter given" /> <fail unless="module.name" message="No module.name parameter given" /> @@ -214,9 +142,9 @@ <property name="src" location="{$result.dir}/../src" /> <union id="jar.files"> - <fileset dir="${classes}" excludes="${classes.exclude}" erroronmissingdir="false"/> + <fileset dir="${classes}" excludes="${classes.exclude}" erroronmissingdir="false" /> <fileset dir="${src}" excludes="${jar.exclude}" erroronmissingdir="false" /> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> <union refid="extra.jar.includes" /> </union> @@ -291,11 +219,14 @@ </then> </antcontrib:if> + <ivy:resolve inline="true" organisation="com.vaadin" module="vaadin-buildhelpers" revision="${vaadin.version}" keep="true" /> + <ivy:cachepath pathid="buildhelpers.classpath" /> + <!-- Generate the Export-Package attribute in the manifest --> <java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes"> <arg value="${jar}" /> <arg line="com/vaadin com/google ${osgi.extra.package.prefixes}" /> - <classpath refid="vaadin.buildhelpers.classpath" /> + <classpath refid="buildhelpers.classpath" /> <jvmarg value="-Dvaadin.version=${vaadin.version}" /> </java> </target> @@ -308,20 +239,10 @@ <classpath refid="classpath.compile.custom" /> </javac> <copy todir="${classes}"> - <fileset dir="${src}" includes="${extra.classes}"/> + <fileset dir="${src}" includes="${extra.classes}" /> </copy> </target> - <target name="exec-buildhelper" depends="compile"> - <fail unless="main.class" message="No main class given in 'main.class'" /> - <fail unless="output" message="No output file given in 'output'" /> - <java classname="${main.class}" output="${output}" failonerror="true" fork="yes"> - <classpath refid="vaadin.buildhelpers.classpath" /> - <classpath refid="classpath.compile.dependencies" /> - <jvmarg value="-Dvaadin.version=${vaadin.version}" /> - </java> - </target> - <target name="directories"> <property name="result.dir" location="result" /> <property name="src" location="${result.dir}/../src" /> @@ -380,10 +301,10 @@ <!-- Copy resources --> <copy todir="${test.classes}" failonerror="false"> <fileset dir="${test.resources}" /> - <!-- include html templates used in declarative tests --> - <fileset dir="${test.src}"> - <include name="**/*.html"/> - </fileset> + <!-- include html templates used in declarative tests --> + <fileset dir="${test.src}"> + <include name="**/*.html" /> + </fileset> </copy> </target> diff --git a/uitest/build.xml b/uitest/build.xml index 246720e2c5..e6c68a90aa 100644 --- a/uitest/build.xml +++ b/uitest/build.xml @@ -131,11 +131,8 @@ <fileset dir="${deps.dir}" includes="servlet-api-*.jar" /> </delete> - <!-- Ensure filtered webcontent files are available --> - <antcall target="common.filter.webcontent" /> - <war destfile="${result.war}" duplicate="fail" index="true"> - <fileset refid="common.files.for.all.jars" /> + <fileset dir="${common.jarfiles.dir}" /> <fileset dir="${result.dir}"> <include name="VAADIN/widgetsets/**/*" /> <include name="VAADIN/themes/tests-valo*/**" /> |