You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/03/30 19:17:40 UTC
svn commit: r760052 - /incubator/pivot/trunk/build.xml
Author: tvolkert
Date: Mon Mar 30 17:17:40 2009
New Revision: 760052
URL: http://svn.apache.org/viewvc?rev=760052&view=rev
Log:
Updated build file to separate compilation from JAR file creation. The "build" target no longer produces JAR files, and a new target, "jars" exists, which produces what "build" used to produce
Modified:
incubator/pivot/trunk/build.xml
Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=760052&r1=760051&r2=760052&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Mon Mar 30 17:17:40 2009
@@ -26,7 +26,6 @@
<tstamp/>
<property file="build.properties"/>
- <property name="release" value="apache-${ant.project.name}-${version}-incubating"/>
<!-- Compiler properties -->
<property name="compiler.optimize" value="true"/>
@@ -36,6 +35,9 @@
<target name="build" description="Compiles all packages"
depends="charts, charts-test, core, core-test, web, web-test, wtk, wtk-test, demos, tutorials, tools"/>
+ <target name="jars"
+ depends="charts-jar, charts-test-jar, core-jar, core-test-jar, web-jar, web-test-jar, wtk-jar, wtk-test-jar, demos-jar, tutorials-jar, tools-jar"/>
+
<target name="clean" description="Removes all build artifacts"
depends="charts-clean, charts-test-clean, core-clean, core-test-clean, web-clean, web-test-clean, wtk-clean, wtk-test-clean, demos-clean, tutorials-clean, tools-clean">
<delete dir="${dist}"/>
@@ -43,15 +45,12 @@
<delete dir="${doc}"/>
</target>
+ <!-- Javadoc -->
<target name="doc" description="Generates API documentation for all packages">
<javadoc packagenames="pivot.*" destdir="${doc}" author="true" version="true" use="true">
<classpath>
- <pathelement location="${charts}/lib/jcommon-1.0.12.jar"/>
- <pathelement location="${charts}/lib/jfreechart-1.0.9.jar"/>
- <pathelement location="${web}/lib/servlet-api.jar"/>
- <pathelement location="${wtk}/lib/stax-api-1.0.jar"/>
- <pathelement location="${wtk}/lib/stax-1.2.0.jar"/>
- <pathelement location="${wtk}/lib/plugin.jar"/>
+ <fileset dir="${charts}/${lib}" includes="**/*.jar"/>
+ <fileset dir="${wtk}/${lib}" includes="**/*.jar"/>
<fileset dir="${web}/${lib}" includes="**/*.jar"/>
</classpath>
<packageset dir="${charts}/${src}" includes="**/*"/>
@@ -75,11 +74,9 @@
</javadoc>
</target>
- <!-- Build charts library -->
+ <!-- Charts -->
<target name="charts" depends="core, wtk">
<mkdir dir="${charts}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${charts}/${src}"
destDir="${charts}/${bin}"
optimize="${compiler.optimize}"
@@ -89,15 +86,14 @@
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
- <pathelement location="${core}/${ant.project.name}-core.jar"/>
- <pathelement location="${wtk}/${ant.project.name}-wtk.jar"/>
- <pathelement location="${charts}/lib/jcommon-1.0.12.jar"/>
- <pathelement location="${charts}/lib/jfreechart-1.0.9.jar"/>
+ <pathelement location="${core}/${bin}"/>
+ <pathelement location="${wtk}/${bin}"/>
+ <fileset dir="${charts}/${lib}" includes="**.*.jar"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${charts}/${ant.project.name}-charts.jar"/>
+ <target name="charts-jar" depends="charts">
<jar jarfile="${charts}/${ant.project.name}-charts.jar">
<manifest>
<attribute name="Sealed" value="true"/>
@@ -120,8 +116,6 @@
<!-- Charts Test -->
<target name="charts-test" depends="charts, core, wtk">
<mkdir dir="${chartstest}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${chartstest}/${src}"
destDir="${chartstest}/${bin}"
optimize="${compiler.optimize}"
@@ -136,9 +130,9 @@
<pathelement location="wtk/${bin}"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${chartstest}/${ant.project.name}-charts.test.jar"/>
+ <target name="charts-test-jar" depends="charts-test">
<jar jarfile="${chartstest}/${ant.project.name}-charts.test.jar">
<fileset dir="${chartstest}/${bin}"/>
<fileset dir="${chartstest}/${src}">
@@ -156,8 +150,6 @@
<!-- Core -->
<target name="core">
<mkdir dir="${core}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${core}/${src}"
destDir="${core}/${bin}"
optimize="${compiler.optimize}"
@@ -167,9 +159,9 @@
failonerror="true">
<compilerarg value="-Xlint"/>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${core}/${ant.project.name}-core.jar"/>
+ <target name="core-jar" depends="core">
<jar jarfile="${core}/${ant.project.name}-core.jar">
<manifest>
<attribute name="Sealed" value="true"/>
@@ -192,21 +184,21 @@
<!-- Core Test -->
<target name="core-test" depends="core">
<mkdir dir="${coretest}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${coretest}/${src}"
destDir="${coretest}/${bin}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
debug="${compiler.debug}"
target="1.5"
- failonerror="true"
- classpath="${core}/${ant.project.name}-core.jar:junit.jar">
+ failonerror="true">
<compilerarg value="-Xlint"/>
+ <classpath>
+ <pathelement location="${core}/${bin}"/>
+ </classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${coretest}/${ant.project.name}-core.test.jar"/>
+ <target name="core-test-jar" depends="core-test">
<jar jarfile="${coretest}/${ant.project.name}-core.test.jar">
<fileset dir="${coretest}/${bin}"/>
<fileset dir="${coretest}/${src}">
@@ -224,8 +216,6 @@
<!-- Web -->
<target name="web" depends="core">
<mkdir dir="${web}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${web}/${src}"
destDir="${web}/${bin}"
optimize="${compiler.optimize}"
@@ -235,22 +225,20 @@
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
- <pathelement location="${core}/${ant.project.name}-core.jar"/>
+ <pathelement location="${core}/${bin}"/>
<fileset dir="${web}/${lib}" includes="**/*.jar"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR files -->
- <delete file="${web}/${ant.project.name}-web.jar"/>
+ <target name="web-jar" depends="web">
<jar jarfile="${web}/${ant.project.name}-web.jar">
<manifest>
<attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${web}/${bin}">
- <exclude name="pivot/web/server/**"/>
- </fileset>
+ <fileset dir="${web}/${bin}" excludes="pivot/web/server/**"/>
<fileset dir="${web}/${src}">
<exclude name="pivot/web/server/**"/>
<exclude name="**/*.java"/>
@@ -258,16 +246,13 @@
</fileset>
</jar>
- <delete file="${web}/${ant.project.name}-web.server.jar"/>
<jar jarfile="${web}/${ant.project.name}-web.server.jar">
<manifest>
<attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${web}/${bin}">
- <include name="pivot/web/server/*"/>
- </fileset>
+ <fileset dir="${web}/${bin}" includes="pivot/web/server/*"/>
<fileset dir="${web}/${src}">
<include name="pivot/web/server/**"/>
<exclude name="**/*.java"/>
@@ -283,10 +268,8 @@
</target>
<!-- Web Test -->
- <target name="web-test" depends="web, wtk">
+ <target name="web-test" depends="core, web, wtk">
<mkdir dir="${webtest}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${webtest}/${src}"
destDir="${webtest}/${bin}"
optimize="${compiler.optimize}"
@@ -296,40 +279,40 @@
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
- <pathelement location="${core}/${ant.project.name}-core.jar"/>
- <pathelement location="${web}/${ant.project.name}-web.jar"/>
- <pathelement location="${wtk}/${ant.project.name}-wtk.jar"/>
+ <pathelement location="${core}/${bin}"/>
+ <pathelement location="${web}/${bin}"/>
+ <pathelement location="${wtk}/${bin}"/>
<fileset dir="${web}/${lib}" includes="**/*.jar"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the client JAR file -->
- <delete file="${webtest}/${ant.project.name}-web.test.jar"/>
+ <target name="web-test-jar" depends="web-test">
<jar jarfile="${webtest}/${ant.project.name}-web.test.jar">
- <fileset dir="${webtest}/${bin}">
- <exclude name="pivot/web/test/server/**"/>
- </fileset>
+ <fileset dir="${webtest}/${bin}" excludes="pivot/web/test/server/**"/>
<fileset dir="${webtest}/${src}">
<exclude name="pivot/web/test/server/**"/>
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
</fileset>
</jar>
+ </target>
- <!-- Rebuild the server WAR file -->
- <delete dir="${webtest}/www/${lib}" includes="*.jar"/>
- <copy file="${core}/${ant.project.name}-core.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${web}/${ant.project.name}-web.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${wtk}/${ant.project.name}-wtk.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${wtk}/${ant.project.name}-wtk.terra.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${wtk}/lib/stax-api-1.0.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${wtk}/lib/stax-1.2.0.jar" todir="${webtest}/www/${lib}"/>
- <copy file="${webtest}/${ant.project.name}-web.test.jar" todir="${webtest}/www/${lib}"/>
+ <target name="web-test-war" depends="core-jar, web-jar, wtk-jar, web-test-jar">
+ <copy todir="${webtest}/www/${lib}">
+ <fileset dir="${core}" includes="${ant.project.name}-core.jar"/>
+ <fileset dir="${web}" includes="${ant.project.name}-web.jar"/>
+ <fileset dir="${wtk}" includes="${ant.project.name}-wtk.jar"/>
+ <fileset dir="${wtk}" includes="${ant.project.name}-wtk.terra.jar"/>
+ <fileset dir="${webtest}" includes="${ant.project.name}-web.test.jar"/>
+ <fileset dir="${wtk}/${lib}" includes="*.jar"/>
+ </copy>
<mkdir dir="${webtest}/${lib}"/>
- <copy file="${core}/${ant.project.name}-core.jar" todir="${webtest}/${lib}"/>
- <copy file="${web}/${ant.project.name}-web.server.jar" todir="${webtest}/${lib}"/>
- <delete file="${webtest}/${ant.project.name}_web_test.war"/>
+ <copy todir="${webtest}/${lib}">
+ <fileset dir="${core}" includes="${ant.project.name}-core.jar"/>
+ <fileset dir="${web}" includes="${ant.project.name}-web.server.jar"/>
+ </copy>
<war destfile="${webtest}/${ant.project.name}_web_test.war" webxml="${webtest}/web.xml">
<fileset dir="${webtest}/www"/>
@@ -344,6 +327,7 @@
<lib dir="${webtest}/${lib}"/>
</war>
</target>
+
<target name="web-test-clean">
<delete dir="${webtest}/www/${lib}" includes="*.jar"/>
<delete dir="${webtest}/${bin}"/>
@@ -355,8 +339,6 @@
<!-- WTK -->
<target name="wtk" depends="core">
<mkdir dir="${wtk}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${wtk}/${src}"
destDir="${wtk}/${bin}"
optimize="${compiler.optimize}"
@@ -366,15 +348,13 @@
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
- <pathelement location="${core}/${ant.project.name}-core.jar"/>
- <pathelement location="${wtk}/lib/stax-api-1.0.jar"/>
- <pathelement location="${wtk}/lib/stax-1.2.0.jar"/>
- <pathelement location="${wtk}/lib/plugin.jar"/>
+ <pathelement location="${core}/${bin}"/>
+ <fileset dir="${wtk}/${lib}" includes="*.jar"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${wtk}/${ant.project.name}-wtk.jar"/>
+ <target name="wtk-jar" depends="wtk">
<jar jarfile="${wtk}/${ant.project.name}-wtk.jar">
<manifest>
<attribute name="Sealed" value="true"/>
@@ -393,16 +373,13 @@
</fileset>
</jar>
- <delete file="${wtk}/${ant.project.name}-wtk.terra.jar"/>
<jar jarfile="${wtk}/${ant.project.name}-wtk.terra.jar">
<manifest>
<attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${wtk}/${bin}">
- <include name="pivot/wtk/skin/terra/**"/>
- </fileset>
+ <fileset dir="${wtk}/${bin}" includes="pivot/wtk/skin/terra/**"/>
<fileset dir="${wtk}/${src}">
<include name="pivot/wtk/skin/terra/**"/>
<exclude name="**/*.java"/>
@@ -410,16 +387,13 @@
</fileset>
</jar>
- <delete file="${wtk}/${ant.project.name}-wtk.obsidian.jar"/>
<jar jarfile="${wtk}/${ant.project.name}-wtk.obsidian.jar">
<manifest>
<attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${wtk}/${bin}">
- <include name="pivot/wtk/skin/obsidian/**"/>
- </fileset>
+ <fileset dir="${wtk}/${bin}" includes="pivot/wtk/skin/obsidian/**"/>
<fileset dir="${wtk}/${src}">
<include name="pivot/wtk/skin/obsidian/**"/>
<exclude name="**/*.java"/>
@@ -438,8 +412,6 @@
<!-- WTK Test -->
<target name="wtk-test" depends="core, wtk">
<mkdir dir="${wtktest}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${wtktest}/${src}"
destDir="${wtktest}/${bin}"
optimize="${compiler.optimize}"
@@ -449,13 +421,13 @@
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
- <pathelement location="${core}/${ant.project.name}-core.jar"/>
- <pathelement location="${wtk}/${ant.project.name}-wtk.jar"/>
+ <pathelement location="${core}/${bin}"/>
+ <pathelement location="${wtk}/${bin}"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${wtktest}/${ant.project.name}-wtk.test.jar"/>
+ <target name="wtk-test-jar" depends="wtk-test">
<jar jarfile="${wtktest}/${ant.project.name}-wtk.test.jar">
<fileset dir="${wtktest}/${bin}"/>
<fileset dir="${wtktest}/${src}">
@@ -470,11 +442,9 @@
<delete file="${wtktest}/${ant.project.name}-wtk.test.jar"/>
</target>
- <!-- Build demos library -->
- <target name="demos" depends="core, wtk, web, charts">
+ <!-- Demos -->
+ <target name="demos" depends="core, web, wtk">
<mkdir dir="${demos}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${demos}/${src}"
destDir="${demos}/${bin}"
optimize="${compiler.optimize}"
@@ -487,44 +457,34 @@
<pathelement location="core/${bin}"/>
<pathelement location="web/${bin}"/>
<pathelement location="wtk/${bin}"/>
- <pathelement location="demos/lib/flex-messaging-common.jar"/>
- <pathelement location="demos/lib/flex-messaging-core.jar"/>
- <pathelement location="demos/lib/gdata-base-1.0.jar"/>
- <pathelement location="demos/lib/gdata-client-1.0.jar"/>
- <pathelement location="demos/lib/gdata-client-meta-1.0.jar"/>
- <pathelement location="demos/lib/gdata-contacts-1.0.jar"/>
- <pathelement location="demos/lib/gdata-contacts-meta-1.0.jar"/>
- <pathelement location="demos/lib/gdata-core-1.0.jar"/>
- <pathelement location="demos/lib/smack.jar"/>
- <pathelement location="demos/lib/smackx.jar"/>
+ <fileset dir="${demos}/${lib}" includes="*.jar"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${demos}/${ant.project.name}-demos.jar"/>
+ <target name="demos-jar" depends="demos">
<jar jarfile="${demos}/${ant.project.name}-demos.jar">
<manifest>
+ <attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
<fileset dir="${demos}/${bin}"/>
<fileset dir="${demos}/${src}">
<exclude name="**/*.java"/>
+ <exclude name="**/package.html"/>
</fileset>
</jar>
</target>
- <!-- Clean the demos classes -->
<target name="demos-clean">
<delete dir="${demos}/${bin}"/>
<delete file="${demos}/${ant.project.name}-demos.jar"/>
</target>
- <!-- Build tutorials library -->
+ <!-- Tutorials -->
<target name="tutorials" depends="core, wtk, web, charts">
<mkdir dir="${tutorials}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${tutorials}/${src}"
destDir="${tutorials}/${bin}"
optimize="${compiler.optimize}"
@@ -539,50 +499,44 @@
<pathelement location="wtk/${bin}"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR files -->
- <delete file="${tutorials}/${ant.project.name}-tutorials.jar"/>
+ <target name="tutorials-jar" depends="tutorials">
<jar jarfile="${tutorials}/${ant.project.name}-tutorials.jar">
<manifest>
+ <attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${tutorials}/${bin}">
- <exclude name="pivot/tutorials/stocktracker/**"/>
- </fileset>
+ <fileset dir="${tutorials}/${bin}" excludes="pivot/tutorials/stocktracker/**"/>
<fileset dir="${tutorials}/${src}">
<exclude name="**/*.java"/>
<exclude name="pivot/tutorials/stocktracker/**"/>
</fileset>
</jar>
- <delete file="${tutorials}/${ant.project.name}-stocktracker.jar"/>
<jar jarfile="${tutorials}/${ant.project.name}-stocktracker.jar">
<manifest>
+ <attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <fileset dir="${tutorials}/${bin}">
- <include name="pivot/tutorials/stocktracker/*"/>
- </fileset>
+ <fileset dir="${tutorials}/${bin}" includes="pivot/tutorials/stocktracker/*"/>
<fileset dir="${tutorials}/${src}">
<exclude name="**/*.java"/>
</fileset>
</jar>
</target>
- <!-- Clean the tutorial classes -->
<target name="tutorials-clean">
<delete dir="${tutorials}/${bin}"/>
<delete file="${tutorials}/${ant.project.name}-tutorials.jar"/>
<delete file="${tutorials}/${ant.project.name}-stocktracker.jar"/>
</target>
- <!-- Build tools library -->
+ <!-- Tools -->
<target name="tools" depends="core, wtk, web">
<mkdir dir="${tools}/${bin}"/>
-
- <!-- Compile source files -->
<javac srcdir="${tools}/${src}"
destDir="${tools}/${bin}"
optimize="${compiler.optimize}"
@@ -597,11 +551,12 @@
<pathelement location="wtk/${bin}"/>
</classpath>
</javac>
+ </target>
- <!-- Rebuild the JAR file -->
- <delete file="${tools}/${ant.project.name}-tools.jar"/>
+ <target name="tools-jar" depends="tools">
<jar jarfile="${tools}/${ant.project.name}-tools.jar">
<manifest>
+ <attribute name="Sealed" value="true"/>
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
@@ -612,7 +567,6 @@
</jar>
</target>
- <!-- Clean the tools classes -->
<target name="tools-clean">
<delete dir="${tools}/${bin}"/>
<delete file="${tools}/${ant.project.name}-tools.jar"/>
@@ -620,7 +574,9 @@
<!-- Package all binaries and source -->
<target name="dist" description="Generates release artifacts"
- depends="trim-whitespace, clean, build, doc">
+ depends="trim-whitespace, clean, jars, doc">
+ <property name="release" value="apache-${ant.project.name}-${version}-incubating"/>
+
<mkdir dir="${dist}/${release}/${doc}"/>
<mkdir dir="${dist}/${release}/${lib}"/>
<mkdir dir="${dist}/${release}/${src}"/>
@@ -637,8 +593,9 @@
</fileset>
</copy>
- <copy tofile="${dist}/${release}/build.xml" file="build-dist.xml"/>
+ <copy file="build-dist.xml" tofile="${dist}/${release}/build.xml" />
+ <!-- Copy lib -->
<copy file="${charts}/${ant.project.name}-charts.jar"
tofile="${dist}/${release}/${lib}/${ant.project.name}-charts-incubating.jar"/>
<copy file="${core}/${ant.project.name}-core.jar"
@@ -654,10 +611,12 @@
<copy file="${tools}/${ant.project.name}-tools.jar"
tofile="${dist}/${release}/${lib}/${ant.project.name}-tools-incubating.jar"/>
+ <!-- Copy doc -->
<copy todir="${dist}/${release}/${doc}">
<fileset dir="${doc}"/>
</copy>
+ <!-- Copr src -->
<copy todir="${dist}/${release}/${src}">
<fileset dir="${charts}/${src}"/>
<fileset dir="${core}/${src}"/>
@@ -685,7 +644,7 @@
<!-- Generate deployment files for online demos and tutorials -->
<target name="deploy" description="Generates deployment files for online demos and tutorials"
- depends="dist">
+ depends="jars">
<delete dir="${deploy}"/>
<mkdir dir="${deploy}"/>