dain 2004/01/27 11:33:40
Modified: . maven.xml modules/jetty/src/etc/META-INF geronimo-service.xml modules/kernel/src/java/org/apache/geronimo Geronimo.java Log: Applied patch 149 Enabled maven run, but still doesn't seem to start jetty or the web console Revision Changes Path 1.59 +54 -59 incubator-geronimo/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/incubator-geronimo/maven.xml,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- maven.xml 26 Jan 2004 18:02:15 -0000 1.58 +++ maven.xml 27 Jan 2004 19:33:40 -0000 1.59 @@ -542,74 +542,54 @@ <!-- ==================================================== --> <goal name="run"> - <ant:echo>Run targets are currently disabled. Please, check out the last working revision last_geronimombean.</ant:echo> + <j:set var="run.dir" value="${basedir}/target/${release.id}"/> - <!-- - | Should really execute the system script but for now... - --> - <!-- <j:set var="run.dir" value="${basedir}/target/${release.id}"/>--> - <!-- <j:jelly xmlns="jelly:ant">--> - <!-- <java--> - <!-- classname="org.codehaus.classworlds.Launcher"--> - <!-- fork="true"--> - <!-- maxmemory="128m"--> - <!-- failonerror="true"--> - <!-- dir="${run.dir}">--> - <!----> - <!-- <classpath>--> - <!-- <pathelement location="${run.dir}/lib/classworlds-SNAPSHOT.jar"/>--> - <!-- <pathelement location="${run.dir}/lib/geronimo-core-rmiclassloaderspi.jar"/>--> - <!-- </classpath>--> - <!----> - <!-- <sysproperty key="classworlds.conf" value="${run.dir}/etc/classworlds.conf"/>--> - <!-- <sysproperty key="program.name" value="maven:run"/>--> - <!-- <sysproperty key="twiddle.home" value="${run.dir}"/>--> - <!-- <sysproperty key="java.rmi.server.RMIClassLoaderSpi" value="org.apache.geronimo.rmi.RMIClassLoaderSpiImpl"/>--> - <!-- <arg value="geronimo/start"/>--> - <!-- </java>--> - <!-- </j:jelly>--> - </goal> + <j:jelly xmlns="jelly:ant"> - <goal name="run:main"> - <ant:echo>Run targets are currently disabled. Please, check out the last working revision last_geronimombean.</ant:echo> + <property environment="env"/> + <java classname="org.apache.geronimo.Geronimo" + fork="true" + maxmemory="256m" + failonerror="true" + dir="${run.dir}"> + + <jvmarg value="-ea"/> + + <classpath> + <pathelement path="${env.JAVA_HOME}/lib/tools.jar"/> + <pathelement path="${run.dir}/etc"/> + <fileset dir="${run.dir}/bootlib"> + <include name="*.jar"/> + </fileset> + <fileset dir="${run.dir}/lib"> + <include name="*.jar"/> + </fileset> + + <!-- temporary addition allows RMI to be used, such as with the JMX RMI connector --> + <pathelement location="${run.dir}/lib/geronimo-core-rmiclassloaderspi.jar"/> + </classpath> + + <sysproperty key="java.compiler" value="NONE"/> + <sysproperty key="program.name" value="maven:run"/> + <sysproperty key="java.rmi.server.RMIClassLoaderSpi" value="org.apache.geronimo.rmi.RMIClassLoaderSpiImpl"/> - <!-- <j:set var="run.dir" value="${basedir}/target/${release.id}"/>--> - <!----> - <!-- <j:jelly xmlns="jelly:ant">--> - <!----> - <!-- <property environment="env"/>--> - <!-- <java classname="org.apache.geronimo.kernel.Main"--> - <!-- fork="true"--> - <!-- maxmemory="256m"--> - <!-- failonerror="true"--> - <!-- dir="${run.dir}">--> - <!----> - <!-- <jvmarg value="-ea"/>--> - <!-- <classpath>--> - <!-- <pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>--> - <!-- <pathelement path="${run.dir}/etc"/>--> - <!-- <fileset dir="${run.dir}/bootlib">--> - <!-- <include name="*.jar"/>--> - <!-- </fileset>--> - <!----> - <!-- temporary addition allows RMI to be used, such as with the JMX RMI connector --> - <!-- <pathelement location="${run.dir}/lib/geronimo-core-rmiclassloaderspi.jar"/>--> - <!-- </classpath>--> - <!----> - <!-- <sysproperty key="program.name" value="maven:run"/>--> - <!-- <sysproperty key="java.rmi.server.RMIClassLoaderSpi" value="org.apache.geronimo.rmi.RMIClassLoaderSpiImpl"/>--> - <!-- </java>--> - <!-- </j:jelly>--> + <arg value="org/apache/geronimo/Server"/> + <arg value="${run.dir}/Server.car"/> + <arg value="${run.dir}/lib/geronimo-security-package-DEV.jar,${run.dir}/lib/geronimo-transaction-package-DEV.jar,${run.dir}/lib/geronimo-connector-package-DEV.jar,${run.dir}/lib/geronimo-jetty-package-DEV.jar"/> + <arg value="geronimo"/> + <arg value="${run.dir}/localConfigStore"/> + </java> + </j:jelly> </goal> - <goal name="debug:main"> + <goal name="run:debug"> <j:set var="run.dir" value="${basedir}/target/${release.id}"/> <j:jelly xmlns="jelly:ant"> <property environment="env"/> <java classname="org.apache.geronimo.kernel.Main" fork="true" - maxmemory="128m" + maxmemory="256m" failonerror="true" dir="${run.dir}"> @@ -620,6 +600,9 @@ <fileset dir="${run.dir}/bootlib"> <include name="*.jar"/> </fileset> + <fileset dir="${run.dir}/lib"> + <include name="*.jar"/> + </fileset> <!-- temporary addition allows RMI to be used, such as with the JMX RMI connector --> <pathelement location="${run.dir}/lib/geronimo-core-rmiclassloaderspi.jar"/> @@ -627,13 +610,25 @@ <jvmarg value="-Xdebug"/> <jvmarg value="-Xnoagent"/> - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"/> + <jvmarg value="-Xrunjdwp:transport=dt_socket,address=60000,server=y,suspend=y"/> <sysproperty key="java.compiler" value="NONE"/> <sysproperty key="program.name" value="maven:run"/> <sysproperty key="java.rmi.server.RMIClassLoaderSpi" value="org.apache.geronimo.rmi.RMIClassLoaderSpiImpl"/> + + <arg value="org/apache/geronimo/Server"/> + <arg value="${run.dir}/Server.car"/> + <arg value="${run.dir}/lib/geronimo-security-package-DEV.jar,${run.dir}/lib/geronimo-transaction-package-DEV.jar,${run.dir}/lib/geronimo-connector-package-DEV.jar,${run.dir}/lib/geronimo-jetty-package-DEV.jar"/> + <arg value="geronimo"/> + <arg value="${run.dir}/localConfigStore"/> </java> </j:jelly> + </goal> + + <goal name="run:main"> + <ant:echo></ant:echo> + <ant:echo>Pleas use "maven run" instead</ant:echo> + <ant:echo></ant:echo> </goal> <goal name="bootstrap:run"> 1.2 +7 -1 incubator-geronimo/modules/jetty/src/etc/META-INF/geronimo-service.xml Index: geronimo-service.xml =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/etc/META-INF/geronimo-service.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- geronimo-service.xml 27 Jan 2004 06:42:07 -0000 1.1 +++ geronimo-service.xml 27 Jan 2004 19:33:40 -0000 1.2 @@ -13,5 +13,11 @@ <!-- <default attribute="MaxConnections" type="int">10</default>--> <!-- <default attribute="MaxIdleTime" type="int">10</default>--> </gbean> - + <gbean class="org.apache.geronimo.jetty.JettyWebApplicationContext" objectName="geronimo.app:name=WebConsole"> + <default attribute="URI" type="java.net.URI">file:./deploy/jetty/geronimo-web-console.war</default> + <default attribute="ContextPath" type="java.lang.String">/geronimo-web-console</default> + <endpoint name="JettyContainer"> + <pattern>geronimo.web:type=WebContainer,container=Jetty</pattern> + </endpoint> + </gbean> </gbeans> 1.2 +24 -45 incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/Geronimo.java Index: Geronimo.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/Geronimo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Geronimo.java 26 Jan 2004 18:02:15 -0000 1.1 +++ Geronimo.java 27 Jan 2004 19:33:40 -0000 1.2 @@ -56,13 +56,13 @@ package org.apache.geronimo; +import org.apache.geronimo.kernel.Kernel; +import org.apache.geronimo.kernel.config.LocalConfigStore; + +import java.io.File; +import java.lang.reflect.Method; import java.net.URI; -import java.net.URISyntaxException; import java.net.URL; -import java.io.File; - -import org.apache.geronimo.kernel.config.LocalConfigStore; -import org.apache.geronimo.kernel.Kernel; /** * @@ -78,55 +78,34 @@ /** * Static entry point allowing a Kernel to be run from the command line. * Arguments are: + * <li>the id of a configuation to load</li> + * <li>deploy output file</li> + * <li>deploy urls</li> + * <li>domain</li> * <li>the filename of the directory to use for the configuration store. * This will be created if it does not exist.</li> - * <li>the id of a configuation to load</li> * Once the Kernel is booted and the configuration is loaded, the process * will remain running until the shutdown() method on the kernel is * invoked or until the JVM exits. * @param args */ - public static void main(String[] args) { - if (args.length < 2) { - System.err.println("usage: " + Kernel.class.getName() + " <config-store-dir> <config-id>"); - System.exit(1); - } - String storeDirName = args[0]; - URI configID = null; - try { - configID = new URI(args[1]); - } catch (URISyntaxException e) { - e.printStackTrace(); + public static void main(String[] args) throws Exception { + if (args.length < 5) { + System.err.println("usage: " + Geronimo.class.getName() + " <config-id> <deploy-out-file> <deploy-urls> <domain> <config-store>"); System.exit(1); } - String domain = "geronimo"; + String configIDString = args[0]; + String outfile = args[1]; + String urlsString = args[2]; + String domain = args[3]; + String storeDirName = args[4]; - Kernel kernel = null; - try { - kernel = createKernel(domain, storeDirName); - } catch (IllegalArgumentException e) { - System.err.println(e.getMessage()); - System.exit(1); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - try { - kernel.load(configID); - } catch (Exception e) { - kernel.shutdown(); - e.printStackTrace(); - System.exit(2); - } - while (kernel.isRunning()) { - try { - synchronized (kernel) { - kernel.wait(); - } - } catch (InterruptedException e) { - // continue - } - } + Class clazz = Class.forName("org.apache.geronimo.deployment.tools.DeployCommand"); + Method m = clazz.getMethod("deploy", new Class[]{String.class,String.class,String.class}); + m.invoke(null, new Object[]{configIDString, outfile, urlsString}); + + installPackage(domain, storeDirName, outfile); + loadAndWait(domain, storeDirName, configIDString); } public static Kernel createKernel(String domain, String storeDirName) throws Exception {