You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/04/27 22:51:54 UTC

cvs commit: maven-new/plugins/suiterunner .cvsignore project.xml

bwalding    2003/04/27 13:51:54

  Added:       plugins/suiterunner/src/test/org/apache/maven/plugins/suiterunner
                        SuiteRunnerComponentTest.xml test-project.xml
                        SuiteRunnerComponentTest.java
               plugins/suiterunner/src/java/org/apache/maven/plugins/suiterunner
                        DefaultSuiteRunnerPlugin.java
                        SuiteRunnerPlugin.java
               plugins/suiterunner .cvsignore project.xml
  Log:
  Cleanup
  
  Revision  Changes    Path
  1.1                  maven-new/plugins/suiterunner/src/test/org/apache/maven/plugins/suiterunner/SuiteRunnerComponentTest.xml
  
  Index: SuiteRunnerComponentTest.xml
  ===================================================================
  <plexus>
  
    <!--
  
    When running the container in embedded mode we need to get the logging configuration
    information from the host.
  
    <logging>
  
      <logger-manager-type>log4j</logger-manager-type>
  
      <logger>
        <id>root</id>
        <appender-id>default</appender-id>
        <priority>INFO</priority>
      </logger>
  
      <appender>
        <id>default</id>
        <type>file</type>
        <type-configuration>
          <file>${plexus.logs}/plexus.log</file>
          <append>true</append>
        </type-configuration>
        <threshold>INFO</threshold>
        <layout>pattern-layout</layout>
        <conversion-pattern>%-4r [%t] %-5p %c %x - %m%n</conversion-pattern>
      </appender>
    </logging>
    -->
  
    <components>
  
      <!--
       |
       | A Service
       |
       | This service implements all the Avalon lifecycle methods.
       |
       -->
      <component>
        <role>org.apache.maven.plugins.suiterunner.SuiteRunnerService</role>
        <implementation>org.apache.maven.plugins.suiterunner.SuiteRunnerComponent</implementation>
        <instantiation>per-lookup</instantiation>
        <configuration>
          <host>localhost</host>
          <port>10000</port>
        </configuration>
      </component>
      
      <component>
        <role>org.apache.maven.project.builder.ProjectUnmarshaller</role>
        <implementation>org.apache.maven.project.builder.DefaultProjectUnmarshaller</implementation>
        <instantiation>per-lookup</instantiation>
        <configuration>
          <host>localhost</host>
          <port>10000</port>
        </configuration>
      </component>
  
  
    </components>
  
  </plexus>
  
  
  
  1.1                  maven-new/plugins/suiterunner/src/test/org/apache/maven/plugins/suiterunner/test-project.xml
  
  Index: test-project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
    <pomVersion>3</pomVersion>
    <id>maven</id>
    <name>Maven</name>
    <currentVersion>1.0-beta-9</currentVersion>
    <inceptionYear>2001</inceptionYear>
    <package>org.apache.maven</package>
    <gumpRepositoryId>jakarta</gumpRepositoryId>
    <description>Maven is a project management and project comprehension tool. Maven is based on the concept of a project object model: builds, documentation creation, site publication, and distribution publication are all controlled from the project object model. Maven also provides tools to create source metrics, change logs based directly on source repository, and source cross-references.</description>
    <shortDescription>Java Project Management Tools</shortDescription>
    <url>http://jakarta.apache.org/turbine/${pom.artifactId}/</url>
    <issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10030</issueTrackingUrl>
    <siteAddress>www.maven.org</siteAddress>
    <siteDirectory>/www/www.maven.org/</siteDirectory>
    <distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
    
    <organization>
      <name>Apache Software Foundation</name>
      <url>http://jakarta.apache.org/</url>
      <logo>/images/jakarta-logo-blue.gif</logo>
    </organization>
    
    <repository>
      <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-turbine-maven:anoncvs</connection>
      <developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:jakarta-turbine-maven</developerConnection>
      <url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/</url>
    </repository>
    <versions>
      <version>
        <id>b1</id>
        <name>1.0-b1</name>
        <tag>MAVEN_1_0_B1</tag>
      </version>
      <version>
        <id>b2</id>
        <name>1.0-b2</name>
        <tag>MAVEN_1_0_B2</tag>
      </version>
      <version>
        <id>b3</id>
        <name>1.0-b3</name>
        <tag>MAVEN_1_0_B3</tag>
      </version>
      <version>
        <id>b4</id>
        <name>1.0-b4</name>
        <tag>MAVEN_1_0_B4</tag>
      </version>
      <version>
        <id>b5</id>
        <name>1.0-beta-5</name>
        <tag>MAVEN_1_0_B5</tag>
      </version>
      <version>
        <id>b6</id>
        <name>1.0-beta-6</name>
        <tag>MAVEN_1_0_B6</tag>
      </version>
      <version>
        <id>b7</id>
        <name>1.0-beta-7</name>
        <tag>MAVEN_1_0_B7</tag>
      </version>
      <version>
        <id>b8</id>
        <name>1.0-beta-8</name>
        <tag>MAVEN_1_0_B8</tag>
      </version>
      <version>
        <id>b9</id>
        <name>1.0-beta-9</name>
        <tag>HEAD</tag>
      </version>
    </versions>
    <branches></branches>
    <mailingLists>
      <mailingList>
        <name>Maven User List</name>
        <subscribe>turbine-maven-user-subscribe@jakarta.apache.org</subscribe>
        <unsubscribe>turbine-maven-user-unsubscribe@jakarta.apache.org</unsubscribe>
        <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=turbine-maven-user@jakarta.apache.org</archive>
      </mailingList>
      <mailingList>
        <name>Maven Developer List</name>
        <subscribe>turbine-maven-dev-subscribe@jakarta.apache.org</subscribe>
        <unsubscribe>turbine-maven-dev-unsubscribe@jakarta.apache.org</unsubscribe>
        <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=turbine-maven-dev@jakarta.apache.org</archive>
      </mailingList>
    </mailingLists>
    <developers>
      <developer>
        <name>Juancarlo Anez</name>
        <id>juanco</id>
        <email>juanco@apache.org</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Stephane Bailliez</name>
        <id>sbailliez</id>
        <email>sbailliez@apache.org</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Jeff Brekke</name>
        <id>brekke</id>
        <email>brekke@apache.org</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Tom Copeland</name>
        <id>tcopeland</id>
        <email>tcopeland@apache.org</email>
        <organization>InfoEther</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Eric Dobbs</name>
        <id>dobbs</id>
        <email>eric@dobbse.net</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>dIon Gillard</name>
        <id>dion</id>
        <email>dion@multitask.com.au</email>
        <organization>Multitask Consulting</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Pete Kazmier</name>
        <id>kaz</id>
        <email>pete-apache-dev@kazmier.com</email>
        <organization/>
        <roles>
          <role>Documentation</role>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Peter Lynch</name>
        <id>plynch</id>
        <email>plynch@apache.org</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Glenn McAllister</name>
        <id>glennm</id>
        <email>glenn@somanetworks.com</email>
        <organization>SOMA Networks, Inc.</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Bob McWhirter</name>
        <id>werken</id>
        <email>bob@werken.com</email>
        <organization>The Werken Company</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Geir Magnusson Jr.</name>
        <id>geirm</id>
        <email>geirm@optonline.net</email>
        <organization>Independent (DVSL Maven)</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Vincent Massol</name>
        <id>vmassol</id>
        <email>vmassol@octo.com</email>
        <organization>Octo Technology</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>St?phane Mor</name>
        <id>smor</id>
        <email>stephanemor@yahoo.fr</email>
        <organization>Hasgard Syst?mes et R?seaux</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Daniel Rall</name>
        <id>dlr</id>
        <email>dlr@finemaltcoding.com</email>
        <organization>CollabNet, Inc.</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Kurt Schrader</name>
        <id>kschrader</id>
        <email>kschrader@karmalab.org</email>
        <organization>University of Michigan</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
        <url>http://karmalab.org/~kschrader/</url>
      </developer>
      <developer>
        <name>James Strachan</name>
        <id>jstrachan</id>
        <email>james_strachan@yahoo.co.uk</email>
        <organization>Spiritsoft</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>James Taylor</name>
        <id>jtaylor</id>
        <email>james@jamestaylor.org</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Emmanuel Venisse</name>
        <id>evenisse</id>
        <email>evenisse@ifrance.com</email>
        <organization>Fi System</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Jason van Zyl</name>
        <id>jvanzyl</id>
        <email>jason@zenplex.com</email>
        <organization>Zenplex</organization>
        <roles>
          <role>Architect</role>
          <role>Release Manager</role>
        </roles>
      </developer>
      <developer>
        <name>Ben Walding</name>
        <id>bwalding</id>
        <email>jakarta@walding.com</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
    </developers>
    <contributors>
      <contributor>
        <name>Martin van dem Bemt</name>
        <email>mvdb@mvdb.com</email>
      </contributor>
      <contributor>
        <name>Nathan Coast</name>
        <email>nathan.coast@blueyonder.co.uk</email>
      </contributor>
      <contributor>
        <name>Martin Cooper</name>
        <email>martin.cooper@tumbleweed.com</email>
      </contributor>
      <contributor>
        <name>James CE Johnson</name>
        <email>jcej@tragus.org</email>
      </contributor>
      <contributor>
        <name>Mark Langley</name>
        <email>mlangley@casebank.com</email>
      </contributor>
      <contributor>
        <name>Brian Leonard</name>
        <email>brian@brainslug.com</email>
      </contributor>
      <contributor>
        <name>Michael McCallum</name>
        <email>gholam@apache.org</email>
      </contributor>
      <contributor>
        <name>Markus M. May</name>
        <email>mmay@javafreedom.org</email>
      </contributor>
      <contributor>
        <name>Tom Palmer</name>
        <email>tomp@uk.uu.net</email>
      </contributor>
      <contributor>
        <name>Brett Porter</name>
        <email>bporter@f2network.com.au</email>
      </contributor>
      <contributor>
        <name>Kuisong Tong</name>
        <email>Kuisong.Tong@vtradex.com</email>
      </contributor>
    </contributors>
    <!-- Need to mark these as compile-time/run-time -->
  
    <dependencies>
      
      <dependency>
        <id>werkz</id>
        <version>1.0-beta-8</version>
      </dependency>
      
      <dependency>
        <id>classworlds</id>
        <version>1.0-beta-5</version>
      </dependency>
  
      <dependency>
        <groupId>plexus</groupId>
        <artifactId>plexus</artifactId>
        <version>0.3</version>
      </dependency>
  
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework-api</artifactId>
        <version>4.1.4</version>
      </dependency>
      
      <dependency>
        <groupId>xpp3</groupId>
        <artifactId>xpp3</artifactId>
        <version>1.1.2a</version>
      </dependency>
      
      <dependency>
        <groupId>xmlpull</groupId>
        <artifactId>xmlpull</artifactId>
        <version>1.1.2.1</version>
      </dependency>    
      
      <dependency>
        <groupId>aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>1.0.6</version>
      </dependency>        
  
      <!-- Component Testing -->
      
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.6</version>
      </dependency>
  
    </dependencies>
    
    <build>
      <nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
      <sourceDirectory>${basedir}/src/java</sourceDirectory>
      <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
      <aspectSourceDirectory>${basedir}/src/aspect</aspectSourceDirectory>
      <unitTest>
        <includes>
          <include>**/*Test.java</include>
        </includes>
  
        <!--resources>
          <resource>
            <directory>${basedir}/src/test</directory>
            <includes>
              <include>**/*.xml</include>
            </includes>
          </resource>
        </resources-->
  
      </unitTest>
      
      <resources>
        <resource>
          <directory>src/conf</directory>
          <includes>
            <include>*.xsd</include>
            <include>*.dtd</include>
            <include>*.mod</include>
            <include>log4j.properties</include>
            <include>driver.jelly</include>
            <include>driver.properties</include>
          </includes>
        </resource>
        <resource>
          <directory>src/messages</directory>
          <targetPath>org/apache/maven/messages</targetPath>
          <includes>
            <include>messages*.properties</include>
          </includes>
        </resource>
      </resources>
    </build>
    <!-- For maven internal testing -->
  
    <properties>
      <testName>testValue</testName>
      <pomProperty>${pomProperty}</pomProperty>
    </properties>
    <reports>
      <!--
       |
       | These should all be completely self contained. You should be able
       | to generate each of them individually without needing the final
       | xdoc transformation.
       |
       | Each report plugin with it's POM and plugin.jelly logic should
       | contain everything needed to produced the report.
       |
      -->
  
      <report>maven-jdepend-plugin</report>
      <report>maven-checkstyle-plugin</report>
      <report>maven-changelog-plugin</report>
      <report>maven-file-activity-plugin</report>
      <report>maven-developer-activity-plugin</report>
      <report>maven-javadoc-plugin</report>
      <report>maven-jxr-plugin</report>
      <report>maven-junit-report-plugin</report>
      <report>maven-tasklist-plugin</report>
      <report>maven-jellydoc-plugin</report>
    </reports>
  </project>
  
  
  
  1.1                  maven-new/plugins/suiterunner/src/test/org/apache/maven/plugins/suiterunner/SuiteRunnerComponentTest.java
  
  Index: SuiteRunnerComponentTest.java
  ===================================================================
  /*
   * Created on 22/04/2003
   *
   * To change this generated comment go to 
   * Window>Preferences>Java>Code Generation>Code Template
   */
  package org.apache.maven.plugins.suiterunner;
  
  import java.io.InputStream;
  import java.io.InputStreamReader;
  
  import org.apache.maven.project.Project;
  import org.apache.maven.project.builder.ProjectUnmarshaller;
  import org.apache.plexus.PlexusTestCase;
  import org.apache.plexus.context.DefaultContext;
  
  /**
   * @author <a href="bwalding@jakarta.org">Ben Walding</a>
   * @version $Id: SuiteRunnerComponentTest.java,v 1.1 2003/04/27 20:51:53 bwalding Exp $
   */
  public class SuiteRunnerComponentTest extends PlexusTestCase
  {
      private Project testProject;
      /**
       * Constructor for SuiteRunnerTest.
       * @param arg0
       */
      public SuiteRunnerComponentTest(String arg0)
      {
          super(arg0);
      }
  
      public void setUp() throws Exception
      {
          super.setUp();
          ProjectUnmarshaller pu = (ProjectUnmarshaller) getComponent(ProjectUnmarshaller.ROLE);
  
          InputStream is = getClass().getResourceAsStream("test-project.xml");
  
          testProject = pu.parse(new InputStreamReader(is));
          is.close();
  
      }
      
      public void testNull() throws Exception {
      }
  
      public void txestGet() throws Exception
      {
          Object o = getComponent(DefaultSuiteRunnerPlugin.ROLE);
          System.out.println(o);
          assertNotNull("o", o);
  
          if (!(o instanceof SuiteRunnerPlugin))
          {
              fail("Returned component (" + o.getClass().getName() + " was not instanceof SuiteRunnerService");
          }
  
          SuiteRunnerPlugin srs = (SuiteRunnerPlugin) o;
          assertNotNull("project", testProject);
  
          DefaultContext context = new DefaultContext();
          context.put("project", testProject);
          srs.runTests(context);
      }
  
  }
  
  
  
  1.1                  maven-new/plugins/suiterunner/src/java/org/apache/maven/plugins/suiterunner/DefaultSuiteRunnerPlugin.java
  
  Index: DefaultSuiteRunnerPlugin.java
  ===================================================================
  /*
   * Created on 22/04/2003
   *
   * To change this generated comment go to 
   * Window>Preferences>Java>Code Generation>Code Template
   */
  package org.apache.maven.plugins.suiterunner;
  
  import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileOutputStream;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Iterator;
  import java.util.List;
  import java.util.Properties;
  
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.activity.Startable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  import org.apache.avalon.framework.context.Context;
  import org.apache.avalon.framework.context.Contextualizable;
  import org.apache.avalon.framework.logger.Logger;
  import org.apache.avalon.framework.service.ServiceManager;
  import org.apache.avalon.framework.service.Serviceable;
  import org.apache.maven.MavenConstants;
  import org.apache.maven.plugin.PluginGoal;
  import org.apache.maven.project.Project;
  import org.apache.maven.repository.Artifact;
  import org.apache.plexus.logging.AbstractLogEnabled;
  
  /** This service implements all the start phases:
   * @author <a href="bwalding@jakarta.org">Ben Walding</a>
  * @version $Id: DefaultSuiteRunnerPlugin.java,v 1.1 2003/04/27 20:51:53 bwalding Exp $
  *
   *  LogEnabled
   *  Contexualize
   *  Serviceable
   *  Configurable
   *  Initializable
   *  Startable
   *
   */
  public class DefaultSuiteRunnerPlugin
      extends AbstractLogEnabled
      implements SuiteRunnerPlugin, Contextualizable, Serviceable, Configurable, Initializable, Startable
  {
      boolean enableLogging;
      boolean contextualize;
      boolean service;
      boolean configure;
      boolean initialize;
      boolean start;
      boolean stop;
      Context context;
  
      // ----------------------------------------------------------------------
      // Lifecycle Management
      // ----------------------------------------------------------------------
  
      public void enableLogging(Logger logger)
      {
          System.out.println("SuiteRunner.enableLogging()");
          enableLogging = true;
      }
  
      public void contextualize(Context context)
      {
          System.out.println("SuiteRunner.contextualize()");
          contextualize = true;
          System.out.println("Context:" + context);
  
          //XXX Am I allowed to hold onto references to this? 
          this.context = context;
      }
  
      public void service(ServiceManager serviceManager)
      {
          System.out.println("SuiteRunner.configure()");
          service = true;
      }
  
      public void configure(Configuration configuration)
      {
          System.out.println("SuiteRunner.configure()");
          String names[] = configuration.getAttributeNames();
  
          for (int i = 0; i < names.length; i++)
          {
              try
              {
                  System.out.println("attr[i]: " + names[i] + " = " + configuration.getAttribute(names[i]));
              }
              catch (ConfigurationException e)
              {
                  e.printStackTrace();
              }
          }
          configure = true;
  
      }
  
      public void initialize() throws Exception
      {
          System.out.println("SuiteRunner.initialize()");
          initialize = true;
  
          {
              List goals = new ArrayList();
              PluginGoal g;
  
              g = new PluginGoal("suiterunner:test", new ArrayList());
              g.setDescription("does some testing with suiterunner");
              goals.add(g);
  
              this.goals = Collections.unmodifiableList(goals);
          }
  
      }
  
      public void start() throws Exception
      {
          System.out.println("SuiteRunner.start()");
          start = true;
      }
  
      public void stop() throws Exception
      {
          System.out.println("SuiteRunner.stop()");
          stop = true;
      }
  
      /* (non-Javadoc)
       * @see org.apache.maven.plugins.suiterunner.SuiteRunnerService#runTests(java.lang.String, org.apache.maven.project.Project)
       */
      public void runTests(Context context) throws Exception
      {
          //Use the POM etc to locate and run the tests
          Project project = (Project) context.get(Project.CONTEXT_KEY);
          System.out.println("Running tests for project(id = " + project.getId() + ")");
  
          //UnitTest unitTest = project.getBuild().getUnitTest();
  
          //The includes and excludes are not really suitable for us...
          //FIXME actually use the include / excludes
          //Need to use the Ant filescanner
  
          //We'll just spit out a recipe file and then fork java and run SuiteRunner
          //FORK ONCE ONLY! Speedy!
          //XXX hardwired to target
          File recipeFile = new File(System.getProperty("basedir") + "/target/" + project.getArtifactId() + ".srj");
          FileOutputStream fos = null;
          try
          {
              Properties p = new Properties();
              //XXX hardwired to target/classes
              String runpath = "target/classes target/test-classes";
  
              List artifacts = project.getArtifacts();
              if (artifacts != null)
              {
                  Iterator iter = artifacts.iterator();
                  while (iter.hasNext())
                  {
                      Artifact arti = (Artifact) iter.next();
                      runpath += " " + arti.getFile().getAbsolutePath();
                  }
              }
              System.out.println("ClassPath:" + runpath);
  
              p.put("org.suiterunner.Runpath", "-p \"" + runpath + "\"");
              p.put("org.suiterunner.Suites", "-s org.apache.maven.DefaultMavenTest");
              p.put("org.suiterunner.Reporters", "-g -f test.out -eFAB");
              fos = new FileOutputStream(recipeFile);
              p.store(
                  fos,
                  "Maven generate SuiteRunner recipe file for "
                      + project.getArtifactId()
                      + " project (http://www.artima.com/suiterunner/)");
          }
          finally
          {
              if (fos != null)
              {
                  fos.close();
              }
          }
  
          Runtime r = Runtime.getRuntime();
          //XXX fixme should have better way of specifying the jvm to use
          //XXX should delegate to the java plugin's launcher
          String MAVEN_HOME = System.getProperty(MavenConstants.MAVEN_HOME);
          String suiteRunner = MAVEN_HOME + "/repository/suiterunner/jars/suiterunner-1.0beta6.jar";
          //XXX shouldn't be wired to current working dir
          String JAVA_HOME = System.getProperty("sun.boot.library.path");
          System.out.println(System.getProperties());
  
          String cmd[] = { JAVA_HOME + "/java.exe",  "-jar", suiteRunner, recipeFile.getAbsolutePath()};
  
          for (int i = 0; i < cmd.length; i++)
          {
              System.out.println("cmd[" + i + "] = " + cmd[i]);
          }
  
          Process p = r.exec(cmd, new String[0], new File("."));
  
          InputStream is = p.getInputStream();
          BufferedReader br = new BufferedReader(new InputStreamReader(is));
          while (true)
          {
              String line = br.readLine();
              if (line == null)
              {
                  break;
              }
              System.out.println("SuiteRunner:" + line);
          }
          System.out.println("Exited with value: " + p.exitValue());
  
      }
  
      /**
       * @see org.apache.maven.plugin.PluginService#getGoals()
       */
      private List goals;
      public synchronized List getGoals()
      {
          if (goals == null)
          {
              //Why the hell wasn't that run as part of the lifecycle?
              System.out.println("Initialize wasn't run as part of ocmponent lifecycle");
              try
              {
                  initialize();
              }
              catch (Exception e)
              {
                  e.printStackTrace();
                  throw new RuntimeException(e.getLocalizedMessage());
  
              }
          }
          return this.goals;
      }
  
      /* (non-Javadoc)
       * @see org.apache.maven.plugin.PluginService#runGoal(java.lang.String)
       */
      public void runGoal(String goal, Context context) throws Exception
      {
          if ("suiterunner:test".equals(goal))
          {
              runTests(context);
          }
  
      }
  
      /** XXX Cull this?
       * @see org.apache.maven.plugin.Plugin#runGoal(org.apache.maven.plugin.Goal, org.apache.avalon.framework.context.Context)
       */
      public void runGoal(PluginGoal goal, Context context) throws Exception
      {
          runGoal(goal.getName(), context);
      }
  
      /* (non-Javadoc)
       * @see org.apache.maven.plugin.Plugin#getId()
       */
      public String getId()
      {
          // TODO Auto-generated method stub
          return "maven-suiterunner-plugin";
      }
  
  }
  
  
  
  1.1                  maven-new/plugins/suiterunner/src/java/org/apache/maven/plugins/suiterunner/SuiteRunnerPlugin.java
  
  Index: SuiteRunnerPlugin.java
  ===================================================================
  /*
   * Created on 22/04/2003
   *
   * To change this generated comment go to 
   * Window>Preferences>Java>Code Generation>Code Template
   */
  package org.apache.maven.plugins.suiterunner;
  
  import org.apache.avalon.framework.context.Context;
  import org.apache.maven.plugin.Plugin;
  
  /**
   * @author <a href="bwalding@jakarta.org">Ben Walding</a>
   * @version $Id: SuiteRunnerPlugin.java,v 1.1 2003/04/27 20:51:53 bwalding Exp $
   */
  public interface SuiteRunnerPlugin extends Plugin
  {
      public static final String ROLE = SuiteRunnerPlugin.class.getName();
  
      public void runTests(Context context) throws Exception;
  }
  
  
  
  1.1                  maven-new/plugins/suiterunner/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  .classpath
  .project
  target
  
  
  
  1.1                  maven-new/plugins/suiterunner/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
    <extend>${basedir}/../../common/base-project.xml</extend>
    <pomVersion>3</pomVersion>
    <name>Maven Plugin - SuiteRunner</name>
    <id>maven-new:plugin-suiterunner</id>
    <groupId>maven-new</groupId>
    <artifactId>plugin-suiterunner</artifactId>
    
    <package>org.apache.maven.plugins.suiterunner</package>
  
    <dependencies>
    
      <dependency>
        <groupId>maven-new</groupId>
        <artifactId>core</artifactId>
        <version>SNAPSHOT</version>
      </dependency>
    
      <dependency>
        <groupId>avalon</groupId>
        <artifactId>avalon-framework-api</artifactId>
        <version>4.1.4</version>
      </dependency>
      
      <dependency>
        <groupId>plexus</groupId>
        <artifactId>plexus</artifactId>
        <version>0.3</version>
      </dependency>
   
    </dependencies>
  
  </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org