bloritsch    2002/09/25 07:43:44

  Modified:    fortress build.xml
  Log:
  make the meta support optionally compilable
  
  Revision  Changes    Path
  1.52      +41 -7     jakarta-avalon-excalibur/fortress/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/build.xml,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- build.xml 19 Sep 2002 04:07:23 -0000      1.51
  +++ build.xml 25 Sep 2002 14:43:43 -0000      1.52
  @@ -25,11 +25,14 @@
           <pathelement location="${excalibur-sourceresolve.jar}"/>
           <pathelement location="${excalibur-concurrent.jar}"/>
           <pathelement location="${excalibur-container.jar}"/>
  -        <pathelement location="${excalibur-meta.jar}"/>
           <pathelement location="${checkstyle.jar}"/>
           <pathelement path="${java.class.path}"/>
       </path>
   
  +    <path id="optional.class.path">
  +        <pathelement location="${excalibur-meta.jar}"/>
  +    </path>
  +
       <path id="tools.class.path">
           <pathelement location="${junit.jar}"/>
           <pathelement location="${tools.jar}"/>
  @@ -63,7 +66,11 @@
       <target name="main" depends="big-jar" description="Build the project"/>
       <target name="rebuild" depends="clean,main" description="Rebuild the project"/>
   
  -    <target name="big-jar" depends="jar" description="Build the big jar with all 
dependencies included">
  +    <target name="copy-optional-libs" if="include.meta">
  +        <copy file="${excalibur-meta.jar}" todir="${build.dir}/tempjars"/>
  +    </target>
  +
  +    <target name="big-jar" depends="jar,copy-optional-libs" description="Build the 
big jar with all dependencies included">
         <copy file="${excalibur-collections.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${excalibur-altrmi-common.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${excalibur-altrmi-server-impl.jar}" 
todir="${build.dir}/tempjars"/>
  @@ -79,7 +86,6 @@
         <copy file="${excalibur-sourceresolve.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${excalibur-concurrent.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${excalibur-container.jar}" todir="${build.dir}/tempjars"/>
  -      <copy file="${excalibur-meta.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${excalibur-threadcontext.jar}" todir="${build.dir}/tempjars"/>
         <copy file="${build.lib}/${jar.name}" todir="${build.dir}/tempjars"/>
   
  @@ -99,7 +105,11 @@
         </jar>
       </target>
   
  -    <target name="dependencies" description="Check dependencies" 
unless="skip.dependencies">
  +    <target name="optional.dependencies" description="Check dependencies" 
if="include.meta">
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkMeta"/>
  +    </target>
  +
  +    <target name="dependencies" depends="optional.dependencies" description="Check 
dependencies" unless="skip.dependencies">
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkFramework"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogkit"/>
  @@ -136,9 +146,23 @@
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkXMLUtil"/>
        </target>
   
  +    <target name="path-builder" depends="path-with-meta,path-without-meta"/>
  +
  +    <target name="path-with-meta" if="include.meta">
  +        <path id="build.path">
  +            <path refid="project.class.path"/>
  +            <path refid="optional.class.path"/>
  +        </path>
  +    </target>
  +
  +    <target name="path-without-meta" unless="include.meta">
  +        <path id="build.path">
  +            <path refid="project.class.path"/>
  +        </path>
  +    </target>
   
       <!-- Compiles the source code -->
  -    <target name="compile" depends="dependencies" description="Compiles the source 
code">
  +    <target name="compile" depends="dependencies,path-builder" 
description="Compiles the source code">
   
           <mkdir dir="${build.classes}"/>
   
  @@ -149,8 +173,11 @@
               optimize="${build.optimize}"
               deprecation="${build.deprecation}"
               target="1.2">
  -            <classpath refid="project.class.path" />
  +            <classpath refid="build.path"/>
               <include name="**/*.java"/>
  +            <exclude name="**/*Type*.java" unless="include.meta"/>
  +            <exclude name="**/*Meta*.java" unless="include.meta"/>
  +            <exclude name="**/*Assembly*.java" unless="include.meta"/>
           </javac>
   
           <!-- copy resources to same location as .class files -->
  @@ -164,7 +191,7 @@
       </target>
   
       <!-- Compiles the unit test source code -->
  -    <target name="compile-test" depends="compile, dependencies-test" 
description="Compiles the source code">
  +    <target name="compile-test" depends="compile,dependencies-test,path-builder" 
description="Compiles the source code">
           <mkdir dir="${build.testsrc}"/>
   
           <!-- Copy over all of the tests applying test filters -->
  @@ -182,7 +209,11 @@
               deprecation="${build.deprecation}"
               target="1.2">
               <classpath refid="test.class.path" />
  +            <classpath refid="build.class.path" />
               <include name="**/*.java"/>
  +            <exclude name="**/*Type*.java" unless="include.meta"/>
  +            <exclude name="**/*Meta*.java" unless="include.meta"/>
  +            <exclude name="**/*Assembly*.java" unless="include.meta"/>
           </javac>
   
           <copy todir="${build.testclasses}">
  @@ -271,6 +302,9 @@
                       <include name="**/test/*ContainerProfile.class"/>
                       <exclude name="**/Abstract*"/>
                       <exclude name="**/*Profile.class" unless="run.profile.tests"/>
  +                    <exclude name="**/*Type*.java" unless="include.meta"/>
  +                    <exclude name="**/*Meta*.java" unless="include.meta"/>
  +                    <exclude name="**/*Assembly*.java" unless="include.meta"/>
                   </fileset>
               </batchtest>
           </junit>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to