diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-04-20 14:43:39 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-04-20 14:43:39 +0000 |
commit | 3246c32a1237b82f6353f65d2eadc612225c2e2f (patch) | |
tree | 5d0f741df494bee4990e4bd05bb04dca9c8326de /build | |
parent | 30850c74c0cacdb71fcf40f23c4432670e2f1b9d (diff) | |
download | vaadin-framework-3246c32a1237b82f6353f65d2eadc612225c2e2f.tar.gz vaadin-framework-3246c32a1237b82f6353f65d2eadc612225c2e2f.zip |
Merged -javadoc and -sources jar fixes
svn changeset:12716/svn branch:6.4
Diffstat (limited to 'build')
-rw-r--r-- | build/build.xml | 90 |
1 files changed, 71 insertions, 19 deletions
diff --git a/build/build.xml b/build/build.xml index d3b8f02370..8aff2ab906 100644 --- a/build/build.xml +++ b/build/build.xml @@ -12,13 +12,13 @@ <target name="package-zip" depends="clean-all, package-init, init, build, docs, internal-package-zip"> </target> - <target name="package-jar" depends="clean-result, package-init, init, libs" description="Create vaadin-x.y.z.jar file."> + <target name="package-jar" depends="clean-result, package-init, init, vaadin.jar" description="Create vaadin-x.y.z.jar file."> </target> <!-- Compiles only the default widgetset. --> <target name="package-jar-quick" depends="clean-result, package-init, init" description="Create vaadin-x.y.z.jar file quick."> <property name="compile.only.default-widgetset" value="1"/> - <antcall target="libs"/> + <antcall target="vaadin.jar"/> </target> <target name="package-war" depends="clean-result, package-init, init, build, docs, internal-package-zip, internal-package-war"> @@ -150,12 +150,15 @@ <echo>We are using gwt version ${gwt-version}.</echo> <!-- Destination files --> - <property name="lib-jar-name" value="${product-file}-${version.full}.jar" /> + <property name="base-name" value="${product-file}-${version.full}" /> + <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" /> <echo message="Prepared to build ${product-file} version ${version.full} packages" /> <!-- Output directory --> - <property name="output-dir" value="${result-path}/${product-file}-${version.full}" /> + <property name="output-dir" value="${result-path}/${base-name}" /> <mkdir dir="${output-dir}" /> <!-- Where widgetsets are written to. --> @@ -206,13 +209,13 @@ <target name="internal-package-zip"> <antcontrib:var name="eclipse-launch-vmargs" value="-Xms256M -Xmx512M" /> <antcall target="add-misc-files" inheritAll="true" inheritRefs="true" /> - <zip zipfile="${result-path}/${product-file}-${version.full}.zip"> - <zipfileset prefix="${product-file}-${version.full}" dir="${result-path}/${product-file}-${version.full}"> + <zip zipfile="${result-path}/${base-name}.zip"> + <zipfileset prefix="${base-name}" dir="${result-path}/${base-name}"> <patternset> <include name="**/*" /> </patternset> </zipfileset> - <zipfileset prefix="${product-file}-${version.full}/gwt" dir="${gwt-dir}"> + <zipfileset prefix="${base-name}/gwt" dir="${gwt-dir}"> <patternset> <include name="**/*" /> <exclude name="doc**"/> @@ -251,7 +254,7 @@ <!-- We assume the needed files are put in place by internal-package-war --> <echo>Building Liferay zip</echo> - <zip zipfile="${result-path}/${product-file}-${version.full}-liferay.zip"> + <zip zipfile="${result-path}/${base-name}-liferay.zip"> <zipfileset prefix="VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet" dir="${output-dir}/WebContent/VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet"> <patternset> <include name="**/*" /> @@ -269,7 +272,7 @@ </zip> - <echo>##teamcity[publishArtifacts '${result-path}/${product-file}-${version.full}-liferay.zip']</echo> + <echo>##teamcity[publishArtifacts '${result-path}/${base-name}-liferay.zip']</echo> </target> <target name="add-misc-files"> @@ -379,12 +382,12 @@ </target> <!-- Build server-side, client-side, libraries, and demos. --> - <!-- The client-side needs to be built before libs, because the libs --> + <!-- The client-side needs to be built before vaadin.jar, because the vaadin.jar --> <!-- require the default widgetset and doing otherwise would build it twice. --> <!-- However, since compiling the server-side is required by the client-side --> <!-- compilation, the server-side will actually be built before it. --> <target name="build" - depends="compile-server-side, compile-client-side, libs, demo" + depends="compile-server-side, compile-client-side, vaadin.jar, vaadin-sources.jar, demo" description="Build package required files, without packing them."> </target> @@ -772,9 +775,9 @@ <!-- specifically on it, because dependence does not see compiled --> <!-- individual widgetsets, because antcall does not fulfill --> <!-- dependencies. --> - <target name="libs" depends="compile-server-side, compile-client-side"> - <echo>Creating libs (server-side) ${lib-jar-name}</echo> - <!-- Create Toolkit JAR --> + <target name="vaadin.jar" depends="compile-server-side, compile-client-side"> + <echo>Creating JAR (server-side) ${lib-jar-name}</echo> + <!-- Create Vaadin JAR --> <mkdir dir="${output-dir}/META-INF"/> <echo file="${output-dir}/META-INF/VERSION">${version.full}</echo> <echo file="${output-dir}/META-INF/GWT-VERSION">${gwt-version}</echo> @@ -815,8 +818,19 @@ <copy file="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" tofile="${output-dir}/WebContent/${lib-jar-name}" /> </target> + <target name="vaadin-sources.jar" depends="init"> + <jar file="${result-path}/${lib-sources-jar-name}" compress="true"> + <fileset dir="${result-path}/src/core"> + <patternset> + <exclude name="${toolkit-package}/launcher/**" /> + <include name="**/*.java" /> + </patternset> + </fileset> + </jar> + </target> + <!-- Demos - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <target name="demo" depends="libs"> + <target name="demo" depends="vaadin.jar"> <echo>Building demos</echo> <echo>Adding demo class files.</echo> <copy todir="${output-dir}/WebContent/WEB-INF/classes"> @@ -906,7 +920,7 @@ <target name="manual-package" depends="manual-init, manual-copy"> <zip destfile="${result-path}/${product-file}-docs-${version.full}.zip"> - <zipfileset prefix="docs" dir="${result-path}/${product-file}-${version.full}/WebContent/docs"> + <zipfileset prefix="docs" dir="${result-path}/${base-name}/WebContent/docs"> <patternset> <include name="api/**" /> <include name="book-of-vaadin.pdf" /> @@ -943,6 +957,15 @@ <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" /> </javadoc> + <!-- Create a javadoc jar, mainly for Maven --> + <jar file="${result-path}/${lib-javadoc-jar-name}" compress="true"> + <fileset dir="${javadoc.destdir}"> + <patternset> + <include name="**" /> + </patternset> + </fileset> + </jar> + <!-- Append local style definitions. --> <echo>Appending local style definitions</echo> <concat destfile="${javadoc.destdir}/stylesheet.css" append="yes"> @@ -1017,7 +1040,7 @@ <echo>Installing ${output-dir}/WebContent/${lib-jar-name} to ${nightly.publish}</echo> <echo>Hopefully you have permissions for the copy operation with SSH.</echo> - <property name="package.filename" value="${result-path}/${product-file}-${version.full}.zip"/> + <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"> @@ -1051,9 +1074,38 @@ <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 ${result-path}/${lib-javadoc-jar-name} to Maven repository</echo> + <artifact:mvn> + <arg value="gpg:sign-and-deploy-file"/> + <sysproperty key="file" value="../${result-path}/${lib-javadoc-jar-name}" /> + <sysproperty key="pomFile" value="maven/pom.xml" /> + <sysproperty key="repositoryId" value="vaadin-snapshots" /> + <sysproperty key="url" value="http://oss.sonatype.org/content/repositories/vaadin-snapshots" /> + <sysproperty key="classifier" value="javadoc" /> + <sysproperty key="uniqueVersion" value="false" /> + <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> + </artifact:mvn> + + <echo>Publishing ${result-path}/${lib-sources-jar-name} to Maven repository</echo> <artifact:mvn> <arg value="gpg:sign-and-deploy-file"/> + <sysproperty key="file" value="../${result-path}/${lib-sources-jar-name}" /> + <sysproperty key="pomFile" value="maven/pom.xml" /> + <sysproperty key="repositoryId" value="vaadin-snapshots" /> + <sysproperty key="url" value="http://oss.sonatype.org/content/repositories/vaadin-snapshots" /> + <sysproperty key="classifier" value="sources" /> + <sysproperty key="uniqueVersion" value="false" /> + <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> + </artifact:mvn> + +--> + + <echo>Publishing ${output-dir}/WebContent/${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="pomFile" value="maven/pom.xml" /> @@ -1099,7 +1151,7 @@ <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="package.name" value="${product-file}-${version.full}"/> + <property name="package.name" value="${base-name}"/> <!-- Only Linux tests allowed. TODO: Generalize this. --> <property name="package.filename" value="${result-path}/${package.name}.zip"/> |