werken      2002/06/25 09:50:14

  Modified:    src/java/org/apache/maven/app Maven.java
               src/templates/build/plugins/core plugin.jelly
  Added:       src/templates/build/plugins/test plugin.jelly
  Log:
  More plugin goodness.
  
  Revision  Changes    Path
  1.16      +21 -3     jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java
  
  Index: Maven.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Maven.java        25 Jun 2002 15:58:05 -0000      1.15
  +++ Maven.java        25 Jun 2002 16:50:14 -0000      1.16
  @@ -858,6 +858,11 @@
        */
       void loadProjectBuildFile() throws Exception
       {
  +        if (!(hasProjectBuildFile()))
  +        {
  +            return;
  +        }
  +
           File projectBuildFile = getProjectBuildFile();
   
           if (!projectBuildFile.exists())
  @@ -942,6 +947,7 @@
                   }
               }
   
  +            System.err.println( "eachGoal: " + eachGoal );
               eachGoal.attain(session);
           }
       }
  @@ -1241,16 +1247,27 @@
           catch (UnattainableGoalException e)
           {
               System.err.println("BUILD FAILED");
  +
  +            String msg = null;
  +
               Throwable rootCause = e.getRootCause();
   
               if (rootCause != null)
               {
  -                System.err.println(rootCause.getLocalizedMessage());
  +                System.err.println( "bob: rootCauase not null" );
  +                rootCause.printStackTrace();
  +                msg = rootCause.getLocalizedMessage();
               }
  -            else
  +
  +            if (msg == null)
               {
  -                System.err.println(e.getLocalizedMessage());
  +                System.err.println( "bob: msg is null" );
  +                msg = e.getLocalizedMessage();
               }
  +
  +            System.err.println(msg);
  +
  +            e.printStackTrace();
           }
           catch (JellyException e)
           {
  @@ -1259,6 +1276,7 @@
               if ( rootCause != null )
               {
                   System.err.println(rootCause.getLocalizedMessage());
  +                rootCause.printStackTrace();
               }
               else
               {
  
  
  
  1.2       +1 -3      
jakarta-turbine-maven/src/templates/build/plugins/core/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/core/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly      25 Jun 2002 15:58:05 -0000      1.1
  +++ plugin.jelly      25 Jun 2002 16:50:14 -0000      1.2
  @@ -8,7 +8,7 @@
   
     <path id="maven.dependency.classpath">
       <j:forEach var="dep" items="${pom.dependencies}">
  -      <pathelement location="${dep.jar}"/>
  +      <pathelement location="${maven.repo.local}/${dep.jar}"/>
       </j:forEach>
     </path>
   
  @@ -28,8 +28,6 @@
           prereqs="maven:prepare-filesystem">
   
       <property name="cp" refid="maven.dependency.classpath"/>
  -
  -    <echo message="CP: ${cp}"/>
   
       <javac
         destdir="${maven.build.dest}"
  
  
  
  1.1                  
jakarta-turbine-maven/src/templates/build/plugins/test/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  
  <project xmlns:j="jelly:core">
  
    <goal name="maven:test.prepare-filesystem">
      <mkdir dir="${maven.test.dest}"/>
      <mkdir dir="${maven.test.reportsDirectory}"/>
    </goal>
   
    <goal name="maven:compile-test"
          prereqs="maven:compile,maven:test.prepare-filesystem">
  
      <javac 
        destdir="${maven.test.dest}"
        excludes="**/package.html"
        debug="${maven.compile.debug}"
        deprecation="${maven.compile.deprecation}"
        optimize="${maven.compile.optimize}">
        <classpath>
          <pathelement path="${maven.build.dest}"/>
          <path refid="maven.dependency.classpath"/>
        </classpath>
        <src>
          <path location="${pom.build.unitTestSourceDirectory}"/>        
        </src>
      </javac>
  
    </goal>
  
    <goal name="maven:test"
          prereqs="maven:compile-test">
      <echo>
      <j:whitespace>
        Running all JUnit tests
      </j:whitespace>
      </echo>
  
      <junit printSummary="yes" 
             failureProperty="maven.test.failure"
             fork="${maven.junit.fork}"
             dir="${maven.junit.dir}">
        <sysproperty key="basedir" value="${basedir}"/>
        <formatter type="xml"/>
        <formatter type="plain" usefile="${maven.junit.usefile}"/>
        <classpath>
          <path refid="maven.dependency.classpath"/>
          <pathelement location="${maven.build.dest}"/>
          <pathelement location="${maven.test.dest}"/>
        </classpath>
        <batchtest todir="${maven.test.reportsDirectory}">
          <fileset dir="${maven.unitTestSourceDirectory}">
            <patternset refid="maven.unit.test.set"/>
          </fileset>
        </batchtest>
      </junit>
  
    </goal>
  
  </project>
  
  
  

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

Reply via email to