continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r641998 - in /continuum/trunk: ./ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-commons/ continuum-commons/src/main/java/org/apache/maven/continuum/utils/ continuum-core/ continuum-core/src/main/java/org/apache/maven/con...
Date Thu, 27 Mar 2008 22:04:57 GMT
Author: olamy
Date: Thu Mar 27 15:04:44 2008
New Revision: 641998

URL: http://svn.apache.org/viewvc?rev=641998&view=rev
Log:
[CONTINUUM-1703] use plexus-spring in continuum-webapp

svn merge -r 637284:641979 https://svn.apache.org/repos/asf/continuum/branches/continuum-spring


Added:
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/ContinuumUrlValidator.java
      - copied unchanged from r641979, continuum/branches/continuum-spring/continuum-commons/src/main/java/org/apache/maven/continuum/utils/ContinuumUrlValidator.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/
      - copied from r641979, continuum/branches/continuum-spring/continuum-webapp/src/main/java/org/apache/continuum/
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/
      - copied from r641979, continuum/branches/continuum-spring/continuum-webapp/src/main/java/org/apache/continuum/web/
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/
      - copied from r641979, continuum/branches/continuum-spring/continuum-webapp/src/main/java/org/apache/continuum/web/startup/
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
      - copied unchanged from r641979, continuum/branches/continuum-spring/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml
      - copied unchanged from r641979, continuum/branches/continuum-spring/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml
Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    continuum/trunk/continuum-commons/pom.xml
    continuum/trunk/continuum-core/pom.xml
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    continuum/trunk/continuum-core/src/test/resources/log4j.properties
    continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
    continuum/trunk/continuum-test/pom.xml
    continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp/pom.xml
    continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    continuum/trunk/continuum-webapp/src/main/resources/webwork.properties
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
    continuum/trunk/pom.xml

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Thu Mar 27 15:04:44 2008
@@ -624,4 +624,8 @@
     ProfileService getProfileService();
 
     BuildDefinitionService getBuildDefinitionService();
+    
+    
+    public void startup()
+        throws ContinuumException;
 }

Modified: continuum/trunk/continuum-commons/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/pom.xml (original)
+++ continuum/trunk/continuum-commons/pom.xml Thu Mar 27 15:04:44 2008
@@ -46,6 +46,16 @@
       <artifactId>continuum-test</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-spring</artifactId>
+      <scope>test</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>      
   </dependencies>
   <build>
     <plugins>

Modified: continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/pom.xml (original)
+++ continuum/trunk/continuum-core/pom.xml Thu Mar 27 15:04:44 2008
@@ -198,7 +198,17 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-log4j-logging</artifactId>
       <scope>test</scope>
-    </dependency>    
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-spring</artifactId>
+      <scope>test</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>          
   </dependencies>
   <build>
     <plugins>
@@ -256,6 +266,17 @@
                   <name>M2_HOME</name>
                   <value>${maven.home}</value>    
                 </property>                      
+                <property>
+                  <name>plexus.home</name>
+                  <!-- ${project.build.directory} is not evaluated see surefire documentation
-->
+                  <!--value>${project.build.directory}</value-->
+                  <value>./target</value>
+                </property>
+                <property>
+                  <!-- java.io.tmpdir is a shared directory on solaris and cause permission
issues -->
+                  <name>java.io.tmpdir</name>
+                  <value>./target</value>
+                </property> 
               </systemProperties>
             </configuration>
           </plugin>
@@ -278,4 +299,4 @@
       </build>
     </profile>
   </profiles>
-</project>
\ No newline at end of file
+</project>

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Mar 27 15:04:44 2008
@@ -102,7 +102,7 @@
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l </a>
  * @version $Id$
- * @plexus.component role="org.apache.maven.continuum.Continuum"
+ * @plexus.component role="org.apache.maven.continuum.Continuum" role-hint="default"
  */
 public class DefaultContinuum
     extends AbstractLogEnabled
@@ -2808,10 +2808,10 @@
     }
     
     public void stop()
-    throws StoppingException
-{
-    stopContinuum();
-}    
+        throws StoppingException
+    {
+        stopContinuum();
+    }
 
     private void closeStore()
     {
@@ -2822,6 +2822,19 @@
     }
 
 
+
+    public void startup()
+        throws ContinuumException
+    {
+        try
+        {
+            this.start();
+        }
+        catch ( StartingException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
+    }
 
     public void stopContinuum()
         throws StoppingException

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Thu Mar 27 15:04:44 2008
@@ -334,4 +334,9 @@
     {
         this.resolveExecutable = resolveExecutable;
     }
+
+    public void setExecutableResolver( ExecutableResolver executableResolver )
+    {
+        this.executableResolver = executableResolver;
+    }
 }

Modified: continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml (original)
+++ continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml Thu Mar 27 15:04:44 2008
@@ -24,7 +24,7 @@
   <version>1.0-SNAPSHOT</version>
   <name>Continuum Timeout test</name>
   <scm>
-    <connection>scm:svn:https://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-core/src/test-projects/timeout</connection>
+    <connection>scm:svn:https://svn.apache.org/repos/asf/continuum/trunk/continuum-core/src/test-projects/timeout</connection>
   </scm>
   <dependencies>
     <dependency>

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
Thu Mar 27 15:04:44 2008
@@ -34,7 +34,6 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 
@@ -48,16 +47,7 @@
     public void testContinuumConfiguration()
         throws Exception
     {
-        try
-        {
-            lookup( Continuum.ROLE );
-        }
-        catch ( ComponentLookupException e )
-        {
-            e.printStackTrace();
-            throw e;
-        }
-
+        lookup( Continuum.ROLE );
     }
 
     public void testLookups()

Modified: continuum/trunk/continuum-core/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/log4j.properties?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/log4j.properties (original)
+++ continuum/trunk/continuum-core/src/test/resources/log4j.properties Thu Mar 27 15:04:44
2008
@@ -22,7 +22,7 @@
 log4j.appender.console.layout=org.apache.log4j.PatternLayout
 log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
 
-log4j.rootCategory=DEBUG, console
+log4j.rootCategory=INFO, console
 
 # JPOX Categories
 log4j.category.JPOX=WARN, console
@@ -44,3 +44,7 @@
 #log4j.category.JPOX.Enhancer.Parser=DEBUG, console
 #log4j.category.JPOX.Enhancer=DEBUG, console
 #log4j.category.JPOX.SchemaTool=DEBUG, console
+
+#quiet spring loading :-)
+log4j.logger.org.springframework.beans.factory.xml.XmlBeanDefinitionReader=ERROR
+log4j.logger.org.springframework.beans.factory.support.DefaultListableBeanFactory=ERROR

Modified: continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
(original)
+++ continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
Thu Mar 27 15:04:44 2008
@@ -55,7 +55,7 @@
     <component>
       <role>org.codehaus.plexus.formica.validation.Validator</role>
       <role-hint>url</role-hint>
-      <implementation>org.codehaus.plexus.formica.validation.UrlValidator</implementation>
+      <implementation>org.apache.maven.continuum.utils.ContinuumUrlValidator</implementation>
       <configuration>
         <allowedSchemes>
           <allowedScheme>http</allowedScheme>

Modified: continuum/trunk/continuum-test/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-test/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-test/pom.xml (original)
+++ continuum/trunk/continuum-test/pom.xml Thu Mar 27 15:04:44 2008
@@ -25,5 +25,10 @@
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-spring</artifactId>
+      <scope>compile</scope>
+    </dependency>    
   </dependencies>
 </project>

Modified: continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
Thu Mar 27 15:04:44 2008
@@ -19,6 +19,16 @@
  * under the License.
  */
 
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.jdo.PersistenceManager;
+import javax.jdo.PersistenceManagerFactory;
+
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -30,26 +40,17 @@
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
 import org.codehaus.plexus.jdo.JdoFactory;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.jpox.SchemaTool;
 
-import javax.jdo.PersistenceManager;
-import javax.jdo.PersistenceManagerFactory;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
 public abstract class AbstractContinuumTest
-    extends PlexusTestCase
+    extends PlexusInSpringTestCase
 {
     private ContinuumStore store;
 

Modified: continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/pom.xml (original)
+++ continuum/trunk/continuum-webapp/pom.xml Thu Mar 27 15:04:44 2008
@@ -508,7 +508,16 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-spring</artifactId>
+    </dependency>    
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-mail-sender-javamail</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>2.5.1</version>
     </dependency>
     <dependency>
       <groupId>javax.mail</groupId>

Modified: continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Thu
Mar 27 15:04:44 2008
@@ -18,6 +18,8 @@
   ~ under the License.
   -->
 <plexus>
+  <!-- 
+    Not supported with plexus-spring
   <load-on-start>
     <component>
       <role>org.apache.maven.continuum.Continuum</role>
@@ -43,7 +45,7 @@
       <role-hint>rollback-release</role-hint>
     </component>
   </load-on-start>
-
+  -->
   <components>
     <component>
       <role>org.codehaus.plexus.registry.Registry</role>
@@ -270,7 +272,7 @@
     <component>
       <role>org.codehaus.plexus.formica.validation.Validator</role>
       <role-hint>url</role-hint>
-      <implementation>org.codehaus.plexus.formica.validation.UrlValidator</implementation>
+      <implementation>org.apache.maven.continuum.utils.ContinuumUrlValidator</implementation>
       <configuration>
         <allowedSchemes>
           <allowedScheme>http</allowedScheme>

Modified: continuum/trunk/continuum-webapp/src/main/resources/webwork.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/webwork.properties (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/webwork.properties Thu Mar 27 15:04:44
2008
@@ -17,7 +17,8 @@
 # under the License.
 #
 
-webwork.objectFactory = org.codehaus.plexus.xwork.PlexusObjectFactory
+webwork.objectFactory = org.codehaus.plexus.spring.WebWorkPlexusInSpringObjectFactory
+#org.codehaus.plexus.xwork.PlexusObjectFactory
 #webwork.tag.altSyntax = true
 
 # Theme

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml Thu Mar 27 15:04:44 2008
@@ -66,8 +66,28 @@
   </filter-mapping>
 
   <listener>
-    <listener-class>org.codehaus.plexus.xwork.PlexusLifecycleListener</listener-class>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
+  <listener>
+    <!-- TODO: some Spring technique for this? -->
+  	<listener-class>org.apache.continuum.web.startup.ContinuumStartup</listener-class>
+  </listener>
+
+  <context-param>
+    <param-name>contextClass</param-name>
+    <param-value>org.codehaus.plexus.spring.PlexusWebApplicationContext</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+        classpath*:/META-INF/plexus/components.xml
+        classpath*:/META-INF/spring-context.xml
+        /WEB-INF/classes/META-INF/plexus/application.xml
+        /WEB-INF/classes/META-INF/plexus/components.xml
+        /WEB-INF/applicationContext.xml
+    </param-value>
+  </context-param>
 
   <servlet>
     <servlet-name>XmlRpcServlet</servlet-name>

Modified: continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=641998&r1=641997&r2=641998&view=diff
==============================================================================
--- continuum/trunk/pom.xml (original)
+++ continuum/trunk/pom.xml Thu Mar 27 15:04:44 2008
@@ -180,11 +180,20 @@
       <releases>
         <enabled>false</enabled>
       </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
     </repository>
     <repository>
       <id>maven2-repository.dev.java.net</id>
       <name>Java.net Repository for Maven</name>
       <url>http://download.java.net/maven/2/</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>      
     </repository>
     <!-- comment when parent is released -->
     <repository>
@@ -194,6 +203,9 @@
       <releases>
         <enabled>false</enabled>
       </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>      
     </repository>
   </repositories>
   <!--
@@ -674,7 +686,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-taskqueue</artifactId>
-        <version>1.0-alpha-7</version>
+        <version>1.0-alpha-8-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.derby</groupId>
@@ -779,6 +791,11 @@
         <groupId>commons-httpclient</groupId>
         <artifactId>commons-httpclient</artifactId>
         <version>3.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-spring</artifactId>
+        <version>1.0-SNAPSHOT</version>
       </dependency>
     </dependencies>
   </dependencyManagement>



Mime
View raw message