kaz         02/02/27 09:02:56

  Modified:    .        build-bootstrap.xml project.xml
               src/templates/build build-metrics.xml
  Log:
  - Removed the dependency that jdepend.jar had to reside in
    $ANT_HOME/lib.  This also required removing references to the
    <jdepend> ant task, which has been replaced with a <java> task
    instead utilizing jdepend.textui.JDepend instead.
  
  - The jdepend jar file is now downloaded to ${lib.repo} via the
    'update-jars' target of build-bootstrap.xml.  Its also been added to
    the Maven project descriptor.
  
  - Generating dependencies is more accurate when analyzing class files
    rather than source files.  Thus, all jdepend commands have been
    modified to only look at the class files.  In addition, the proper
    "depends" attributes have been added so the code is compiled if
    needed.
  
  - The 'jdepend-report' target now outputs its report file in the target
    directory rather than the base directory of the project.  This
    behavior is now consistent with the 'jdepend-xml' target.
  
  Revision  Changes    Path
  1.19      +5 -0      jakarta-turbine-maven/build-bootstrap.xml
  
  Index: build-bootstrap.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/build-bootstrap.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build-bootstrap.xml       26 Feb 2002 18:11:19 -0000      1.18
  +++ build-bootstrap.xml       27 Feb 2002 17:02:56 -0000      1.19
  @@ -199,6 +199,11 @@
             verbose="false"
             usetimestamp="true"/>
   
  +     <get src="${get.jars.baseUrl}/jdepend.jar" 
  +          dest="${lib.repo}/jdepend.jar"
  +          verbose="false"
  +          usetimestamp="true"/>
  +
     </target>
   
   </project>
  
  
  
  1.11      +7 -0      jakarta-turbine-maven/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml       27 Feb 2002 01:02:09 -0000      1.10
  +++ project.xml       27 Feb 2002 17:02:56 -0000      1.11
  @@ -212,6 +212,13 @@
         <jar>jakarta-regexp-1.2.jar</jar>
       </dependency>
   
  +    <dependency>
  +      <name>jdepend</name>
  +      <type>required</type>
  +      <version>2.2</version>
  +      <jar>jdepend.jar</jar>
  +    </dependency>
  +
     </dependencies>
     
     <build>
  
  
  
  1.4       +50 -40    jakarta-turbine-maven/src/templates/build/build-metrics.xml
  
  Index: build-metrics.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-metrics.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build-metrics.xml 25 Feb 2002 15:45:00 -0000      1.3
  +++ build-metrics.xml 27 Feb 2002 17:02:56 -0000      1.4
  @@ -7,68 +7,78 @@
   #include("build.init.target")
   
     <!-- ================================================================== -->
  +  <!-- C O M P I L E                                                      -->
  +  <!-- ================================================================== -->
  +
  +  <target
  +    name="compile">
  +    <ant antfile="build.xml" target="compile"/>
  +  </target>
  +
  +  <!-- ================================================================== -->
     <!-- M E T R I C S                                                      -->
     <!-- ================================================================== -->
   
     <target
       name="metrics"
  -    depends="init,jdepend-report,jdepend-gui"
  -    description="==> Gathers the code metrics">
  +    depends="jdepend-report,jdepend-gui"
  +    description="o Gathers the code metrics">
     </target>
   
     <!-- ======================================================================== -->
     <!-- J D E P E N D  R E P O R T  T A R G E T                                  -->
     <!-- ======================================================================== -->
  -  <target name="jdepend-report" unless="use.jdepend.gui">
  -    <!-- For now we just creat a text report using the built in jdepend task. -->
  -    <jdepend outputfile="jdepend-report.txt">
  -      <sourcespath>
  -        <pathelement location="${src.dir}/java"/>
  -      </sourcespath>
  -      <classpath location="${build.dest}" />
  -    </jdepend>
  +
  +  <target 
  +    name="jdepend-report" 
  +    depends="init,compile"
  +    unless="use.jdepend.gui">
  +    <java 
  +      classname="jdepend.textui.JDepend" 
  +      fork="yes" 
  +      failonerror="yes">
  +      <arg line="-file ${build.dir}/jdepend-report.txt ${build.dest}"/>
  +      <classpath refid="classpath"/>
  +    </java>
     </target>
   
     <!-- ======================================================================== -->
     <!-- J D E P E N D  G U I  T A R G E T                                        -->
     <!-- ======================================================================== -->
  -  <target name="jdepend-gui" if="use.jdepend.gui">
  -    <java classname="jdepend.swingui.JDepend" fork="yes" failonerror="yes">
  -      <arg line="${src.dir}/java ${build.dest}"/>
  -      <classpath>
  -        <path refid="classpath"/>
  -        <pathelement location="./"/>
  -        <pathelement path="${java.class.path}" />
  -      </classpath>
  +
  +  <target 
  +    name="jdepend-gui" 
  +    depends="init,compile"
  +    if="use.jdepend.gui">
  +    <java 
  +      classname="jdepend.swingui.JDepend" 
  +      fork="yes" 
  +      failonerror="yes">
  +      <arg line="${build.dest}"/>
  +      <classpath refid="classpath"/>
       </java>
     </target>
   
     <!-- ======================================================================== -->
     <!-- J D E P E N D  X M L  T A R G E T                                        -->
     <!-- ======================================================================== -->
  -  <target name="jdepend-xml" depends="init">
  -    <!-- Once we start to use Ant 1.5, we can use the builtin jdepend target -->
  -    <!-- to generate our xml reports.  Until then we can use the xmlui.      -->
  -    <!-- 
  -    <jdepend format="xml" outputfile="${build.dir}/jdepend-report.xml">
  -      <sourcespath>
  -        <pathelement location="${src.dir}/java" />
  -      </sourcespath>
  -      <classpath location="${build.dest}" />
  -    </jdepend>
  -    -->
  -
  -    <!-- This call will gen a xml report regardless of the version of ant. -->
  -    <java classname="jdepend.xmlui.JDepend" fork="yes" failonerror="yes">
  -      <arg line="-file ${build.dir}/jdepend-report.xml ${src.dir}/java 
${build.dest}"/>
  -      <classpath>
  -        <path refid="classpath"/>
  -        <pathelement location="./"/>
  -        <pathelement path="${java.class.path}" />
  -      </classpath>
  +
  +  <target 
  +    name="jdepend-xml" 
  +    depends="init,compile">
  +    <java 
  +      classname="jdepend.xmlui.JDepend" 
  +      fork="yes" 
  +      failonerror="yes">
  +      <arg line="-file ${build.dir}/jdepend-report.xml ${build.dest}"/>
  +      <classpath refid="classpath"/>
       </java>
  -    <style basedir="${build.dir}" destdir="${docs.dest}"
  -        includes="jdepend-report.xml" style="${docs.src}/stylesheets/jdepend.xsl" />
  +    <!-- Use XSLT to transform until the DVSL stylesheet is completed -->
  +    <style 
  +      basedir="${build.dir}" 
  +      destdir="${docs.dest}"
  +      includes="jdepend-report.xml" 
  +      style="${docs.src}/stylesheets/jdepend.xsl"/>
     </target>
   
   </project>
  
  
  

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

Reply via email to