axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mseib...@us.ibm.com
Subject Okay, I'm lost again.....
Date Wed, 12 Jun 2002 21:12:43 GMT
Doesn't take me long, does it?

I've not got a file called "paths.xml" which looks like this:
        <path id="classpath">
          <pathelement location="${xerces.jar}"/>
          <pathelement location="${regexp.jar}"/>
          <pathelement location="${junit.jar}"/>
          <pathelement location="${excalibur.jar}"/>
          <pathelement location="${java.home}/../lib/tools.jar"/>
          <fileset dir="lib">
              <include name="*.jar"/>
          </fileset>
          <pathelement path="${java.class.path}"/>
          <pathelement location="test/foreachTask/bsf.jar" />
          <pathelement location="test/foreachTask/js.jar" />
          <pathelement location="${env.ANT_HOME}/lib" />
        </path>

and I set up the DOCTYPE ENTITY at the top, and added a &paths; into my
project space.  However, tasks that depend on "classpath" are now failing
to be found (they are in the classpath, and I guess the classpath name
isn't referenced?).  Any ideas on what is going wrong here?

Matt Seibert                                           mseibert@us.ibm.com
IBM        External:    (512) 838-3656      Internal:   678-3656


                                                                                         
                                  
                      "Steve Loughran"                                                   
                                  
                      <steve_l@iseran.         To:       <axis-dev@xml.apache.org>
                                         
                      com>                     cc:                                    
                                     
                                               Subject:  Re: Proposal for Test and Samples
Changes                          
                      06/10/2002 14:42                                                   
                                  
                      Please respond to                                                  
                                  
                      axis-dev                                                           
                                  
                                                                                         
                                  




----- Original Message -----
From: <mseibert@us.ibm.com>
To: <axis-dev@xml.apache.org>
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




Mime
View raw message