jvanzyl     02/03/28 18:05:09

  Modified:    .        build-bootstrap.xml jakarta-turbine-maven.xml
                        release-todo
               src/dvsl/gump convert-project.dvsl
               src/java/org/apache/maven MavenUtils.java
                        ProjectProperties.java
               src/java/org/apache/maven/jxr/pacman JavaFile.java
               src/templates/build build-docs.xml build-metrics.xml
                        build-test.xml
               xdocs    features.xml goals.xml
  Log:
  Detect whether there are actually any sources and set a property in the
  Ant project called "sourcesPresent". The source related documentation will
  not be generated if there are no sources present. Fancy that.
  
  Revision  Changes    Path
  1.54      +3 -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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- build-bootstrap.xml       26 Mar 2002 14:08:13 -0000      1.53
  +++ build-bootstrap.xml       29 Mar 2002 02:05:08 -0000      1.54
  @@ -209,6 +209,9 @@
         name="package-project-map"
         classname="org.apache.maven.PackageProjectMap">
         <classpath refid="classpath"/>
  +      <classpath>
  +        <pathelement location="${lib.repo}/maven.jar"/>
  +      </classpath>
       </taskdef>
   
       <!-- Create the package => project map so that we can
  
  
  
  1.11      +32 -6     jakarta-turbine-maven/jakarta-turbine-maven.xml
  
  Index: jakarta-turbine-maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/jakarta-turbine-maven.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jakarta-turbine-maven.xml 24 Mar 2002 21:09:07 -0000      1.10
  +++ jakarta-turbine-maven.xml 29 Mar 2002 02:05:08 -0000      1.11
  @@ -2,37 +2,63 @@
     
     <description>Project Management Tools</description>
     <url href="http://jakarta.apache.org/turbine/maven/"/>
  +  
     <cvs repository=""/>
     
  +  <!-- This is really the cvs module. We need to change this but -->
  +  <!-- I will leave this for now until everything works.         -->
  +  
  +  
     <project name="jakarta-turbine-maven">
       
       <!-- Standard Maven target to produce Javadocs, source -->
       <!-- and binary distributions.                         -->
  -    <ant target="dist"/>
       
  +    <ant buildfile="build-maven.xml" target="dist"/>
  +    
  +    <!--
       <depend project="jakarta-turbine-maven-gump-descriptor"/>
  +    -->
  +    
  +    <!-- All Maven projects use Maven to build. -->
  +    <depend project="jakarta-turbine-maven"/>
  +
  +    <!-- All Maven projects need Ant and Xerces to build. -->
  +    <depend project="jakarta-ant"/>
  +    <depend project="xml-xerces"/>
  +
  +    <!-- All Maven projects need JUnit for testing. -->
  +    <depend project="junit"/>
  +
       <depend project="jakarta-turbine-stratum"/>
       <depend project="jakarta-bcel"/>
  -    <depend project="jakarta-log4j"/>
       <depend project="jakarta-velocity"/>
  -    <depend project="jakarta-velocity-dvsl"/>
  +    <depend project="jakarta-oro"/>
  +    <depend project="jakarta-log4j"/>
       <depend project="dom4j"/>
       <depend project="commons-lang"/>
       <depend project="commons-io"/>
       <depend project="commons-util"/>
       <depend project="commons-beanutils"/>
       <depend project="commons-collections"/>
  -    <depend project="jakarta-oro"/>
  +    <depend project="jakarta-velocity-dvsl"/>
       <depend project="jdepend"/>
   
       <work nested="target/classes"/>
       <home nested="target"/>
       <jar name="maven-@@DATE@@.jar"/>
       <javadoc nested="docs/apidocs"/>
  +    
  +    <!-- Nag entry -->
  +    <nag to="" from=""/>
  +    
     </project>
  -
  +  
  +  <!-- Transform the Maven project descriptor into a form -->
  +  <!-- that can be digested by Gump.                      -->
  +  
     <project name="jakarta-turbine-maven-gump-descriptor">
  -    <ant target="gump-descriptor"/>
  +    <ant buildfile="build-maven.xml" target="gump-descriptor"/>
     </project>
   
   </module>
  
  
  
  1.9       +6 -0      jakarta-turbine-maven/release-todo
  
  Index: release-todo
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/release-todo,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- release-todo      28 Mar 2002 17:29:27 -0000      1.8
  +++ release-todo      29 Mar 2002 02:05:08 -0000      1.9
  @@ -15,3 +15,9 @@
   . status document (weekly report type thing)
   . faq
   . look at release guide in tomcat 4
  +. announce tool as we are close
  +  -> freshmeat
  +  -> java lobby
  +  -> slashdot apache
  +  -> general@jakarta
  +  -> announcement@apache
  
  
  
  1.12      +4 -4      jakarta-turbine-maven/src/dvsl/gump/convert-project.dvsl
  
  Index: convert-project.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/dvsl/gump/convert-project.dvsl,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- convert-project.dvsl      27 Mar 2002 16:31:31 -0000      1.11
  +++ convert-project.dvsl      29 Mar 2002 02:05:08 -0000      1.12
  @@ -1,8 +1,8 @@
   #match("project")
  -<module name="$context.applyTemplates("name")">
  +#set ($projectName = $context.node.name)
  +#set ($projectId = $context.node.id)
  +<module name="$projectName">
   
  -  #set ($projectName = $context.node.name)
  -  #set ($projectId = $context.node.id)
   
     <description>$context.node.shortDescription</description>
     <url href="$context.node.url"/>
  @@ -17,7 +17,7 @@
       <!-- Standard Maven target to produce Javadocs, source -->
       <!-- and binary distributions.                         -->
       
  -    <ant buildfile="build-maven.xml" targetj="maven:jar">
  +    <ant buildfile="build-maven.xml" target="maven:jar">
         <property name="final.name" value="${projectId}-@@DATE@@"/>
       </ant>
       
  
  
  
  1.5       +8 -7      jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java
  
  Index: MavenUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MavenUtils.java   24 Mar 2002 21:09:07 -0000      1.4
  +++ MavenUtils.java   29 Mar 2002 02:05:08 -0000      1.5
  @@ -70,7 +70,7 @@
    * the project.
    *
    * @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: MavenUtils.java,v 1.4 2002/03/24 21:09:07 jvanzyl Exp $
  + * @version $Id: MavenUtils.java,v 1.5 2002/03/29 02:05:08 jvanzyl Exp $
    */
   public class MavenUtils
   {
  @@ -87,9 +87,10 @@
       public static Project getProject(File projectDescriptor)
           throws Exception
       {
  -            Mapper mapper = new Mapper();
  -            Project project = (Project) mapper.map(projectDescriptor,PROJECT_CLASS);
  -            return project;
  +        Mapper mapper = new Mapper();
  +        mapper.setDebug(true);
  +        Project project = (Project) mapper.map(projectDescriptor,PROJECT_CLASS);
  +        return project;
       }
   
       /**
  @@ -100,9 +101,9 @@
       public static Project getProject(String projectDescriptor)
           throws Exception
       {
  -            Mapper mapper = new Mapper();
  -            Project project = (Project) mapper.map(projectDescriptor,PROJECT_CLASS);
  -            return project;
  +        Mapper mapper = new Mapper();
  +        Project project = (Project) mapper.map(projectDescriptor,PROJECT_CLASS);
  +        return project;
       }
   
       /**
  
  
  
  1.16      +10 -1     
jakarta-turbine-maven/src/java/org/apache/maven/ProjectProperties.java
  
  Index: ProjectProperties.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/ProjectProperties.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ProjectProperties.java    26 Mar 2002 04:48:53 -0000      1.15
  +++ ProjectProperties.java    29 Mar 2002 02:05:08 -0000      1.16
  @@ -81,7 +81,7 @@
    * the project.
    *
    * @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: ProjectProperties.java,v 1.15 2002/03/26 04:48:53 brekke Exp $
  + * @version $Id: ProjectProperties.java,v 1.16 2002/03/29 02:05:08 jvanzyl Exp $
    */
   public class ProjectProperties
       extends ProjectExecutor
  @@ -94,12 +94,21 @@
       public void doExecute()
           throws Exception
       {
  +        System.out.println("mavenProject: " + mavenProject);
  +    
           log("Creating classpath reference ...");
           createClasspathReference();
   
           log("Creating dependency.set ...");
           createDependencySet();
   
  +        // If a project does not have any sources then there isn't
  +        // much point in running source related tasks.
  +        if (mavenProject.getBuild().getSourceDirectories().size() > 0)
  +        {
  +            getProject().setProperty("sourcesPresent", "true");
  +        }
  +        
           log("Creating source set reference ...");
           createPathReference("src.set",
               mavenProject.getBuild().getSourceDirectories());
  
  
  
  1.3       +1 -2      
jakarta-turbine-maven/src/java/org/apache/maven/jxr/pacman/JavaFile.java
  
  Index: JavaFile.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jxr/pacman/JavaFile.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaFile.java     24 Feb 2002 01:32:39 -0000      1.2
  +++ JavaFile.java     29 Mar 2002 02:05:09 -0000      1.3
  @@ -56,7 +56,7 @@
    * Interface for objects which wish to provide metainfo about a JavaFile.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Kevin A. Burton</a>
  - * @version $Id: JavaFile.java,v 1.2 2002/02/24 01:32:39 jvanzyl Exp $
  + * @version $Id: JavaFile.java,v 1.3 2002/03/29 02:05:09 jvanzyl Exp $
    */
   public abstract class JavaFile
   {
  @@ -120,5 +120,4 @@
       {
           this.filename = filename;
       }
  -
   }
  
  
  
  1.42      +14 -9     jakarta-turbine-maven/src/templates/build/build-docs.xml
  
  Index: build-docs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-docs.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- build-docs.xml    29 Mar 2002 00:13:49 -0000      1.41
  +++ build-docs.xml    29 Mar 2002 02:05:09 -0000      1.42
  @@ -47,9 +47,13 @@
   
     <target
       name="cross-ref"
  +    if="sourcesPresent"
       depends="local-init">
       <!-- If the 'startDir' attribute changes we need to update
            CodeTransform.java in o.a.m.jxr, this will be fixed. -->
  +         
  +    <echo>${sourcesPresent}</echo>
  +         
       <jxr
         startDir="src"
         destDir="${docs.dest}/xref"
  @@ -142,7 +146,7 @@
       />
     </target>
   
  -    <target
  +  <target
       name="docs:dependencies"
       description="o Generate html project documentation xdoc sources">
   
  @@ -261,14 +265,14 @@
       </style>
   
       <java classname="org.apache.fop.apps.Fop" fork="yes">
  -        <classpath>
  -            <pathelement location="${lib.repo}/fop-0.20.3.jar"/>
  -            <pathelement location="${lib.repo}/batik.jar"/>
  -            <pathelement location="${lib.repo}/logkit-1.0.jar"/>
  -            <pathelement location="${lib.repo}/avalon-framework-4.0.jar"/>
  -            <pathelement location="${lib.repo}/xercesImpl-2.0.0.jar"/>
  -        </classpath>
  -        <arg line="-fo ${docs.dest}/project.fo -pdf ${docs.dest}/project.pdf"/>
  +      <classpath>
  +        <pathelement location="${lib.repo}/fop-0.20.3.jar"/>
  +        <pathelement location="${lib.repo}/batik.jar"/>
  +        <pathelement location="${lib.repo}/logkit-1.0.jar"/>
  +        <pathelement location="${lib.repo}/avalon-framework-4.0.jar"/>
  +        <pathelement location="${lib.repo}/xercesImpl-2.0.0.jar"/>
  +      </classpath>
  +      <arg line="-fo ${docs.dest}/project.fo -pdf ${docs.dest}/project.pdf"/>
       </java>
   
     </target>
  @@ -321,6 +325,7 @@
   
     <target
       name="javadocs"
  +    if="sourcesPresent"
       depends="local-init"
       description="o Generates the Javadoc API documentation">
   
  
  
  
  1.14      +1 -0      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- build-metrics.xml 25 Mar 2002 21:28:37 -0000      1.13
  +++ build-metrics.xml 29 Mar 2002 02:05:09 -0000      1.14
  @@ -31,6 +31,7 @@
   
     <target
       name="metrics"
  +    if="sourcesPresent"
       depends="jdepend-report,jdepend-gui"
       description="o Gathers the code metrics">
     </target>
  
  
  
  1.19      +4 -3      jakarta-turbine-maven/src/templates/build/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-test.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build-test.xml    26 Mar 2002 01:03:46 -0000      1.18
  +++ build-test.xml    29 Mar 2002 02:05:09 -0000      1.19
  @@ -84,12 +84,13 @@
       </junit>
     </target>
   
  -<!-- ================================================================== -->
  -<!-- C R E A T E  J U N I T  X M L  R E P O R T                         -->
  -<!-- ================================================================== -->
  +  <!-- ================================================================== -->
  +  <!-- C R E A T E  J U N I T  X M L  R E P O R T                         -->
  +  <!-- ================================================================== -->
   
     <target
       name="junit-xml"
  +    if="sourcesPresent"
       depends="local-init">
   
       <taskdef 
  
  
  
  1.4       +15 -15    jakarta-turbine-maven/xdocs/features.xml
  
  Index: features.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/xdocs/features.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- features.xml      28 Mar 2002 00:40:28 -0000      1.3
  +++ features.xml      29 Mar 2002 02:05:09 -0000      1.4
  @@ -20,18 +20,18 @@
             ObjectBridge</a>. Here's what a Maven POM
             looks like in <a href="project-descriptor.html">XML</a> form.
           </li>
  -        
  +
           <p/>
  -        
  +
           <li>
             A single set of Ant files are used to build any number of projects
             that you are managing. No more keeping track of countless build
             systems. As improvements are made to the Maven build system
             all Maven users benefit!
           </li>
  -        
  +
           <p/>
  -        
  +
           <li>
             Integration with Gump. For those who are not familiar with Gump it
             is a tool used at Jakarta to help projects maintain backward
  @@ -42,7 +42,7 @@
             working on our own massive build tool but integration with
             Gump comes at no cost to Maven users.
           </li>
  -        
  +
           <p/>
   
           <li>
  @@ -58,15 +58,15 @@
               <li>Mailing lists</li>
               <li>Developer list</li>
               <li>Dependency list</li>
  -            <li>Unit test reports</li>
  +            <li>Unit test reports including coverage</li>
               <li>Article Collection</li>
               <li>Software Development References</li>
               <li>Software Development Process Documentation</li>
             </ul>
           </li>
  -        
  +
           <p/>
  -        
  +
           <li>
             Distribution publication based on the POM. Once the POM is
             setup accurately you can easily publish distributions safely
  @@ -75,34 +75,34 @@
           </li>
   
           <p/>
  -        
  +
           <li>
             Maven encourages the use of a central repository of JARs. Maven
             comes with a mechanism that your project's clients can use to
  -          download any JARs requried for building your project from a 
  +          download any JARs requried for building your project from a
             central JAR repository much like Perl's CPAN. This allows users
             of Maven to reuse JARs across projects and encourages communication
             between projects to ensure backward compatibility issues are
             dealt with.
           </li>
  -        
  +
           <p/>
  -        
  +
           <li>
             Install Anywhere installers are <a href="download.html">available</a>
             for a number of platforms to make getting started with Maven
             as easy as possible.
           </li>
  -        
  +
           <p/>
  -        
  +
           <li>
             Directory layout guidelines. Maven comes with documentation on how
             to layout your project's directory structure so that once you learn
             the layout you can easily navigate any other project that uses
             Maven.
           </li>
  -        
  +
         </ul>
         </p>
       </section>
  
  
  
  1.14      +0 -1      jakarta-turbine-maven/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/xdocs/goals.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- goals.xml 28 Mar 2002 18:34:28 -0000      1.13
  +++ goals.xml 29 Mar 2002 02:05:09 -0000      1.14
  @@ -167,7 +167,6 @@
             changes in the POM so error prone manual editing may be avoided.
           </p>
         </subsection>
  -
       </section>
     </body>
   </document>
  
  
  

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

Reply via email to