continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r356800 - in /maven/continuum/trunk/continuum-webapp: ./ src/main/java/org/apache/maven/continuum/web/action/ src/main/resources/META-INF/plexus/ src/main/webapp/WEB-INF/
Date Wed, 14 Dec 2005 16:35:07 GMT
Author: evenisse
Date: Wed Dec 14 08:35:00 2005
New Revision: 356800

URL: http://svn.apache.org/viewcvs?rev=356800&view=rev
Log:
o Load Continuum object at start
o Auto-create database
o Add logger

Added:
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.properties   (with
props)
Modified:
    maven/continuum/trunk/continuum-webapp/pom.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.xml

Modified: maven/continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/pom.xml?rev=356800&r1=356799&r2=356800&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/pom.xml (original)
+++ maven/continuum/trunk/continuum-webapp/pom.xml Wed Dec 14 08:35:00 2005
@@ -11,6 +11,10 @@
   <packaging>war</packaging>
   <dependencies>
     <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-core</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-xwork-integration</artifactId>
       <version>1.0-alpha-1-SNAPSHOT</version>
@@ -21,10 +25,12 @@
       <version>2.2.1</version>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-log4j-logging</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
     </dependency>
   </dependencies>
 </project>

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=356800&r1=356799&r2=356800&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Wed Dec 14 08:35:00 2005
@@ -1,16 +1,34 @@
 package org.apache.maven.continuum.web.action;
 
+import org.apache.maven.continuum.Continuum;
+
 import com.opensymphony.xwork.ActionSupport;
 
-import java.util.List;
+import java.util.Collection;
 
 public class SummaryAction
     extends ActionSupport
 {
-    private List projects;
+    private Continuum continuum;
+    
+    private Collection projects;
 
     public String execute()
+        throws Exception
     {
+        try
+        {
+            projects = continuum.getProjects();
+        }
+        catch( Exception e )
+        {
+            e.printStackTrace();
+        }
         return SUCCESS;
+    }
+
+    public Collection getProjects()
+    {
+        return projects;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml?rev=356800&r1=356799&r2=356800&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
Wed Dec 14 08:35:00 2005
@@ -7,6 +7,119 @@
       <role>com.opensymphony.xwork.Action</role>
       <role-hint>summaryAction</role-hint>
       <implementation>org.apache.maven.continuum.web.action.SummaryAction</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.Continuum</role>
+        </requirement>
+      </requirements>
     </component>
+
+    <!--
+     | Components
+     |-->
+    <component>
+      <role>org.codehaus.plexus.jdo.JdoFactory</role>
+      <implementation>org.codehaus.plexus.jdo.DefaultJdoFactory</implementation>
+      <configuration>
+        <properties>
+          <!-- JPOX and JDO configuration -->
+          <property>
+            <name>javax.jdo.PersistenceManagerFactoryClass</name>
+            <value>org.jpox.PersistenceManagerFactoryImpl</value>
+          </property>
+          <property>
+            <name>org.jpox.autoCreateSchema</name>
+            <value>true</value>
+          </property>
+          <property>
+            <name>org.jpox.autoStartMechanism</name>
+            <value>SchemaTable</value>
+          </property>
+          <property>
+            <name>org.jpox.autoStartMechanismMode</name>
+            <value>Ignored</value>
+          </property>
+          <!-- Apache Derby Configuration -->
+          <property>
+            <name>javax.jdo.option.ConnectionDriverName</name>
+            <value>org.apache.derby.jdbc.EmbeddedDriver</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionURL</name>
+            <value>jdbc:derby:${plexus.home}/database;create=true</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionUserName</name>
+            <value>sa</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionPassword</name>
+            <value></value>
+          </property>
+
+          <!-- Postgresql Configuration -->
+          <!--
+          <property>
+            <name>javax.jdo.option.ConnectionDriverName</name>
+            <value>org.postgresql.Driver</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionURL</name>
+            <value>jdbc:postgresql://localhost/continuum</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionUserName</name>
+            <value>trygvis</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionPassword</name>
+            <value></value>
+          </property>
+          -->
+
+          <!-- HSQLDB Configuration -->
+          <!--
+            NOTE: NO NOT USE THIS CONFIGURATION FOR A PRODUCTION SYSTEM.
+            HSQLDB keeps all data in memory at all times.
+          -->
+          <!--
+                    <property>
+                      <name>javax.jdo.option.ConnectionDriverName</name>
+                      <value>org.hsqldb.jdbcDriver</value>
+                    </property>
+                    <property>
+                      <name>javax.jdo.option.ConnectionURL</name>
+                      <value>jdbc:hsqldb:${plexus.home}/database</value>
+                    </property>
+                    <property>
+                      <name>javax.jdo.option.ConnectionUserName</name>
+                      <value>sa</value>
+                    </property>
+                    <property>
+                      <name>javax.jdo.option.ConnectionPassword</name>
+                      <value></value>
+                    </property>
+
+                    <property>
+                      <name>org.jpox.transactionIsolation</name>
+                      <value>READ_UNCOMMITTED</value>
+                    </property>
+                    <property>
+                      <name>org.jpox.poid.transactionIsolation</name>
+                      <value>READ_UNCOMMITTED</value>
+                    </property>
+          -->
+          <property>
+            <name>org.jpox.transactionIsolation</name>
+            <value>READ_UNCOMMITTED</value>
+          </property>
+          <property>
+            <name>org.jpox.poid.transactionIsolation</name>
+            <value>READ_UNCOMMITTED</value>
+          </property>
+        </properties>
+      </configuration>
+    </component>
+
   </components>
 </component-set>

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.properties?rev=356800&view=auto
==============================================================================
    (empty)

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.properties
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.xml?rev=356800&r1=356799&r2=356800&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/plexus.xml Wed Dec 14 08:35:00
2005
@@ -1,8 +1,85 @@
 <plexus>
+  <load-on-start>
+    <component>
+      <role>org.apache.maven.continuum.Continuum</role>
+    </component>
+  </load-on-start>
+
   <components>
+
+    <!--
+     | Object factory for WebWork
+     -->
     <component>
       <role>com.opensymphony.xwork.ObjectFactory</role>
       <implementation>org.codehaus.plexus.xwork.PlexusObjectFactory</implementation>
     </component>
+
+    <!--
+     | Logger manager
+     -->
+    <component>
+      <role>org.codehaus.plexus.logging.LoggerManager</role>
+      <implementation>org.codehaus.plexus.logging.log4j.Log4JLoggerManager</implementation>
+      <lifecycle-handler>basic</lifecycle-handler>
+
+      <configuration>
+        <threshold>DEBUG</threshold>
+        <default-appender>console,rolling</default-appender>
+        <appenders>
+          <appender>
+            <id>console</id>
+            <threshold>DEBUG</threshold>
+            <type>org.apache.log4j.ConsoleAppender</type>
+            <conversion-pattern>%d [%t] %-5p %-30c{1} - %m%n</conversion-pattern>
+          </appender>
+
+          <appender>
+            <id>rolling</id>
+            <threshold>DEBUG</threshold>
+            <type>org.apache.log4j.RollingFileAppender</type>
+            <conversion-pattern>%-4r [%t] %-5p %c %x - %m%n</conversion-pattern>
+
+            <properties>
+              <property>
+                <name>file</name>
+                <value>${plexus.home}/logs/continuum.log</value>
+              </property>
+              <property>
+                <name>append</name>
+                <value>true</value>
+              </property>
+              <property>
+                <name>maxBackupIndex</name>
+                <value>10</value>
+              </property>
+              <property>
+                <name>maxFileSize</name>
+                <value>10MB</value>
+              </property>
+            </properties>
+          </appender>
+        </appenders>
+        <levels>
+          <level>
+            <hierarchy>org.codehaus.plexus.velocity</hierarchy>
+            <level>WARN</level>
+          </level>
+          <level>
+            <hierarchy>org.codehaus.plexus.mailsender.MailSender</hierarchy>
+            <level>INFO</level>
+          </level>
+          <level>
+            <hierarchy>JPOX</hierarchy>
+            <level>INFO</level>
+          </level>
+          <level>
+            <hierarchy>JPOX.Cache</hierarchy>
+            <level>WARN</level>
+          </level>
+        </levels>
+      </configuration>
+    </component>
   </components>
+
 </plexus>



Mime
View raw message