[jboss-cvs] JBossAS SVN: r87657 - in projects/bootstrap/trunk: main and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 22 01:40:36 EDT 2009


Author: ALRubinger
Date: 2009-04-22 01:40:34 -0400 (Wed, 22 Apr 2009)
New Revision: 87657

Added:
   projects/bootstrap/trunk/main/
   projects/bootstrap/trunk/main/.classpath
   projects/bootstrap/trunk/main/.project
   projects/bootstrap/trunk/main/.settings/
   projects/bootstrap/trunk/main/.settings/org.eclipse.jdt.core.prefs
   projects/bootstrap/trunk/main/.settings/org.maven.ide.eclipse.prefs
   projects/bootstrap/trunk/main/pom.xml
   projects/bootstrap/trunk/main/src/
   projects/bootstrap/trunk/main/src/java/
   projects/bootstrap/trunk/main/src/main/
   projects/bootstrap/trunk/main/src/main/java/
   projects/bootstrap/trunk/main/src/main/java/org/
   projects/bootstrap/trunk/main/src/main/java/org/jboss/
   projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/
   projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/main/
   projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/main/Main.java
   projects/bootstrap/trunk/main/src/main/resources/
   projects/bootstrap/trunk/main/src/test/
   projects/bootstrap/trunk/main/src/test/java/
   projects/bootstrap/trunk/main/src/test/resources/
Log:
[JBBOOT-48] Prototype skeleton commit of bootstrap-main (really a placeholder at the moment)


Property changes on: projects/bootstrap/trunk/main
___________________________________________________________________
Name: svn:ignore
   + target
eclipse-target

Name: svn:mergeinfo
   + 

Added: projects/bootstrap/trunk/main/.classpath
===================================================================
--- projects/bootstrap/trunk/main/.classpath	                        (rev 0)
+++ projects/bootstrap/trunk/main/.classpath	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,9 @@
+<classpath>
+  <classpathentry kind="src" path="src/test/java" output="eclipse-target/tests-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="eclipse-target/tests-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="eclipse-target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Added: projects/bootstrap/trunk/main/.project
===================================================================
--- projects/bootstrap/trunk/main/.project	                        (rev 0)
+++ projects/bootstrap/trunk/main/.project	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,17 @@
+<projectDescription>
+  <name>jboss-bootstrap-main</name>
+  <comment>JBoss Bootstrap Standalone Main for Servers</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.maven.ide.eclipse.maven2Builder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.maven.ide.eclipse.maven2Nature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/bootstrap/trunk/main/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/bootstrap/trunk/main/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/main/.settings/org.eclipse.jdt.core.prefs	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,5 @@
+#Wed Apr 22 00:36:24 GMT-05:00 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/bootstrap/trunk/main/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/bootstrap/trunk/main/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/main/.settings/org.maven.ide.eclipse.prefs	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,8 @@
+#Tue Apr 21 14:20:39 GMT-05:00 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1

Added: projects/bootstrap/trunk/main/pom.xml
===================================================================
--- projects/bootstrap/trunk/main/pom.xml	                        (rev 0)
+++ projects/bootstrap/trunk/main/pom.xml	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.bootstrap</groupId>
+    <artifactId>jboss-bootstrap-build</artifactId>
+    <version>0.1.0</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Configuration -->
+  <artifactId>jboss-bootstrap-main</artifactId>
+  <name>JBoss Bootstrap Standalone Main for Servers</name>
+  <version>0.1.2-SNAPSHOT</version>
+  <description>JBoss Bootstrap Standalone Main for Servers</description>
+
+
+  <!-- Properties -->
+  <properties>
+
+    <version.org.jboss.bootstrap_jboss.bootstrap.spi>0.1.2-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi>
+
+  </properties>
+
+  <!-- Build -->
+  <build>
+
+  </build>
+
+  <!-- Dependencies -->
+  <dependencies>
+
+    <!--
+      A very restrictive dependency set is declared here to keep the
+      classes required upon the application ClassPath (extension CL) to
+      a bare minimum
+    -->
+
+    <!-- junit:junit -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+
+    <!-- org.jboss.bootstrap:jboss-bootstrap-spi -->
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-spi</artifactId>
+      <version>${version.org.jboss.bootstrap_jboss.bootstrap.spi}</version>
+    </dependency>
+
+  </dependencies>
+</project>

Added: projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/main/Main.java
===================================================================
--- projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/main/Main.java	                        (rev 0)
+++ projects/bootstrap/trunk/main/src/main/java/org/jboss/bootstrap/main/Main.java	2009-04-22 05:40:34 UTC (rev 87657)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.main;
+
+import java.io.PrintStream;
+import java.util.logging.Logger;
+
+import org.jboss.bootstrap.spi.config.ServerConfig;
+import org.jboss.bootstrap.spi.server.Server;
+
+/**
+ * Main
+ * 
+ * Standalone entry point for generic Servers
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class Main<T extends Server<T, K>, K extends ServerConfig<K>>
+{
+
+   //-------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   private static final Logger log = Logger.getLogger(Main.class.getName());
+
+   //-------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   private String serverImplementationClass;
+
+   private T server;
+
+   //-------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   protected Main(final K config)
+   {
+
+   }
+
+   //-------------------------------------------------------------------------------||
+   // Main -------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * Process Entry Point
+    * 
+    * @param args CLI Arguments
+    */
+   public static void main(String... args)
+   {
+      // Precondition check
+      if (args.length == 0)
+      {
+         throw new RuntimeException(
+               "Fully-qualified name of Server implementation Class is a required first argument:\n"
+                     + getUsageMessage().toString());
+      }
+
+   }
+
+   //-------------------------------------------------------------------------------||
+   // Functional Methods -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------||
+
+   /**
+    * 
+    */
+   protected static StringBuilder getUsageMessage()
+   {
+      // Initialize
+      final StringBuilder sb = new StringBuilder();
+
+      return sb;
+   }
+
+   /**
+    * Obtains the PrintStream target used for writing 
+    * log/error messages.  Used to avoid the dependency upon
+    *  
+    *  
+    * @return
+    */
+   protected static PrintStream getOut()
+   {
+      return System.out;
+   }
+
+   protected void run() throws Throwable
+   {
+      // Start up
+      this.server.start();
+   }
+
+   /**
+    * Parses the specified command-line arguments
+    * into a {@link ServerConfig}
+    * 
+    * @param args
+    * @throws IllegalArgumentException If the arguments were not 
+    *   supplied (null)
+    */
+   private K parseConfig(String... args) throws IllegalArgumentException
+   {
+      // Precondition check
+      if (args == null)
+      {
+         throw new IllegalArgumentException("Arguments are required");
+      }
+
+      // Start with a default configuration
+      final K config = this.getDefaultConfig();
+
+      // Parse stuff
+
+      return config;
+   }
+
+   protected K getDefaultConfig()
+   {
+      return null;
+   }
+
+}




More information about the jboss-cvs-commits mailing list