continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r729913 - in /continuum/trunk: continuum-commons/src/main/java/org/apache/continuum/utils/shell/ continuum-store/ continuum-store/src/main/java/org/apache/continuum/dao/ continuum-store/src/main/resources/ continuum-store/src/main/resources...
Date Mon, 29 Dec 2008 15:12:07 GMT
Author: evenisse
Date: Mon Dec 29 07:12:06 2008
New Revision: 729913

URL: http://svn.apache.org/viewvc?rev=729913&view=rev
Log:
[CONTINUUM-2026]  Use annotations instead of plexus-maven-plugin

Added:
    continuum/trunk/continuum-store/src/main/resources/
    continuum/trunk/continuum-store/src/main/resources/META-INF/
    continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml   (with
props)
Modified:
    continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java
    continuum/trunk/continuum-store/pom.xml
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectScmRootDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java
Mon Dec 29 07:12:06 2008
@@ -29,13 +29,14 @@
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.exec.MavenExecutorException;
 import org.apache.maven.shared.release.exec.TeeConsumer;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 import org.codehaus.plexus.util.cli.WriterStreamConsumer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 /**
@@ -44,9 +45,10 @@
  */
 @Service("shellCommandHelper")
 public class DefaultShellCommandHelper
-    extends AbstractLogEnabled
     implements ShellCommandHelper
 {
+    private Logger log = LoggerFactory.getLogger( DefaultShellCommandHelper.class );
+
     // ----------------------------------------------------------------------
     // ShellCommandHelper Implementation
     // ----------------------------------------------------------------------
@@ -122,9 +124,9 @@
 
         Commandline cl = createCommandline( workingDirectory, executable, arguments, idCommand,
environments );
 
-        getLogger().info( "Executing: " + cl );
-        getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath()
);
-        getLogger().debug( "EnvironmentVariables " + Arrays.asList( cl.getEnvironmentVariables()
) );
+        log.info( "Executing: " + cl );
+        log.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() );
+        log.debug( "EnvironmentVariables " + Arrays.asList( cl.getEnvironmentVariables()
) );
 
         // ----------------------------------------------------------------------
         //
@@ -203,7 +205,7 @@
         try
         {
     		relResult.appendInfo( "Executing: " + cl.toString() );
-    		getLogger().info( "Executing: " + cl.toString() );
+    		log.info( "Executing: " + cl.toString() );
 
     		int result = CommandLineUtils.executeCommandLine( cl, stdOut, stdErr );
 

Modified: continuum/trunk/continuum-store/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/pom.xml?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/pom.xml (original)
+++ continuum/trunk/continuum-store/pom.xml Mon Dec 29 07:12:06 2008
@@ -28,6 +28,10 @@
   <name>Continuum :: Store</name>
   <dependencies>
     <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>    
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-jdo2</artifactId>
     </dependency>
@@ -81,17 +85,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>descriptor</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 </project>

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
Mon Dec 29 07:12:06 2008
@@ -25,6 +25,7 @@
 import org.codehaus.plexus.jdo.PlexusObjectNotFoundException;
 import org.codehaus.plexus.jdo.PlexusStoreException;
 
+import javax.annotation.Resource;
 import javax.jdo.FetchPlan;
 import javax.jdo.PersistenceManager;
 import javax.jdo.PersistenceManagerFactory;
@@ -59,9 +60,7 @@
 
     protected static final String PROJECT_WITH_SCM_DETAILS_FETCH_GROUP = "project-with-scm-details";
 
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private StoreUtilities storeUtilities;
 
     protected Object addObject( Object object )

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -28,7 +28,9 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Repository;
 
+import javax.annotation.Resource;
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
@@ -42,22 +44,18 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.BuildDefinitionDao"
  */
+@Repository("buildDefinitionDao")
 public class BuildDefinitionDaoImpl
     extends AbstractDao
     implements BuildDefinitionDao
 {
     private Logger log = LoggerFactory.getLogger( BuildDefinitionDaoImpl.class );
 
-    /**
-     * @plexus.requirement role="org.apache.continuum.dao.ProjectDao"
-     */
+    @Resource
     private ProjectDao projectDao;
 
-    /**
-     * @plexus.requirement role="org.apache.continuum.dao.ProjectGroupDao"
-     */
+    @Resource
     private ProjectGroupDao projectGroupDao;
 
     public BuildDefinition getBuildDefinition( int buildDefinitionId )

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -32,8 +33,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.BuildDefinitionTemplateDao"
  */
+@Repository("buildDefinitionTemplateDao")
 public class BuildDefinitionTemplateDaoImpl
     extends AbstractDao
     implements BuildDefinitionTemplateDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -23,6 +23,7 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.JDOHelper;
@@ -37,8 +38,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.BuildResultDao"
  */
+@Repository("buildResultDao")
 public class BuildResultDaoImpl
     extends AbstractDao
     implements BuildResultDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -30,11 +30,12 @@
 import org.apache.continuum.model.release.ContinuumReleaseResult;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 /**
  * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
- * @plexus.component role="org.apache.continuum.dao.ContinuumReleaseResultDao"
  */
+@Repository("continuumReleaseResultDao")
 public class ContinuumReleaseResultDaoImpl
     extends AbstractDao
     implements ContinuumReleaseResultDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
Mon Dec 29 07:12:06 2008
@@ -41,7 +41,9 @@
 import org.apache.maven.continuum.model.system.SystemConfiguration;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.jdo.PlexusJdoUtils;
+import org.springframework.stereotype.Repository;
 
+import javax.annotation.Resource;
 import javax.jdo.Extent;
 import javax.jdo.JDOUserException;
 import javax.jdo.PersistenceManager;
@@ -57,15 +59,13 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.DaoUtils"
  */
+@Repository("daoUtils")
 public class DaoUtilsImpl
     extends AbstractDao
     implements DaoUtils
 {
-    /**
-     * @plexus.requirement role="org.apache.continuum.dao.ProjectDao"
-     */
+    @Resource
     private ProjectDao projectDao;
 
     public void closeStore()

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -32,8 +33,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.DirectoryPurgeConfigurationDao"
  */
+@Repository("directoryPurgeConfigurationDao")
 public class DirectoryPurgeConfigurationDaoImpl
     extends AbstractDao
     implements DirectoryPurgeConfigurationDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -23,6 +23,7 @@
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.util.StringUtils;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -36,8 +37,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.InstallationDao"
  */
+@Repository("installationDao")
 public class InstallationDaoImpl
     extends AbstractDao
     implements InstallationDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -33,8 +34,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.LocalRepositoryDao"
  */
+@Repository("localRepositoryDao")
 public class LocalRepositoryDaoImpl
     extends AbstractDao
     implements LocalRepositoryDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,12 +21,13 @@
 
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.NotifierDao"
  */
+@Repository("notifierDao")
 public class NotifierDaoImpl
     extends AbstractDao
     implements NotifierDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -32,8 +33,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.ProfileDao"
  */
+@Repository("profileDao")
 public class ProfileDaoImpl
     extends AbstractDao
     implements ProfileDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -23,6 +23,7 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -35,8 +36,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.ProjectDao"
  */
+@Repository("projectDao")
 public class ProjectDaoImpl
     extends AbstractDao
     implements ProjectDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -24,7 +24,9 @@
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.jdo.PlexusJdoUtils;
+import org.springframework.stereotype.Repository;
 
+import javax.annotation.Resource;
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
@@ -37,15 +39,13 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.ProjectGroupDao"
  */
+@Repository("projectGroupDao")
 public class ProjectGroupDaoImpl
     extends AbstractDao
     implements ProjectGroupDao
 {
-    /**
-     * @plexus.requirement role=org.apache.continuum.dao.ProjectDao"
-     */
+    @Resource
     private ProjectDao projectDao;
 
     public ProjectGroup addProjectGroup( ProjectGroup group )

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectScmRootDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectScmRootDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectScmRootDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectScmRootDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -1,5 +1,24 @@
 package org.apache.continuum.dao;
 
+/*
+ * 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.
+ */
+
 import java.util.Collection;
 import java.util.List;
 
@@ -11,16 +30,17 @@
 import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 /**
  * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
- * @plexus.component role="org.apache.continuum.dao.ProjectScmRootDao"
+ * @version $Id: $
  */
+@Repository("projectScmRootDao")
 public class ProjectScmRootDaoImpl
     extends AbstractDao
     implements ProjectScmRootDao
 {
-
     public ProjectScmRoot addProjectScmRoot( ProjectScmRoot projectScmRoot )
         throws ContinuumStoreException
     {

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -32,8 +33,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.RepositoryPurgeConfigurationDao"
  */
+@Repository("repositoryPurgeConfigurationDao")
 public class RepositoryPurgeConfigurationDaoImpl
     extends AbstractDao
     implements RepositoryPurgeConfigurationDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
@@ -32,8 +33,8 @@
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.ScheduleDao"
  */
+@Repository("scheduleDao")
 public class ScheduleDaoImpl
     extends AbstractDao
     implements ScheduleDao

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
Mon Dec 29 07:12:06 2008
@@ -20,19 +20,22 @@
  */
 
 import org.codehaus.plexus.jdo.JdoFactory;
+import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import javax.jdo.PersistenceManagerFactory;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.StoreUtilities"
  */
+@Service("storeUtilities")
 public class StoreUtilities
 {
     /**
      * @plexus.requirement role-hint="continuum"
      */
+    @Resource(name="jdoFactory#continuum")
     private JdoFactory continuumJdoFactory;
 
     private PersistenceManagerFactory continuumPersistenceManagerFactory;

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java?rev=729913&r1=729912&r2=729913&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java
Mon Dec 29 07:12:06 2008
@@ -21,14 +21,15 @@
 
 import org.apache.maven.continuum.model.system.SystemConfiguration;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.dao.SystemConfigurationDao"
  */
+@Repository("systemConfigurationDao")
 public class SystemConfigurationDaoImpl
     extends AbstractDao
     implements SystemConfigurationDao

Added: continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml?rev=729913&view=auto
==============================================================================
--- continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml (added)
+++ continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml Mon Dec
29 07:12:06 2008
@@ -0,0 +1,31 @@
+<?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-2.5.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+  <context:annotation-config />
+  <context:component-scan base-package="org.apache.continuum.dao"/>
+</beans>
\ No newline at end of file

Propchange: continuum/trunk/continuum-store/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message