You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2006/03/19 19:24:04 UTC
svn commit: r387011 - /beehive/trunk/netui/test/webapps/drt/build.xml
Author: ekoneil
Date: Sun Mar 19 10:24:03 2006
New Revision: 387011
URL: http://svn.apache.org/viewcvs?rev=387011&view=rev
Log:
Change the NetUI coreWeb build so that it's incremental. Note, tihs no longer uses the <build-controls> and <build-pageflows> macros and instead calls the <apt> macro directly.
The reason for this is that in order to process annotations and build the .java sources from web/ and src/ at once, both the controls and page flow annotation processors need to run at the same time. Otherwise, the <build-controls> macro runs first, processing annotations and compiling. Then, the <build-pageflows> macro runs and doesn't perform annotation processing for files that are already .class files. The result was that only a subset of the struts-config-*.xml files were produced.
With this change, both annotation processors are in the "build" classpath and the webapp builds in one <apt> pass taking about 2 minutes on decent hardware. Incremental build works as well.
BB: self
Test: NetUI tests pass, distribution tests pass
Modified:
beehive/trunk/netui/test/webapps/drt/build.xml
Modified: beehive/trunk/netui/test/webapps/drt/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/build.xml?rev=387011&r1=387010&r2=387011&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/build.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/build.xml Sun Mar 19 10:24:03 2006
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright 2004 The Apache Software Foundation.
+ Copyright 2004-2006 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -41,6 +41,11 @@
<import file="${beehive.home}/beehive-imports.xml"/>
<import file="${beehive.home}/ant/beehive-tools.xml"/>
+ <path id="webapp.classpath">
+ <fileset dir="${webapp.build.dir}/WEB-INF/lib" includes="*.jar"/>
+ <pathelement location="${classes.dir}"/>
+ </path>
+
<!-- this is required for the beehive-tools.xml file's build-schema Ant task -->
<path id="xbean.dependency.path">
<pathelement location="${xbean.jar}"/>
@@ -67,71 +72,55 @@
<echo message="--------------------------------------------------"/>
<mkdir dir="${webapp.build.dir}"/>
- <mkdir dir="${webapp.build.dir}/WEB-INF/classes"/>
+ <mkdir dir="${classes.dir}"/>
<mkdir dir="${webapp.build.dir}/WEB-INF/lib"/>
<!--
- In order to have iterative development work correctly, the generated files need to be
- removed in order to produce fresh codegen for each call to the "build" target.
+ In order to have iterative development work correctly, the generated files need to be
+ removed in order to produce fresh codegen for each call to the "build" target.
-->
<delete dir="${sourcegen.dir}"/>
<antcall target="update.runtime"/>
- <!-- this webapp's classpath -->
- <path id="webapp.classpath">
- <pathelement location="${servlet-api.jar}"/>
- <pathelement location="${jsp-api.jar}"/>
- <pathelement location="${webapp.build.dir}/WEB-INF/classes"/>
- <fileset dir="${webapp.build.dir}/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
-
<copy todir="${webapp.build.dir}" includeEmptyDirs="false">
<fileset dir="${web.dir}">
<exclude name="**/*.java"/>
- <exclude name="**/*.jpf"/>
- <exclude name="**/.svn/**"/>
</fileset>
</copy>
- <echo>Copying .properties and .xml files from ${src.dir} to ${webapp.build.dir}/WEB-INF/classes</echo>
- <copy todir="${webapp.build.dir}/WEB-INF/classes" includeEmptyDirs="false">
- <fileset dir="${src.dir}" includes="**/*.properties"/>
- <fileset dir="${src.dir}" includes="**/*.xml"/>
- <fileset dir="${src.dir}" includes="META-INF/**"/>
+ <echo>Copying .properties and .xml files from ${src.dir} to ${classes.dir}</echo>
+ <copy todir="${classes.dir}" includeEmptyDirs="false">
+ <fileset dir="${src.dir}" includes="**/*.properties,**/*.xml,META-INF/**"/>
</copy>
- <path id="webapp.classpath">
+ <path id="build.classpath">
+ <path refid="webapp.classpath"/>
+ <path refid="velocity.dependency.path"/>
+ <path refid="netui-compiler.dependency.path"/>
+
<pathelement location="${servlet-api.jar}"/>
<pathelement location="${jsp-api.jar}"/>
- <pathelement location="${webapp.build.dir}/WEB-INF/classes"/>
- <fileset dir="${webapp.build.dir}/WEB-INF/lib" includes="*.jar"/>
- </path>
-
- <path id="webapp.sourcepath">
- <pathelement location="${web.dir}"/>
- <pathelement location="${src.dir}"/>
</path>
<build-schemas srcdir="${webapp.build.dir}/WEB-INF/schemas"
- destdir="${webapp.build.dir}/WEB-INF/classes"/>
+ destdir="${classes.dir}"/>
- <build-controls srcdir="${src.dir}"
- destdir="${classes.dir}"
- classpathref="webapp.classpath"
- tempdir="${sourcegen.dir}"/>
-
- <build-pageflows srcdir="."
- webcontentdir="${web.dir}"
- destdir="${webapp.build.dir}/WEB-INF/classes"
- tempdir="${sourcegen.dir}"
- sourcepathref="webapp.sourcepath"
- classpathref="webapp.classpath"/>
+ <taskdef name="apt"
+ classname="org.apache.beehive.controls.runtime.generator.AptTask"
+ classpathref="build.classpath"
+ onerror="fail"/>
+
+ <apt srcdir="${src.dir}:${web.dir}"
+ destdir="${classes.dir}"
+ gendir="${sourcegen.dir}"
+ classpathref="build.classpath"
+ debug="true"
+ processorOptions="web.content.root=${web.dir}"
+ nocompile="false"/>
<echo message="--------------------------------------------------"/>
- <echo message="| NetUI coreWeb DRT webapp build ending |"/>
+ <echo message="| NetUI coreWeb DRT webapp build completed |"/>
<echo message="--------------------------------------------------"/>
</target>
@@ -156,7 +145,7 @@
configfile="testRecorder/config/testRecorder-config.xml"
webappfile="testRecorder/config/testRecorder-webapp.xml"
appdir="${basedir}"
- outputdir="${webapp.build.dir}/WEB-INF/classes"/>
+ outputdir="${classes.dir}"/>
<testrecorder-deploy webappdir="${webapp.build.dir}"/>
@@ -252,7 +241,7 @@
<!--
This is the documented workaround for using declarative validation with Struts 1.1.
- We need to copy the resources so they can be loaded from *servlet context* as
+ We need to copy the resources so they can be loaded from **ServletContext** as
/_pageflow/pageflow-validation-*.xml.
-->
<delete dir="${webapp.build.dir}/_pageflow"/>