dion        2002/10/03 22:51:32

  Added:       src/plugins-build/console project.xml .cvsignore
                        plugin.jelly maven.xml
               src/plugins-build/console/xdocs navigation.xml changes.xml
                        index.xml goals.xml
  Log:
  Added plugin, donated by Jim Birchfield
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-maven/src/plugins-build/console/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
  
      <pomVersion>3</pomVersion>
      <id>maven-console-plugin</id>
      <name>Maven Console Plug-in</name>
      <currentVersion>1.0-SNAPSHOT</currentVersion>
      <organization>
          <name>Apache Software Foundation</name>
          <url>http://jakarta.apache.org/</url>
          
<logo>http://jakarta.apache.org/turbine/maven/images/jakarta-logo-blue.gif</logo>
      </organization>
      <inceptionYear>2002</inceptionYear>
      <package>org.apache.maven</package>
      <logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
  
      <shortDescription>Console for Maven</shortDescription>
  
      <url>http://jakarta.apache.org/turbine/maven/reference/plugins/console/</url>
      
<issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10030</issueTrackingUrl>
      <siteAddress>jakarta.apache.org</siteAddress>
      
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/console/</siteDirectory>
      
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
  
      <repository>
          
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/console</connection>
          
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/console/</url>
      </repository>
  
      <developers>
          <developer>
              <name>James Birchfield</name>
              <id>moatas</id>
              <email>[EMAIL PROTECTED]</email>
              <organization>Birchfield &amp;amp; Associates, Inc.</organization>
              <roles>
                  <role>Java Developer</role>
              </roles>
          </developer>
          <developer>
              <name>dIon Gillard</name>
              <id>dion</id>
              <email>[EMAIL PROTECTED]</email>
              <organization>Multitask Consulting</organization>
              <roles>
                  <role>Documentation</role>
              </roles>
          </developer>
      </developers>
      
      <dependencies/>
  
      <build/>
  
  </project>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/console/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  target
  maven.log
  velocity.log
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/console/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <jj:project 
    xmlns:j="jelly:core" 
    xmlns:jj="jelly:jeez" 
    xmlns:i="jelly:interaction" 
    xmlns="jelly:werkz">
  
      <goal name="console"
          description="Run the Maven console">
          <attainGoal name="console:help"/>
          <j:set var="lastGoal" value="console:help"/>
          <j:forEach var="goal" begin="0" end="1000" step="1">
              <!-- need a way to replace this with Maven.APP_VERSION -->
              <i:ask question="maven 1.0-beta8>:" answer="goal"/>
              <j:choose>
                  <j:when test="${goal=='help'}">
                      <attainGoal name="console:help"/>
                  </j:when>
                  <j:when test="${goal=='!!'}">
                      <attainGoal name="${lastGoal}"/>
                  </j:when>
                  <j:when test="${goal=='list'}">
                      <attainGoal name="console:listGoals"/>
                  </j:when>
                  <j:when test="${goal=='quit'}">
                      <j:set var="goal" value="1001"/>
                  </j:when>
                  <j:otherwise>
                      <j:catch var="ex">
                          <j:set var="lastGoal" value="${goal}"/>
                          <attainGoal name="${goal}"/>
                      </j:catch>
                      <j:if test="${ex != null}">
  ${ex}
                      </j:if>
                  </j:otherwise>
              </j:choose>
          </j:forEach>
  
      </goal>
  
      <goal name="console:listGoals"
          description="Lists all available goals">
              <j:set var="proj" value="${org.apache.commons.jelly.werkz.Project}"/>
              <j:forEach var="listGoal" items="${proj.getGoals()}">
  ${listGoal.getName()}
              </j:forEach>
          </goal>
  
      <goal name="console:help"
          description="Prints the help message.">
  The following commands are available:
  
      list - list all available goals
      help - this message
      &lt;goalname&gt; - attain a goal
      !! - attain the last goal
  
      coming soon - quit ;-)
  
          </goal>
  </jj:project>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/console/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="plugin"
    xmlns:j="jelly:core"
    xmlns:m="maven">
  
    <goal
      name="plugin">
  
      <j:if test="${sourcesPresent == 'true'}">
        <attainGoal name="java:compile"/>
        <attainGoal name="test:test"/>
      </j:if>
  
      <property name="assemblyDir" value="target/assemblyDir"/>
  
      <mkdir dir="${assemblyDir}"/>
  
      <copy todir="${assemblyDir}">
        <fileset dir=".">
          <exclude name="target/**"/>
          <exclude name="src/**"/>
          <exclude name="maven.xml"/>
          <exclude name="maven.log"/>
        </fileset>
      </copy>
  
      <j:if test="${sourcesPresent == 'true'}">
        <copy todir="${assemblyDir}">
          <fileset dir="target/classes"/>
        </copy>
      </j:if>
  
      <jar
        jarfile="${maven.build.dir}/${maven.final.name}.jar">
        <fileset dir="${assemblyDir}"/>
      </jar>
  
      <copy
        file="${maven.build.dir}/${maven.final.name}.jar"
        todir="${maven.repo.local}/maven/jars"
      />
  
    </goal>
  
    <goal name="plugin:install"
          prereqs="plugin"
          description="Install the plugin in Maven's plugins dir">
  
      <copy
        file="${maven.build.dir}/${maven.final.name}.jar"
        todir="${maven.home}/plugins"
      />
  
    </goal>
  
    <goal name="plugin:deploy"
          prereqs="plugin"
          description="Install an unpacked version of the plugin">
  
      <mkdir dir="${maven.home}/plugins/${maven.final.name}"/>
      <unzip
        src="${maven.build.dir}/${maven.final.name}.jar"
        dest="${maven.home}/plugins/${maven.final.name}"
      />
  
    </goal>
  
    <goal name="plugin:undeploy"
          description="Delete the deployed version of the plugin">
      <delete dir="${maven.home}/plugins/${maven.final.name}"/>
    </goal>
  
    <goal name="plugin:uninstall"
          description="Delete all versions of the plugin">
      <attainGoal name="plugin:undeploy"/>
      <delete>
        <fileset dir="${maven.home}/plugins/" includes="${maven.final.name}.jar"/>
      </delete>
    </goal>
  
  </project>
  
  
  
  
  1.1                  
jakarta-turbine-maven/src/plugins-build/console/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project name="Maven Console Plugin">
  
    <title>Maven Console</title>
  
    <body>
      <links>
        <item name="Maven"      href="http://jakarta.apache.org/turbine/maven/"/>
      </links>
      <menu name="Overview">
        <item name="Goals"      href="/goals.html" />
      </menu>
    </body>
  </project>
  
  
  
  1.1                  
jakarta-turbine-maven/src/plugins-build/console/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
    <properties>
      <title>Changes</title>
      <author email="[EMAIL PROTECTED]">dIon Gillard</author>
    </properties>
  
    <body>
      <release version="1.0" date="in CVS">
        <action dev="dion" type="add" due-to="Jim Birchfield">
          Plugin graciously donated by Jim
        </action>
      </release>
    </body>
  </document>
  
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/console/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Maven Console</title>
      <author email="[EMAIL PROTECTED]">dIon Gillard</author>
    </properties>
  
    <body>
      <section name="Maven Console">
        <p>
          This plugin provides an interactive environment for executing
          Maven goals for a project. This cuts down on the JVM and Maven
          start-up times allowing for lightning-fast repetitive execution
          of Maven.
        </p>
        <p>
          The console simply loads the current project.xml and waits for
          the user to supply a goal (or other command) to execute. The
          following commands are currently implemented:
          <ul>
            <li>help - displays the valid commands for the console</li>
            <li>list - lists valid goals for the loaded project</li>
            <li><code>!!</code> - re-executes the last goal</li>
          </ul>
        </p>
        <p> 
          For more information on the functionality provided by this plugin,
          please see the <a href="goals.html">Goals</a> document.
        </p>
        <p>
          There are no properties available to customise this plugin
        </p>
      </section>
   </body>
  </document>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/console/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Maven Console Goals</title>
      <author email="[EMAIL PROTECTED]">dIon Gillard</author>
    </properties>
  
    <body>
      <section name="Goals">
        <table>
          <tr><th>Goal</th><th>Description</th></tr>
          <tr>
            <td>console</td>
            <td>
              This is the default goal of the plugin and starts the console
              awaiting input.
            </td>
          </tr>
          <tr>
            <td>console:listGoals</td>
            <td>
              Lists the goals available for the currently loaded project
            </td>
          </tr>
          <tr>
            <td>console:help</td>
            <td>Displays a help message along with a list of valid commands</td>
          </tr>
        </table>
      </section>
   </body>
  </document>
  
  
  

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

Reply via email to