continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r729300 - in /continuum/trunk: continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/ continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/ continuum-base/continuum-scm/src/main/resources/META-INF/ conti...
Date Wed, 24 Dec 2008 11:49:51 GMT
Author: evenisse
Date: Wed Dec 24 03:49:50 2008
New Revision: 729300

URL: http://svn.apache.org/viewvc?rev=729300&view=rev
Log:
[CONTINUUM-2026] spring annotations

Removed:
    continuum/trunk/continuum-base/continuum-scm/src/test/resources/org/apache/continuum/scm/manager/ScmManagerTest.xml
Modified:
    continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/DefaultContinuumScm.java
    continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/Slf4jScmLogger.java
    continuum/trunk/continuum-base/continuum-scm/src/main/resources/META-INF/spring-context.xml
    continuum/trunk/continuum-store/src/test/resources/log4j.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml

Modified: continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/DefaultContinuumScm.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/DefaultContinuumScm.java?rev=729300&r1=729299&r2=729300&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/DefaultContinuumScm.java
(original)
+++ continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/DefaultContinuumScm.java
Wed Dec 24 03:49:50 2008
@@ -22,6 +22,8 @@
 import java.io.File;
 import java.io.IOException;
 
+import javax.annotation.Resource;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.scm.ScmException;
@@ -34,6 +36,7 @@
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.repository.ScmRepository;
 import org.apache.maven.scm.repository.ScmRepositoryException;
+import org.springframework.stereotype.Service;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -41,10 +44,12 @@
  * 
  * @version $Id$
  */
+@Service("continuumScm")
 public class DefaultContinuumScm
     implements ContinuumScm
 {
     /** The Maven SCM manager to use. */
+    @Resource
     private ScmManager scmManager;
 
     public CheckOutScmResult checkout( ContinuumScmConfiguration configuration )

Modified: continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/Slf4jScmLogger.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/Slf4jScmLogger.java?rev=729300&r1=729299&r2=729300&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/Slf4jScmLogger.java
(original)
+++ continuum/trunk/continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/Slf4jScmLogger.java
Wed Dec 24 03:49:50 2008
@@ -22,6 +22,7 @@
 import org.apache.maven.scm.log.ScmLogger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
 
 /**
  * SLF4J logger for Maven SCM.
@@ -29,6 +30,7 @@
  * 
  * @version $Id$
  */
+@Service("scmLogger")
 public class Slf4jScmLogger
     implements ScmLogger
 {

Modified: continuum/trunk/continuum-base/continuum-scm/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-scm/src/main/resources/META-INF/spring-context.xml?rev=729300&r1=729299&r2=729300&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-scm/src/main/resources/META-INF/spring-context.xml
(original)
+++ continuum/trunk/continuum-base/continuum-scm/src/main/resources/META-INF/spring-context.xml
Wed Dec 24 03:49:50 2008
@@ -1,16 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+                http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+                http://www.springframework.org/schema/context
+                http://www.springframework.org/schema/context/spring-context-2.5.xsd">
 
-  <bean id="continuumScm" class="org.apache.continuum.scm.DefaultContinuumScm">
-    <property name="scmManager" ref="scmManager" />
-  </bean>
+  <context:annotation-config />
+  <context:component-scan base-package="org.apache.continuum.scm"/>
 
   <bean id="scmManager" class="org.apache.continuum.scm.manager.ScmManager">
     <property name="scmLogger" ref="scmLogger" />
+    <property name="scmProviders">
+      <bean class="org.apache.continuum.scm.manager.spring.ScmProviderFactoryBean"/>
+    </property>
   </bean>
-
-  <bean id="scmLogger" class="org.apache.continuum.scm.manager.Slf4jScmLogger" />
 </beans>

Modified: continuum/trunk/continuum-store/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/resources/log4j.xml?rev=729300&r1=729299&r2=729300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/resources/log4j.xml (original)
+++ continuum/trunk/continuum-store/src/test/resources/log4j.xml Wed Dec 24 03:49:50 2008
@@ -32,6 +32,14 @@
     </layout>
   </appender>
 
+  <!-- quiet spring loading :-) -->
+  <category name="org.springframework.beans.factory.xml.XmlBeanDefinitionReader">
+    <priority value="ERROR"/>
+  </category>
+  <category name="org.springframework.beans.factory.support.DefaultListableBeanFactory">
+    <priority value="ERROR"/>
+  </category>
+
   <category name="JPOX">
     <priority value="ERROR"/>
     <appender-ref ref="default"/>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=729300&r1=729299&r2=729300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml Wed Dec
24 03:49:50 2008
@@ -52,14 +52,6 @@
   <bean id="workingDirectoryService" class="org.apache.maven.continuum.utils.ChrootJailWorkingDirectoryService"
autowire="byName"/>
   -->
 
-  <bean id="scmManager"
-    class="org.apache.continuum.scm.manager.ScmManager">
-    <property name="scmLogger" ref="scmLogger" />
-    <property name="scmProviders">
-      <bean class="org.apache.continuum.scm.manager.spring.ScmProviderFactoryBean"/>
-    </property>
-  </bean>
-  
   <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
     <property name="jndiName" value="java:comp/env/mail/Session">
     </property>



Mime
View raw message