continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r729133 - in /continuum/trunk: ./ continuum-commons/ continuum-commons/src/main/java/org/apache/continuum/installation/ continuum-commons/src/main/java/org/apache/continuum/profile/ continuum-commons/src/main/java/org/apache/continuum/utils...
Date Tue, 23 Dec 2008 21:47:54 GMT
Author: olamy
Date: Tue Dec 23 13:47:54 2008
New Revision: 729133

URL: http://svn.apache.org/viewvc?rev=729133&view=rev
Log:
start using annotations instead of plexus-maven-plugin.


Modified:
    continuum/trunk/continuum-commons/pom.xml
    continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/installation/DefaultInstallationService.java
    continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/profile/DefaultProfileService.java
    continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/utils/shell/DefaultShellCommandHelper.java
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
    continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml
    continuum/trunk/continuum-commons/src/test/resources/log4j.xml
    continuum/trunk/pom.xml

Modified: continuum/trunk/continuum-commons/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/pom.xml?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/pom.xml (original)
+++ continuum/trunk/continuum-commons/pom.xml Tue Dec 23 13:47:54 2008
@@ -36,6 +36,14 @@
       <artifactId>continuum-store</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+    </dependency>      
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>    
+    <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-configuration</artifactId>
     </dependency>
@@ -71,20 +79,4 @@
       <scope>test</scope>
     </dependency>      
   </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>generate</id>
-            <goals>
-              <goal>descriptor</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/installation/DefaultInstallationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/installation/DefaultInstallationService.java?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/installation/DefaultInstallationService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/installation/DefaultInstallationService.java
Tue Dec 23 13:47:54 2008
@@ -19,6 +19,18 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.annotation.Resource;
+
 import org.apache.continuum.dao.InstallationDao;
 import org.apache.maven.continuum.execution.ExecutorConfigurator;
 import org.apache.maven.continuum.installation.AlreadyExistsInstallationException;
@@ -38,36 +50,25 @@
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 import org.codehaus.plexus.util.cli.StreamConsumer;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import org.springframework.stereotype.Service;
 
 /**
  * @author <a href="mailto:olamy@codehaus.org">olamy</a>
  * @version $Id$
- * @plexus.component role="org.apache.maven.continuum.installation.InstallationService"
  * TODO use some cache mechanism to prevent always reading from store ?
  * @since 13 juin 07
+ * 
  */
+@Service("installationService")
 public class DefaultInstallationService
     extends AbstractLogEnabled
     implements InstallationService, Initializable
 {
-    /**
-     * @plexus.requirement
-     */
+
+    @Resource
     private InstallationDao installationDao;
 
-    /**
-     * @plexus.requirement role-hint="default"
-     */
+    @Resource
     private ProfileService profileService;
 
     private Map<String, ExecutorConfigurator> typesValues;

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/profile/DefaultProfileService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/profile/DefaultProfileService.java?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/profile/DefaultProfileService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/continuum/profile/DefaultProfileService.java
Tue Dec 23 13:47:54 2008
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Resource;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.dao.ProfileDao;
 import org.apache.maven.continuum.installation.InstallationService;
@@ -29,23 +34,19 @@
 import org.apache.maven.continuum.profile.ProfileService;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-
-import java.util.ArrayList;
-import java.util.List;
+import org.springframework.stereotype.Service;
 
 /**
  * @author <a href="mailto:olamy@codehaus.org">olamy</a>
  * @version $Id$
- * @plexus.component role="org.apache.maven.continuum.profile.ProfileService"
  * TODO use some cache mechanism to prevent always reading from store ?
  * @since 15 juin 07
  */
+@Service("profileService")
 public class DefaultProfileService
     implements ProfileService
 {
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private ProfileDao profileDao;
 
     /**

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=729133&r1=729132&r2=729133&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
Tue Dec 23 13:47:54 2008
@@ -19,6 +19,13 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.exec.MavenExecutorException;
 import org.apache.maven.shared.release.exec.TeeConsumer;
@@ -29,20 +36,13 @@
 import org.codehaus.plexus.util.cli.Commandline;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 import org.codehaus.plexus.util.cli.WriterStreamConsumer;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.Writer;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
+import org.springframework.stereotype.Service;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
- * @plexus.component role="org.apache.continuum.utils.shell.ShellCommandHelper"
- * role-hint="default"
  */
+@Service("shellCommandHelper")
 public class DefaultShellCommandHelper
     extends AbstractLogEnabled
     implements ShellCommandHelper

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Tue Dec 23 13:47:54 2008
@@ -35,6 +35,8 @@
 import java.io.File;
 import java.io.IOException;
 
+import javax.annotation.Resource;
+
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
@@ -51,19 +53,13 @@
      */
     private File applicationHome;
 
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private ScheduleDao scheduleDao;
 
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private SystemConfigurationDao systemConfigurationDao;
 
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private ContinuumConfiguration configuration;
 
     private GeneralConfiguration generalConfiguration;

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
Tue Dec 23 13:47:54 2008
@@ -22,20 +22,22 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.springframework.stereotype.Service;
 
 import java.io.File;
 
+import javax.annotation.Resource;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
+@Service("workingDirectoryService")
 public class DefaultWorkingDirectoryService
     extends AbstractLogEnabled
     implements WorkingDirectoryService
 {
-    /**
-     * @plexus.requirement
-     */
+    @Resource
     private ConfigurationService configurationService;
 
     public void setConfigurationService( ConfigurationService configurationService )

Modified: continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml (original)
+++ continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml Tue Dec
23 13:47:54 2008
@@ -20,17 +20,20 @@
   -->
 <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">
+
+  <context:annotation-config />
+  <context:component-scan 
+    base-package="org.apache.continuum.installation,org.apache.continuum.profile,
+                  org.apache.maven.continuum.configuration,org.apache.maven.continuum.utils"/>
 
   <bean id="configurationService" class="org.apache.maven.continuum.configuration.DefaultConfigurationService"
         init-method="initialize">
     <property name="applicationHome" value="data"/>
-    <property name="scheduleDao" ref="scheduleDao"/>
-    <property name="systemConfigurationDao" ref="systemConfigurationDao"/>
-    <property name="configuration" ref="continuumConfiguration"/>
-  </bean>
-  <bean id="workingDirectoryService" class="org.apache.maven.continuum.utils.DefaultWorkingDirectoryService">
-    <property name="configurationService" ref="configurationService"/>
   </bean>
+  <bean id="shellCommandHelper" class="org.apache.continuum.utils.shell.DefaultShellCommandHelper"/>
 
 </beans>
\ No newline at end of file

Modified: continuum/trunk/continuum-commons/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/test/resources/log4j.xml?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/test/resources/log4j.xml (original)
+++ continuum/trunk/continuum-commons/src/test/resources/log4j.xml Tue Dec 23 13:47:54 2008
@@ -16,7 +16,7 @@
 
   <!-- quiet spring loading :-) -->
   <category name="org.springframework">
-    <priority value="ERROR"/>
+    <priority value="INFO"/>
   </category>
   <category name="org.codehaus.plexus">
     <priority value="ERROR"/>

Modified: continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=729133&r1=729132&r2=729133&view=diff
==============================================================================
--- continuum/trunk/pom.xml (original)
+++ continuum/trunk/pom.xml Tue Dec 23 13:47:54 2008
@@ -952,6 +952,11 @@
         <version>${spring.version}</version>
       </dependency>
       <dependency>
+        <groupId>javax.annotation</groupId>
+        <artifactId>jsr250-api</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <dependency>
         <groupId>org.apache.continuum</groupId>
         <artifactId>continuum-purge</artifactId>
         <version>${pom.version}</version>



Mime
View raw message