continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r576105 - in /maven/continuum/trunk: ./ continuum-api/src/main/java/org/apache/maven/continuum/initialization/ continuum-api/src/main/java/org/apache/maven/continuum/utils/ continuum-commons/ continuum-commons/src/ continuum-commons/src/mai...
Date Sun, 16 Sep 2007 13:14:17 GMT
Author: evenisse
Date: Sun Sep 16 06:14:14 2007
New Revision: 576105

URL: http://svn.apache.org/viewvc?rev=576105&view=rev
Log:
[CONTINUUM-1435] Fix release feature by getting the right project working directory
Submitted by: Dário Oliveros with some refactoring

Added:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializationException.java
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializationException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
      - copied, changed from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
    maven/continuum/trunk/continuum-commons/   (with props)
    maven/continuum/trunk/continuum-commons/pom.xml   (with props)
    maven/continuum/trunk/continuum-commons/src/
    maven/continuum/trunk/continuum-commons/src/main/
    maven/continuum/trunk/continuum-commons/src/main/java/
    maven/continuum/trunk/continuum-commons/src/main/java/org/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
      - copied, changed from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/
    maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
    maven/continuum/trunk/continuum-commons/src/test/
    maven/continuum/trunk/continuum-commons/src/test/java/
    maven/continuum/trunk/continuum-commons/src/test/java/org/
    maven/continuum/trunk/continuum-commons/src/test/java/org/apache/
    maven/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/
    maven/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/
    maven/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
    maven/continuum/trunk/continuum-commons/src/test/resources/
    maven/continuum/trunk/continuum-commons/src/test/resources/configuration.xml
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/test/resources/configuration.xml
    maven/continuum/trunk/continuum-commons/src/test/resources/org/
    maven/continuum/trunk/continuum-commons/src/test/resources/org/apache/
    maven/continuum/trunk/continuum-commons/src/test/resources/org/apache/maven/
    maven/continuum/trunk/continuum-commons/src/test/resources/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-commons/src/test/resources/org/apache/maven/continuum/configuration/
    maven/continuum/trunk/continuum-commons/src/test/resources/org/apache/maven/continuum/configuration/ConfigurationServiceTest.xml
      - copied unchanged from r575815, maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/configuration/ConfigurationServiceTest.xml
Removed:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializationException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
    maven/continuum/trunk/continuum-core/src/test/resources/configuration.xml
    maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/configuration/ConfigurationServiceTest.xml
Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
    maven/continuum/trunk/continuum-release/pom.xml
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
    maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
    maven/continuum/trunk/pom.xml

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
(from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java)
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java&r1=575815&r2=576105&rev=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
Sun Sep 16 06:14:14 2007
@@ -27,6 +27,10 @@
 {
     String ROLE = ContinuumInitializer.class.getName();
 
+    //TODO: move this to an other place
+
+    public static final String DEFAULT_SCHEDULE_NAME = "DEFAULT_SCHEDULE";
+
     void initialize()
         throws ContinuumInitializationException;
 

Propchange: maven/continuum/trunk/continuum-commons/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 16 06:14:14 2007
@@ -0,0 +1 @@
+target

Added: maven/continuum/trunk/continuum-commons/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-commons/pom.xml?rev=576105&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-commons/pom.xml (added)
+++ maven/continuum/trunk/continuum-commons/pom.xml Sun Sep 16 06:14:14 2007
@@ -0,0 +1,66 @@
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>continuum-parent</artifactId>
+    <groupId>org.apache.maven.continuum</groupId>
+    <version>1.1-beta-3-SNAPSHOT</version>
+  </parent>
+  <artifactId>continuum-commons</artifactId>
+  <name>Continuum Commons</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-store</artifactId>
+    </dependency>
+    <!-- === Testing Dependencies === -->
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-test</artifactId>
+      <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>
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-commons/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-commons/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Copied: maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(from r575815, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java)
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?p2=maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java&r1=575815&r2=576105&rev=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Sun Sep 16 06:14:14 2007
@@ -20,7 +20,7 @@
  */
 
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
-import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
+import org.apache.maven.continuum.initialization.ContinuumInitializer;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
@@ -414,6 +414,6 @@
     private Schedule getDefaultSchedule()
         throws ContinuumStoreException
     {
-        return store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
+        return store.getScheduleByName( ContinuumInitializer.DEFAULT_SCHEDULE_NAME );
     }
 }

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/pom.xml?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Sun Sep 16 06:14:14 2007
@@ -53,6 +53,10 @@
       <artifactId>continuum-api</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-commons</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-command-line</artifactId>
       <version>1.0-alpha-2</version>

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Sun Sep 16 06:14:14 2007
@@ -45,10 +45,6 @@
     // Default values for the default schedule
     // ----------------------------------------------------------------------
 
-    //TODO: move this to an other place
-
-    public static final String DEFAULT_SCHEDULE_NAME = "DEFAULT_SCHEDULE";
-
     private SystemConfiguration systemConf;
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-release/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/pom.xml?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-release/pom.xml (original)
+++ maven/continuum/trunk/continuum-release/pom.xml Sun Sep 16 06:14:14 2007
@@ -36,6 +36,10 @@
       <artifactId>continuum-api</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-commons</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-settings</artifactId>
     </dependency>
@@ -126,6 +130,17 @@
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-svnexe</artifactId>
       <version>${maven-scm.version}</version>
+    </dependency>
+    <!-- === Testing Dependencies === -->
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-test</artifactId>
+      <scope>test</scope>
     </dependency>
   </dependencies>
   <build>

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
(original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Sun Sep 16 06:14:14 2007
@@ -23,6 +23,7 @@
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
 import org.apache.maven.continuum.release.tasks.PrepareReleaseProjectTask;
 import org.apache.maven.continuum.release.tasks.RollbackReleaseProjectTask;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.shared.release.ReleaseManagerListener;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 import org.apache.maven.shared.release.config.ReleaseDescriptorStore;
@@ -63,6 +64,11 @@
      */
     private TaskQueue rollbackReleaseQueue;
 
+    /**
+     * @plexus.requirement
+     */
+    private WorkingDirectoryService workingDirectoryService;
+    
     private Map listeners;
 
     /**
@@ -188,9 +194,10 @@
                                                     Map devVersions )
     {
         ReleaseDescriptor descriptor = new ReleaseDescriptor();
+        String workingDirectory = workingDirectoryService.getWorkingDirectory( project ).getPath();

 
         //release properties from the project
-        descriptor.setWorkingDirectory( project.getWorkingDirectory() );
+        descriptor.setWorkingDirectory( workingDirectory );
         descriptor.setScmSourceUrl( project.getScmUrl() );
 
         //required properties

Modified: maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
Sun Sep 16 06:14:14 2007
@@ -43,6 +43,9 @@
           <role-hint>rollback-release</role-hint>
           <field-name>rollbackReleaseQueue</field-name>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
Sun Sep 16 06:14:14 2007
@@ -99,7 +99,8 @@
         scmUsername = project.getScmUsername();
         scmPassword = project.getScmPassword();
         scmTag = project.getScmTag();
-
+        String workingDirectory = getContinuum().getWorkingDirectory(project.getId()).getPath();
+        
         String scmUrl = project.getScmUrl();
         if ( scmUrl.startsWith( SCM_SVN_PROTOCOL_PREFIX ) )
         {
@@ -114,9 +115,9 @@
 
         prepareGoals = "clean integration-test";
 
-        getReleasePluginParameters( project.getWorkingDirectory(), "pom.xml" );
+        getReleasePluginParameters( workingDirectory, "pom.xml" );
 
-        processProject( project.getWorkingDirectory(), "pom.xml" );
+        processProject( workingDirectory, "pom.xml" );
 
         return SUCCESS;
     }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
Sun Sep 16 06:14:14 2007
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
 import org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
@@ -34,6 +35,11 @@
 public class ReleaseRollbackAction
     extends ContinuumActionSupport
 {
+    /**
+     * @plexus.requirement
+     */
+    private WorkingDirectoryService workingDirectoryService;
+
     private int projectId;
 
     private String releaseId;
@@ -58,7 +64,7 @@
 
         Project project = getContinuum().getProject( projectId );
 
-        releaseManager.rollback( releaseId, project.getWorkingDirectory(), listener );
+        releaseManager.rollback( releaseId, workingDirectoryService.getWorkingDirectory(
project ).getPath(), listener );
 
         //recurse until rollback is finished
         while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )

Modified: maven/continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/pom.xml?rev=576105&r1=576104&r2=576105&view=diff
==============================================================================
--- maven/continuum/trunk/pom.xml (original)
+++ maven/continuum/trunk/pom.xml Sun Sep 16 06:14:14 2007
@@ -116,6 +116,7 @@
   </build>
   <modules>
     <module>continuum-api</module>
+    <module>continuum-commons</module>
     <module>continuum-security</module>
     <!-- module>continuum-core-it</module -->    <!-- TODO RE-ADD it when
continuum-plexus-application will be back -->
     <module>continuum-core</module>
@@ -325,6 +326,11 @@
       <dependency>
         <groupId>org.apache.maven.continuum</groupId>
         <artifactId>continuum-api</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.continuum</groupId>
+        <artifactId>continuum-commons</artifactId>
         <version>${pom.version}</version>
       </dependency>
       <dependency>



Mime
View raw message