You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/05/26 22:55:58 UTC

svn commit: r1128083 - in /archiva/trunk/archiva-modules/plugins/repository-statistics/src: main/java/org/apache/archiva/metadata/repository/stats/ main/resources/ main/resources/META-INF/ test/java/org/apache/archiva/metadata/repository/stats/ test/re...

Author: olamy
Date: Thu May 26 20:55:58 2011
New Revision: 1128083

URL: http://svn.apache.org/viewvc?rev=1128083&view=rev
Log:
fix repository-statistics compilation

Added:
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml   (with props)
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml   (with props)
Modified:
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatisticsFactory.java
    archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java

Modified: archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java?rev=1128083&r1=1128082&r2=1128083&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java (original)
+++ archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java Thu May 26 20:55:58 2011
@@ -27,6 +27,7 @@ import org.apache.archiva.metadata.repos
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -47,8 +48,9 @@ import javax.jcr.query.QueryResult;
 import javax.jcr.query.Row;
 
 /**
- * @plexus.component role="org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager" role-hint="default"
+ * plexus.component role="org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager" role-hint="default"
  */
+@Service("repositoryStatisticsManager#default")
 public class DefaultRepositoryStatisticsManager
     implements RepositoryStatisticsManager
 {

Modified: archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatisticsFactory.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatisticsFactory.java?rev=1128083&r1=1128082&r2=1128083&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatisticsFactory.java (original)
+++ archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/RepositoryStatisticsFactory.java Thu May 26 20:55:58 2011
@@ -21,10 +21,12 @@ package org.apache.archiva.metadata.repo
 
 import org.apache.archiva.metadata.model.MetadataFacet;
 import org.apache.archiva.metadata.model.MetadataFacetFactory;
+import org.springframework.stereotype.Service;
 
 /**
- * @plexus.component role="org.apache.archiva.metadata.model.MetadataFacetFactory" role-hint="org.apache.archiva.metadata.repository.stats"
+ * plexus.component role="org.apache.archiva.metadata.model.MetadataFacetFactory" role-hint="org.apache.archiva.metadata.repository.stats"
  */
+@Service( "metadataFacetFactory#org.apache.archiva.metadata.repository.stats" )
 public class RepositoryStatisticsFactory
     implements MetadataFacetFactory
 {

Added: archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml?rev=1128083&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml (added)
+++ archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml Thu May 26 20:55:58 2011
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<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-3.0.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+       default-lazy-init="true">
+
+  <context:annotation-config/>
+  <context:component-scan base-package="org.apache.archiva.metadata.repository.stats"/>
+
+</beans>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/plugins/repository-statistics/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java?rev=1128083&r1=1128082&r2=1128083&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java (original)
+++ archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/java/org/apache/archiva/metadata/repository/stats/JcrRepositoryStatisticsGatheringTest.java Thu May 26 20:55:58 2011
@@ -19,17 +19,12 @@ package org.apache.archiva.metadata.repo
  * under the License.
  */
 
+import junit.framework.TestCase;
 import org.apache.archiva.metadata.repository.MetadataRepository;
 import org.apache.commons.io.FileUtils;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.core.TransientRepository;
-import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.zip.GZIPInputStream;
 import javax.jcr.ImportUUIDBehavior;
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Node;
@@ -39,11 +34,16 @@ import javax.jcr.SimpleCredentials;
 import javax.jcr.Workspace;
 import javax.jcr.nodetype.NodeTypeManager;
 import javax.jcr.nodetype.NodeTypeTemplate;
+import java.io.File;
+import java.io.IOException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.zip.GZIPInputStream;
 
 import static org.mockito.Mockito.*;
 
 public class JcrRepositoryStatisticsGatheringTest
-    extends PlexusInSpringTestCase
+    extends TestCase
 {
     private static final int TOTAL_FILE_COUNT = 1000;
 
@@ -63,8 +63,8 @@ public class JcrRepositoryStatisticsGath
     {
         super.setUp();
 
-        File confFile = getTestFile( "src/test/repository.xml" );
-        File dir = getTestFile( "target/jcr" );
+        File confFile = new File( "src/test/repository.xml" );
+        File dir = new File( "target/jcr" );
         FileUtils.deleteDirectory( dir );
 
         TransientRepository repository = new TransientRepository( confFile, dir );

Added: archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml?rev=1128083&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml (added)
+++ archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml Thu May 26 20:55:58 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<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-3.0.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+       default-lazy-init="true">
+
+</beans>

Propchange: archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/plugins/repository-statistics/src/test/resources/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision