geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r670213 - in /geronimo/gbuild/trunk: ./ gbuild-agent-assembly/ gbuild-agent-assembly/src/main/assembly/ gbuild-agent-assembly/src/main/config/ gbuild-agent-assembly/src/main/scripts/ gbuild-agent/ gbuild-commands/ gbuild-commands/src/main/j...
Date Sat, 21 Jun 2008 15:44:21 GMT
Author: jdillon
Date: Sat Jun 21 08:44:20 2008
New Revision: 670213

URL: http://svn.apache.org/viewvc?rev=670213&view=rev
Log:
Tidy up, use new gshell stuff, almost functional again

Added:
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-classworlds.conf   (props
changed)
      - copied unchanged from r667563, geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh.conf
Removed:
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/commons-logging.properties
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh.conf
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh.properties
    geronimo/gbuild/trunk/gbuild-commands/src/main/resources/
    geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/src/main/resources/
    geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/main/resources/
Modified:
    geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/assembly/bin.xml
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh
    geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh.bat
    geronimo/gbuild/trunk/gbuild-agent/pom.xml
    geronimo/gbuild/trunk/gbuild-commands/pom.xml
    geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/AliasCommandSupport.java
    geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/BrokerCommand.java
    geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/ManagerCommand.java
    geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
    geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/SlaveCommand.java
    geronimo/gbuild/trunk/gbuild-extensions/gbuild-activity-extensions/pom.xml
    geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/pom.xml
    geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/pom.xml
    geronimo/gbuild/trunk/gbuild-extensions/pom.xml
    geronimo/gbuild/trunk/gbuild-report/pom.xml
    geronimo/gbuild/trunk/pom.xml

Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml Sat Jun 21 08:44:20 2008
@@ -28,12 +28,11 @@
         <groupId>org.apache.geronimo.gbuild</groupId>
         <artifactId>gbuild</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-agent-assembly</artifactId>
     <name>GBuild Agent Assembly</name>
-    <packaging>application-assembly</packaging>
+    <packaging>pom</packaging>
     
     <dependencies>
         <dependency>
@@ -71,19 +70,25 @@
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0-alpha-1</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-cli</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <artifactId>gshell-bootstrap</artifactId>
+            <version>1.0-alpha-1</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-standard-commands</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <artifactId>gshell-cli</artifactId>
+            <version>1.0-alpha-1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.commands</groupId>
+            <artifactId>gshell-builtins</artifactId>
+            <version>1.0-alpha-1</version>
         </dependency>
         
         <dependency>

Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/assembly/bin.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/assembly/bin.xml (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/assembly/bin.xml Sat Jun 21 08:44:20
2008
@@ -82,16 +82,29 @@
     <dependencySets>
         <dependencySet>
             <outputDirectory>lib</outputDirectory>
+            <useStrictFiltering>true</useStrictFiltering>
             <excludes>
-                <exclude>classworlds:classworlds</exclude>
+                <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+                <exclude>org.apache.geronimo.gshell:gshell-bootstrap</exclude>
             </excludes>
         </dependencySet>
-        
+
         <dependencySet>
             <outputDirectory>lib/boot</outputDirectory>
+            <useStrictFiltering>true</useStrictFiltering>
             <includes>
-                <include>classworlds:classworlds</include>
+                <include>org.codehaus.plexus:plexus-classworlds</include>
+            </includes>
+        </dependencySet>
+
+        <dependencySet>
+            <outputDirectory>lib/boot</outputDirectory>
+            <outputFileNameMapping>gshell-bootstrap.jar</outputFileNameMapping>
+            <useStrictFiltering>true</useStrictFiltering>
+            <includes>
+                <include>org.apache.geronimo.gshell:gshell-bootstrap</include>
             </includes>
         </dependencySet>
     </dependencySets>
+
 </assembly>

Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-classworlds.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-classworlds.conf
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-classworlds.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh Sat Jun 21 08:44:20 2008
@@ -19,48 +19,24 @@
 ##
 
 ##
-## $Rev: 437569 $ $Date: 2006-08-27 23:45:22 -0700 (Sun, 27 Aug 2006) $
+## $Rev: 572508 $ $Date: 2007-09-04 11:21:20 +0700 (Tue, 04 Sep 2007) $
 ##
 
-PROGNAME=`basename "$0"`
 DIRNAME=`dirname "$0"`
 
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# The version of classworlds to boot with
-CLASSWORLDS_VERSION="1.1"
-
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-die() {
-    warn "$*"
-    exit 1
-}
-
 # OS specific support (must be 'true' or 'false').
 cygwin=false;
-darwin=false;
 case "`uname`" in
     CYGWIN*)
         cygwin=true
         ;;
-        
-    Darwin*)
-        darwin=true
-        ;;
 esac
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin ; then
-    [ -n "$GSHELL_HOME" ] &&
-        GSHELL_HOME=`cygpath --unix "$GSHELL_HOME"`
-    [ -n "$JAVACMD" ] &&
-        JAVACMD=`cygpath --unix "$JAVACMD"`
-    [ -n "$JAVA_HOME" ] &&
-        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+    [ -n "$GSHELL_HOME" ] && GSHELL_HOME=`cygpath --unix "$GSHELL_HOME"`
+    [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
 fi
 
 # Locate GSHELL_HOME if not it is not set
@@ -68,78 +44,19 @@
     GSHELL_HOME=`cd "$DIRNAME/.."; pwd`
 fi
 
-# Use default classworlds config
-if [ -z "$CLASSWORLDS_CONF" ]; then
-    CLASSWORLDS_CONF="$GSHELL_HOME/etc/${PROGNAME}.conf"
-fi
-CLASSWORLDS_CLASSPATH="$GSHELL_HOME/lib/boot/classworlds-${CLASSWORLDS_VERSION}.jar"
-
 # Determine the Java command to use to start the JVM
 if [ -z "$JAVACMD" ]; then
     if [ -n "$JAVA_HOME" ]; then
-        if [ -x "$JAVA_HOME/jre/sh/java" ]; then
-            # IBM's JDK on AIX uses strange locations for the executables
-            JAVACMD="$JAVA_HOME/jre/sh/java"
-        else
-            JAVACMD="$JAVA_HOME/bin/java"
-        fi
+        JAVACMD="$JAVA_HOME/bin/java"
     else
         JAVACMD="java"
     fi
 fi
-if [ ! -x "$JAVACMD" ]; then
-    die "JAVA_HOME is not defined correctly; can not execute: $JAVACMD"
-fi
-if [ -z "$JAVA_HOME" ] ; then
-    warn "JAVA_HOME environment variable is not set"
-fi
-
-# Increase the maximum file descriptors if we can
-if [ "$cygwin" = "false" ]; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ]; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-            # use the system max
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ]; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
 
-# Setup Profiler
-useprofiler=false
-if [ "x$PROFILER" != "x" ]; then
-    if [ -r "$PROFILER" ]; then
-        . $PROFILER
-        useprofiler=true
-    else
-        die "Profiler file not found: $PROFILER"
-    fi
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-    GSHELL_HOME=`cygpath --path --windows "$GSHELL_HOME"`
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
-    CLASSWORLDS_CONF=`cygpath --path --windows "$CLASSWORLDS_CONF"`
-    CLASSWORLDS_CLASSPATH=`cygpath --path --windows "$CLASSWORLDS_CLASSPATH"`
+BOOTJAR="$GSHELL_HOME/lib/boot/gshell-bootstrap.jar"
+if $cygwin ; then
+    BOOTJAR=`cygpath --windows "$BOOTJAR"`
 fi
 
-# Start the Profiler or the JVM
-if $useprofiler; then
-    runProfiler
-else
-    exec $JAVACMD $JAVA_OPTS \
-        -classpath "$CLASSWORLDS_CLASSPATH" \
-        -Dprogram.name="$PROGNAME" \
-        -Dclassworlds.conf="$CLASSWORLDS_CONF" \
-        -Dgshell.home="$GSHELL_HOME" \
-        -Dlog4j.configuration="${PROGNAME}-log4j.properties" \
-        org.codehaus.classworlds.Launcher "$@"
-fi
+# Start the JVM
+exec "$JAVACMD" $JAVA_OPTS -jar "$BOOTJAR" "$@"

Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh.bat
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh.bat?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh.bat (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/scripts/gsh.bat Sat Jun 21 08:44:20
2008
@@ -1,5 +1,5 @@
 @if "%DEBUG%" == "" @echo off
-rem 
+rem
 rem Licensed to the Apache Software Foundation (ASF) under one
 rem or more contributor license agreements.  See the NOTICE file
 rem distributed with this work for additional information
@@ -7,117 +7,76 @@
 rem to you under the Apache License, Version 2.0 (the
 rem "License"); you may not use this file except in compliance
 rem with the License.  You may obtain a copy of the License at
-rem 
+rem
 rem  http://www.apache.org/licenses/LICENSE-2.0
-rem 
+rem
 rem Unless required by applicable law or agreed to in writing,
 rem software distributed under the License is distributed on an
 rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 rem KIND, either express or implied.  See the License for the
 rem specific language governing permissions and limitations
 rem under the License.
-rem 
+rem
 
-rem 
+rem
 rem $Rev$ $Date$
-rem 
+rem
 
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem The version of classworlds to boot with
-set CLASSWORLDS_VERSION=1.1
+if "%OS%"=="Windows_NT" setlocal enableextensions
+set ERRORLEVEL=0
 
 :begin
-@rem Determine what directory it is in.
+
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
 
-if "%PROGNAME%" == "" set PROGNAME=gsh
-
-@rem Determine the command interpreter to execute the "CD" later
-set COMMAND_COM="cmd.exe"
-if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
-if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
-
-@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
-set FIND_EXE="find.exe"
-if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
-if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
+:check_JAVACMD
+if not "%JAVACMD%" == "" goto check_GSHELL_HOME
 
 :check_JAVA_HOME
-@rem Make sure we have a valid JAVA_HOME
 if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
-
-echo.
-echo ERROR: Environment variable JAVA_HOME has not been set.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-echo.
-goto end
+set JAVACMD=java
+goto check_GSHELL_HOME
 
 :have_JAVA_HOME
-@rem Validate JAVA_HOME
-%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
-if not errorlevel 1 goto check_GSHELL_HOME
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-echo.
-goto end
+set JAVACMD=%JAVA_HOME%\bin\java
+goto check_GSHELL_HOME
 
 :check_GSHELL_HOME
-@rem Define GSHELL_HOME if not set
 if "%GSHELL_HOME%" == "" set GSHELL_HOME=%DIRNAME%..
 
 :init
-@rem Get command-line arguments, handling Windowz variants
+rem Get command-line arguments, handling Windowz variants
 if not "%OS%" == "Windows_NT" goto win9xME_args
 if "%eval[2+2]" == "4" goto 4NT_args
 
-@rem Regular WinNT shell
-set CMD_LINE_ARGS=%*
+rem Regular WinNT shell
+set ARGS=%*
 goto execute
 
 :win9xME_args
-@rem Slurp the command line arguments.  This loop allows for an unlimited number
-set CMD_LINE_ARGS=
+rem Slurp the command line arguments.  This loop allows for an unlimited number
+set ARGS=
 
 :win9xME_args_slurp
 if "x%1" == "x" goto execute
-set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+set ARGS=%ARGS% %1
 shift
 goto win9xME_args_slurp
 
 :4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
+rem Get arguments from the 4NT Shell from JP Software
+set ARGS=%$
 
 :execute
-@rem Setup the command line
-set CLASSWORLDS_CLASSPATH=%GSHELL_HOME%\lib\boot\classworlds-%CLASSWORLDS_VERSION%.jar
-set CLASSWORLDS_MAIN_CLASS=org.codehaus.classworlds.Launcher
-set CLASSWORLDS_CONF=%GSHELL_HOME%\etc\%PROGNAME%.conf
-
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
-
-if "%JAVA_OPTS%" == "" set JAVA_OPTS=""
-set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
-set JAVA_OPTS=%JAVA_OPTS% -Dgshell.home="%GSHELL_HOME%"
-set JAVA_OPTS=%JAVA_OPTS% -Dclassworlds.conf="%CLASSWORLDS_CONF%"
-set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="%PROGNAME%-log4j.properties"
 
-@rem Execute Gshell
-"%JAVA_EXE%" %JAVA_OPTS% -classpath "%CLASSWORLDS_CLASSPATH%" %CLASSWORLDS_MAIN_CLASS% %CMD_LINE_ARGS%
+set BOOTJAR=%GSHELL_HOME%\lib\boot\gshell-bootstrap.jar
+
+rem Start the JVM
+"%JAVACMD%" %JAVA_OPTS% -jar "%BOOTJAR%" %ARGS%
 
 :end
-@rem End local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" endlocal
 
-@rem Optional pause the batch file
+if "%OS%"=="Windows_NT" endlocal
 if "%GSHELL_BATCH_PAUSE%" == "on" pause
 

Modified: geronimo/gbuild/trunk/gbuild-agent/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-agent/pom.xml Sat Jun 21 08:44:20 2008
@@ -28,7 +28,6 @@
         <groupId>org.apache.geronimo.gbuild</groupId>
         <artifactId>gbuild</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-agent</artifactId>

Modified: geronimo/gbuild/trunk/gbuild-commands/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-commands/pom.xml Sat Jun 21 08:44:20 2008
@@ -28,7 +28,6 @@
         <groupId>org.apache.geronimo.gbuild</groupId>
         <artifactId>gbuild</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-commands</artifactId>
@@ -37,14 +36,20 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-api</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <artifactId>gshell-command-api</artifactId>
+            <version>1.0-alpha-1</version>
         </dependency>
 
         <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-clp</artifactId>
+            <version>1.0-alpha-1</version>
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0-alpha-1</version>
         </dependency>
 
         <!-- ActiveMQ Support -->
@@ -104,6 +109,18 @@
                     <linkModules>true</linkModules>
                 </configuration>
             </plugin>
+            
+            <plugin>
+                <groupId>org.apache.geronimo.gshell</groupId>
+                <artifactId>gshell-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>descriptor</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/AliasCommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/AliasCommandSupport.java?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/AliasCommandSupport.java
(original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/AliasCommandSupport.java
Sat Jun 21 08:44:20 2008
@@ -19,13 +19,8 @@
 
 package org.apache.geronimo.gbuild.commands;
 
-import org.apache.commons.cli.CommandLine;
-
 import org.apache.geronimo.gshell.command.CommandSupport;
-import org.apache.geronimo.gshell.command.CommandException;
-import org.apache.geronimo.gshell.command.MessageSource;
-import org.apache.geronimo.gshell.Shell;
-import org.apache.geronimo.gshell.console.IO;
+import org.apache.geronimo.gshell.shell.Shell;
 
 //
 // TODO: This should be replaceable by a generic alias facility in GShell
@@ -39,13 +34,11 @@
 public abstract class AliasCommandSupport
     extends CommandSupport
 {
-    private Shell shell;
-
-    private String[] alias;
+    private final Shell shell;
 
-    protected AliasCommandSupport(final String name, final Shell shell, final String... alias)
{
-        super(name);
+    private final String[] alias;
 
+    protected AliasCommandSupport(final Shell shell, final String... alias) {
         assert shell != null;
         assert alias != null && alias.length != 0;
         
@@ -53,26 +46,7 @@
         this.alias = alias;
     }
 
-    protected boolean processCommandLine(final CommandLine line) throws CommandException
{
-        assert line != null;
-
-        String[] args = line.getArgs();
-
-        IO io = getIO();
-        MessageSource messages = getMessageSource();
-
-        if (args.length != 0) {
-            io.err.println(messages.getMessage("cli.error.too_many_args"));
-
-            return true;
-        }
-
-        return false;
-    }
-
-    protected Object doExecute(final Object[] args) throws Exception {
-        assert args != null;
-
+    protected Object doExecute() throws Exception {
         return shell.execute(alias);
     }
 }

Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/BrokerCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/BrokerCommand.java?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/BrokerCommand.java
(original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/BrokerCommand.java
Sat Jun 21 08:44:20 2008
@@ -19,73 +19,36 @@
 
 package org.apache.geronimo.gbuild.commands;
 
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.InetAddress;
-import java.util.Properties;
-import java.io.File;
-
-import org.codehaus.plexus.embed.Embedder;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
-
-import org.apache.geronimo.gshell.command.CommandSupport;
-import org.apache.geronimo.gshell.command.CommandException;
-import org.apache.geronimo.gshell.command.MessageSource;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.console.IO;
+import org.apache.geronimo.gshell.command.CommandSupport;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
+
+import java.net.URI;
 
 /**
  * Start an <a href="http://activemq.org">ActiveMQ</a> message broker.
  *
  * @version $Rev$ $Date$
  */
+@CommandComponent(id="gbuild:broker")
 public class BrokerCommand
     extends CommandSupport
 {
-    public BrokerCommand() {
-        super("broker");
-    }
-
-    protected String getUsage() {
-        return super.getUsage() + " [<resource|file|url>]";
-    }
-
-    protected boolean processCommandLine(final CommandLine line) throws CommandException
{
-        assert line != null;
-
-        String[] args = line.getArgs();
-
-        IO io = getIO();
-        MessageSource messages = getMessageSource();
-
-        if (args.length > 1) {
-            io.err.println(messages.getMessage("cli.error.too_many_args"));
-
-            return true;
-        }
-
-        return false;
-    }
-
-    protected Object doExecute(final Object[] args) throws Exception {
-        assert args != null;
-
-        IO io = getIO();
+    @Argument
+    private URI config;
 
+    protected Object doExecute() throws Exception {
         BrokerService broker;
         URI uri;
 
-        if (args.length == 1) {
-            uri = new URI(String.valueOf(args[0]));
+        if (config == null) {
+            uri = new URI("xbean:activemq.xml");
         }
         else {
-            uri = new URI("xbean:activemq.xml");
+            uri = config;
         }
 
         log.info("Configuring broker from URI: " + uri);

Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/ManagerCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/ManagerCommand.java?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/ManagerCommand.java
(original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/ManagerCommand.java
Sat Jun 21 08:44:20 2008
@@ -19,7 +19,8 @@
 
 package org.apache.geronimo.gbuild.commands;
 
-import org.apache.geronimo.gshell.Shell;
+import org.apache.geronimo.gshell.shell.Shell;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
 
 /**
  * Start the GBuild master node.
@@ -30,10 +31,11 @@
  *
  * @version $Rev$ $Date$
  */
+@CommandComponent(id="gbuild:manager")
 public class ManagerCommand
     extends AliasCommandSupport
 {
     public ManagerCommand(final Shell shell) {
-        super("manager", shell, "plexus", "manager/application.xml");
+        super(shell, "plexus", "manager/application.xml");
     }
 }

Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
(original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
Sat Jun 21 08:44:20 2008
@@ -19,67 +19,32 @@
 
 package org.apache.geronimo.gbuild.commands;
 
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.Properties;
-import java.io.File;
-
-import org.codehaus.plexus.embed.Embedder;
-
-import org.apache.commons.cli.CommandLine;
-
+import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
-import org.apache.geronimo.gshell.command.MessageSource;
-import org.apache.geronimo.gshell.command.CommandException;
-import org.apache.geronimo.gshell.console.IO;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
+import org.codehaus.plexus.embed.Embedder;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
 
 /**
  * Start a <a href="http://plexus.codehaus.org">Plexus</a> application.
  *
  * @version $Rev$ $Date$
  */
+@CommandComponent(id="gbuild:plexus")
 public class PlexusCommand
     extends CommandSupport
 {
     private Embedder embedder;
 
-    public PlexusCommand() {
-        super("plexus");
-    }
-
-    protected String getUsage() {
-        return super.getUsage() + " <resource|file|url>";
-    }
-
-    protected boolean processCommandLine(final CommandLine line) throws CommandException
{
-        assert line != null;
-
-        String[] args = line.getArgs();
-
-        IO io = getIO();
-        MessageSource messages = getMessageSource();
-
-        if (args.length == 0) {
-            io.err.println(messages.getMessage("cli.error.missing_configuration"));
-
-            return true;
-        }
-        if (args.length != 1) {
-            io.err.println(messages.getMessage("cli.error.too_many_args"));
-
-            return true;
-        }
-
-        return false;
-    }
-    
-    protected Object doExecute(final Object[] args) throws Exception {
-        assert args != null;
-
-        IO io = getIO();
+    @Argument(required=true)
+    private String configuration;
 
-        String configuration = String.valueOf(args[0]);
+    protected Object doExecute() throws Exception {
         URL url = findConfigurationURL(configuration);
         if (url == null) {
             throw new Exception("Unable to load slave application configuration: " + configuration);

Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/SlaveCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/SlaveCommand.java?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/SlaveCommand.java
(original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/SlaveCommand.java
Sat Jun 21 08:44:20 2008
@@ -19,7 +19,8 @@
 
 package org.apache.geronimo.gbuild.commands;
 
-import org.apache.geronimo.gshell.Shell;
+import org.apache.geronimo.gshell.shell.Shell;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
 
 /**
  * Start a GBuild slave node.
@@ -30,10 +31,11 @@
  *
  * @version $Rev$ $Date$
  */
+@CommandComponent(id="gbuild:slave")
 public class SlaveCommand
     extends AliasCommandSupport
 {
     public SlaveCommand(final Shell shell) {
-        super("slave", shell, "plexus", "slave/application.xml");
+        super(shell, "plexus", "slave/application.xml");
     }
 }
\ No newline at end of file

Modified: geronimo/gbuild/trunk/gbuild-extensions/gbuild-activity-extensions/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-extensions/gbuild-activity-extensions/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-extensions/gbuild-activity-extensions/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-extensions/gbuild-activity-extensions/pom.xml Sat Jun 21
08:44:20 2008
@@ -25,7 +25,6 @@
         <groupId>org.apache.geronimo.gbuild.extension</groupId>
         <artifactId>gbuild-extensions</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-activity-extensions</artifactId>

Modified: geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-extensions/gbuild-requeue-extensions/pom.xml Sat Jun 21 08:44:20
2008
@@ -25,7 +25,6 @@
         <groupId>org.apache.geronimo.gbuild.extension</groupId>
         <artifactId>gbuild-extensions</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-requeue-extensions</artifactId>

Modified: geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/pom.xml Sat Jun 21
08:44:20 2008
@@ -25,7 +25,6 @@
         <groupId>org.apache.geronimo.gbuild.extension</groupId>
         <artifactId>gbuild-extensions</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-standard-extensions</artifactId>

Modified: geronimo/gbuild/trunk/gbuild-extensions/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-extensions/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-extensions/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-extensions/pom.xml Sat Jun 21 08:44:20 2008
@@ -28,7 +28,6 @@
         <groupId>org.apache.geronimo.gbuild</groupId>
         <artifactId>gbuild</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.geronimo.gbuild.extension</groupId>

Modified: geronimo/gbuild/trunk/gbuild-report/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-report/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-report/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-report/pom.xml Sat Jun 21 08:44:20 2008
@@ -28,7 +28,6 @@
         <groupId>org.apache.geronimo.gbuild</groupId>
         <artifactId>gbuild</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>gbuild-report</artifactId>

Modified: geronimo/gbuild/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/pom.xml?rev=670213&r1=670212&r2=670213&view=diff
==============================================================================
--- geronimo/gbuild/trunk/pom.xml (original)
+++ geronimo/gbuild/trunk/pom.xml Sat Jun 21 08:44:20 2008
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.geronimo.genesis.config</groupId>
         <artifactId>project-config</artifactId>
-        <version>1.1</version>
+        <version>1.3</version>
     </parent>
     
     <groupId>org.apache.geronimo.gbuild</groupId>
@@ -210,41 +210,143 @@
         <pluginManagement>
             <plugins>
                 <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-enforcer-plugin</artifactId>
+                    <version>1.0-alpha-3</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>2.2</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-remote-resources-plugin</artifactId>
+                    <version>1.0</version>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>process</goal>
+                            </goals>
+                            <configuration>
+                                <resourceBundles>
+                                    <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
+                                </resourceBundles>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>2.0.2</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.2</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.4.2</version>
+                    <configuration>
+                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                        <argLine>-enableassertions:org.apache.geronimo.gbuild</argLine>
+                    </configuration>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.2</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.4</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-plugin-plugin</artifactId>
+                    <version>2.4.1</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>1.1</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>2.2-beta-2</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.3</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-release-plugin</artifactId>
+                    <version>2.0-beta-7</version>
+                </plugin>
+                
+                <plugin>
                     <groupId>org.codehaus.plexus</groupId>
                     <artifactId>plexus-maven-plugin</artifactId>
-                    <version>1.1.1</version>
-                    <extensions>true</extensions>
+                    <version>1.3.6</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>shitty-maven-plugin</artifactId>
+                    <version>1.0-alpha-2</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.geronimo.gshell.buildsupport</groupId>
+                    <artifactId>gshell-maven-plugin</artifactId>
+                    <version>1.0-alpha-1</version>
                 </plugin>
             </plugins>
         </pluginManagement>
         
         <plugins>
             <plugin>
-                <groupId>org.apache.geronimo.genesis.plugins</groupId>
-                <artifactId>tools-maven-plugin</artifactId>
-
-                <!-- Tools includes custom packagings, install as extension to pick them
up -->
-                <extensions>true</extensions>
-                
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>validate-java-version</id>
                         <phase>validate</phase>
                         <goals>
-                            <goal>require-java-version</goal>
+                            <goal>enforce</goal>
                         </goals>
                         <configuration>
-                            <version>1.5+</version>
+                            <rules>
+                                <!-- Allow any Java >= 1.5, but not 1.6 or above -->
+                                <requireJavaVersion>
+                                    <version>[1.5,1.6)</version>
+                                </requireJavaVersion>
+                                
+                                <!-- Allow any Maven >= 2.0.9 -->
+                                <requireMavenVersion>
+                                    <version>[2.0.9,)</version>
+                                </requireMavenVersion>
+                            </rules>
                         </configuration>
                     </execution>
-                    
-                    <execution>
-                        <id>install-legal-files</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>copy-legal-files</goal>
-                        </goals>
-                    </execution>
                 </executions>
             </plugin>
             
@@ -252,26 +354,12 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.4</source>
-                    <target>1.4</target>
-                </configuration>
-            </plugin>
-            
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-idea-plugin</artifactId>
-                <configuration>
-                    <jdkName>1.4</jdkName>
-                    <jdkLevel>1.4</jdkLevel>
-                    <linkModules>true</linkModules>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-release-plugin</artifactId>
-                <configuration>
-                    <tagBase>https://svn.apache.org/repos/asf/geronimo/gbuild/tags</tagBase>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                    <optimize>true</optimize>
+                    <debug>true</debug>
+                    <showDeprecation>true</showDeprecation>
+                    <showWarnings>true</showWarnings>
                 </configuration>
             </plugin>
         </plugins>



Mime
View raw message