archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1583230 - in /archiva/trunk: ./ archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/ archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/ archiva-modu...
Date Mon, 31 Mar 2014 01:30:35 GMT
Author: olamy
Date: Mon Mar 31 01:30:34 2014
New Revision: 1583230

URL: http://svn.apache.org/r1583230
Log:
more unit tests fixes

Added:
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
  (with props)
Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
    archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/pom.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
    archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySessionFactoryBean.java
    archiva/trunk/pom.xml

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
Mon Mar 31 01:30:34 2014
@@ -84,8 +84,8 @@
     </resources> 
     <testResources>
       <testResource>
-          <directory>src/test/resources</directory>
-          <filtering>true</filtering>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
       </testResource>  
     </testResources>
     <extensions>

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
Mon Mar 31 01:30:34 2014
@@ -71,13 +71,13 @@
     <dependency>
       <groupId>org.easymock</groupId>
       <artifactId>easymock</artifactId>
-      <version>2.5.2</version>
+      <version>3.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.9</version>
+      <version>4.11</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -218,7 +218,7 @@
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
-      <version>2.8.1</version>
+      <version>2.11.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.derby</groupId>

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/pom.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/pom.xml (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/pom.xml Mon Mar 31 01:30:34
2014
@@ -526,6 +526,7 @@
             <expectedVersion>${project.version}</expectedVersion>
             <archiva.logMissingI18n>true</archiva.logMissingI18n>
             <java.awt.headless>true</java.awt.headless>
+            <archiva.repositorySessionFactory.id>test</archiva.repositorySessionFactory.id>
           </systemPropertyVariables>
         </configuration>
       </plugin>

Added: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java?rev=1583230&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
(added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
Mon Mar 31 01:30:34 2014
@@ -0,0 +1,42 @@
+package org.apache.archiva;
+
+import org.apache.archiva.metadata.repository.RepositorySessionFactory;
+import org.apache.archiva.metadata.repository.RepositorySessionFactoryBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Properties;
+
+/**
+ * @author Olivier Lamy
+ */
+public class TestRepositorySessionFactoryBean
+    extends RepositorySessionFactoryBean
+{
+
+    private Logger logger = LoggerFactory.getLogger( getClass() );
+
+    private String beanId;
+
+    public TestRepositorySessionFactoryBean( String beanId )
+    {
+        super( new Properties(  ) );
+        this.beanId = beanId;
+    }
+
+    @Override
+    public Class<RepositorySessionFactory> getObjectType()
+    {
+        return RepositorySessionFactory.class;
+    }
+
+    @Override
+    protected RepositorySessionFactory createInstance()
+        throws Exception
+    {
+        RepositorySessionFactory repositorySessionFactory =
+            getBeanFactory().getBean( "repositorySessionFactory#" + this.beanId, RepositorySessionFactory.class
);
+        logger.info( "create RepositorySessionFactory instance of {}", repositorySessionFactory.getClass().getName()
);
+        return repositorySessionFactory;
+    }
+}

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
Mon Mar 31 01:30:34 2014
@@ -21,10 +21,12 @@ package org.apache.archiva.webtest.memor
 
 import org.apache.archiva.metadata.repository.RepositorySession;
 import org.apache.archiva.metadata.repository.RepositorySessionFactory;
+import org.springframework.beans.factory.config.AbstractFactoryBean;
 import org.springframework.stereotype.Service;
 
 @Service("repositorySessionFactory#test")
 public class TestRepositorySessionFactory
+    extends AbstractFactoryBean<RepositorySessionFactory>
     implements RepositorySessionFactory
 {
     private RepositorySession repositorySession;
@@ -39,4 +41,17 @@ public class TestRepositorySessionFactor
         return repositorySession != null ? repositorySession : new RepositorySession( new
TestMetadataRepository(),
                                                                                       new
TestMetadataResolver() );
     }
+
+    @Override
+    public Class<RepositorySessionFactory> getObjectType()
+    {
+        return RepositorySessionFactory.class;
+    }
+
+    @Override
+    protected RepositorySessionFactory createInstance()
+        throws Exception
+    {
+        return this;
+    }
 }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
Mon Mar 31 01:30:34 2014
@@ -49,6 +49,12 @@
 
   <alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
 
+  <bean name="TestRepositorySessionFactoryBean" class="org.apache.archiva.TestRepositorySessionFactoryBean">
+    <constructor-arg>
+      <value>jcr</value>
+    </constructor-arg>
+  </bean>
+
   <bean name="registry#default" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry">
     <property name="properties">
       <value>

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
Mon Mar 31 01:30:34 2014
@@ -38,6 +38,12 @@
 
   <alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>
 
+  <bean name="TestRepositorySessionFactoryBean" class="org.apache.archiva.TestRepositorySessionFactoryBean">
+    <constructor-arg>
+      <value>jcr</value>
+    </constructor-arg>
+  </bean>
+
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">
       <props>

Modified: archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySessionFactoryBean.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySessionFactoryBean.java?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySessionFactoryBean.java
(original)
+++ archiva/trunk/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySessionFactoryBean.java
Mon Mar 31 01:30:34 2014
@@ -22,6 +22,7 @@ package org.apache.archiva.metadata.repo
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.config.AbstractFactoryBean;
+import org.springframework.stereotype.Service;
 
 import java.util.Properties;
 
@@ -29,6 +30,7 @@ import java.util.Properties;
  * @author Olivier Lamy
  * @since 2.0.2
  */
+//@Service("repositorySessionFactoryBean#default")
 public class RepositorySessionFactoryBean
     extends AbstractFactoryBean<RepositorySessionFactory>
 {

Modified: archiva/trunk/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/pom.xml?rev=1583230&r1=1583229&r2=1583230&view=diff
==============================================================================
--- archiva/trunk/pom.xml (original)
+++ archiva/trunk/pom.xml Mon Mar 31 01:30:34 2014
@@ -76,7 +76,7 @@
     <slf4j.version>1.7.5</slf4j.version>
     <log4j.version>2.0-rc1</log4j.version>
 
-    <spring.version>4.0.2.RELEASE</spring.version>
+    <spring.version>4.0.3.RELEASE</spring.version>
 
     <javax.jcr.version>2.0</javax.jcr.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>



Mime
View raw message