----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 10, 2002 8:30 AM Subject: Proposal for Test and Samples Changes
> All: > > Attached is an HTML document with a little more description of my proposed > changes to the way that Tests and Samples are handled in AXIS. Please > note, most of this is what I have already done, and functioning with no > regressions to function. > > Please give me any feedback you feel appropriate, especially telling me > where I need more detail / more description. I will try to get a "sample > implementation" document together over the next few days so that you can > better visualize the process flow. My goals for a rework of the framework are to -eliminate duplicate declarations (eg. repeated classpath decls) -make the tests runnable standalone, if that makes it easier to dev and test a single problem -make it easy to add new tasks -reduce future maintenance requirements To reduce duplication, all common things like classpaths and the like can be declared in common XML fragment files and then pulled in to each test build file: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE project [ <!ENTITY properties SYSTEM "file:../properties.xml"> <!ENTITY taskdef SYSTEM "file:../taskdef.xml"> <!ENTITY targets SYSTEM "file:../targets.xml"> ]> <project name="Web App Deployment" default="default" basedir="."> <description> deploy the Web application </description> <!-- BEGIN TOPLEVEL DECLARATIONS --> <!-- include the xml file reference declared earlier --> &properties; &taskdef; &targets; ...so nb, targets.xml has : <target name="noop"> <echo>no-op in ${ant.project.name}</echo> </target> -useful for debug, while properties.xml has <property name="root.dir" location="${basedir}"/> <property name="masterbuild.dir" location="${root.dir}/.."/> <property file="${masterbuild.dir}/build.properties"/> so it works out where it is and then pulls in main properties files from the base directory of the project. Build files further down the tree would need to be set up with <property name="masterbuild.dir" location="../../.." /> before the &properties; declaration for it all to work. With this layout, you dont need to run everything from a container build file; standalone works just nicely. The toplevel build file just invokes the sub projects, implementing a dependency graph by having the antcalls inside their own depends graph. here are some of the targets that hand down <target name="do-common"> <ant dir="common" target="${target}" inheritAll="false> </target> <target name="do-tools" depends="do-common,do-index,do-common-test"> <ant dir="tools" target="${target}" inheritAll="false> </target> <target name="do-webapp" depends="do-common,do-index,do-common-test"> <ant dir="webapp" target="${target}" inheritAll="false> </target> <target name="do-all" depends="do-tools,do-webapp"/> and here is an example entry point, which hands off to the graph of build file dependencies, the target we want done. <target name="clean" description="clean up"> <antcall target="do-all"> <param name="target" value="clean"/> </antcall> </target> So: <ant> is called in the directory of the target build file, not relative to the local directory. No references are passed down, other than command line -D stuff. The key is the XML includes files: once you have those each build file is standalone, but shared declarations with all the others. To add a new library, you do it one place, Same for a new task declaration. -steve