continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r488678 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/
Date Tue, 19 Dec 2006 13:57:37 GMT
Author: evenisse
Date: Tue Dec 19 05:57:36 2006
New Revision: 488678

URL: http://svn.apache.org/viewvc?view=rev&rev=488678
Log:
Use getSettings instead of settings in DefaultMavenBuilderHelper

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigureAppearanceAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?view=diff&rev=488678&r1=488677&r2=488678
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
Tue Dec 19 05:57:36 2006
@@ -110,8 +110,6 @@
 
     private PlexusContainer container;
 
-    private Settings settings;
-
     // ----------------------------------------------------------------------
     // MavenBuilderHelper Implementation
     // ----------------------------------------------------------------------
@@ -340,6 +338,8 @@
             //   TODO: This seems like code that is shared with DefaultMaven, so it should
be moved to the project
             //   builder perhaps
 
+            Settings settings = getSettings();
+
             if ( getLogger().isDebugEnabled() )
             {
                 writeSettings( settings );
@@ -451,8 +451,9 @@
     }
 
     public ArtifactRepository getLocalRepository()
+        throws SettingsConfigurationException
     {
-        return getRepository( settings );
+        return getRepository( getSettings() );
     }
 
     // ----------------------------------------------------------------------
@@ -536,6 +537,7 @@
     {
         try
         {
+            //TODO: buildSettings cache settings so if user modify it, we need to restart
Continuum, we need to use a non-cached settings there
             return mavenSettingsBuilder.buildSettings();
         }
         catch ( IOException e )
@@ -732,7 +734,7 @@
     {
         try
         {
-            settings = getSettings();
+            Settings settings = getSettings();
 
             resolveParameters( settings );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java?view=diff&rev=488678&r1=488677&r2=488678
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
Tue Dec 19 05:57:36 2006
@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 
 import java.io.File;
 
@@ -36,14 +36,14 @@
     MavenProject getMavenProject( ContinuumProjectBuildingResult result, File file );
 
     /**
-     *
      * @param result
      * @param mavenProject
      * @param continuumProject
-     * @param groupPom map this project as if it is being used to initialize a project group
+     * @param groupPom         map this project as if it is being used to initialize a project
group
      */
     void mapMavenProjectToContinuumProject( ContinuumProjectBuildingResult result, MavenProject
mavenProject,
                                             Project continuumProject, boolean groupPom );
 
-    ArtifactRepository getLocalRepository();
+    ArtifactRepository getLocalRepository()
+        throws SettingsConfigurationException;
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigureAppearanceAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigureAppearanceAction.java?view=diff&rev=488678&r1=488677&r2=488678
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigureAppearanceAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigureAppearanceAction.java
Tue Dec 19 05:57:36 2006
@@ -22,6 +22,7 @@
 import com.opensymphony.xwork.ModelDriven;
 import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
 import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
+import org.apache.maven.continuum.execution.maven.m2.SettingsConfigurationException;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.apache.maven.model.Model;
@@ -85,7 +86,8 @@
     }
 
     public void prepare()
-        throws ConfigurationStoreException, ProjectBuildingException, ArtifactMetadataRetrievalException
+        throws ConfigurationStoreException, ProjectBuildingException, ArtifactMetadataRetrievalException,
+        SettingsConfigurationException
     {
         configuration = configurationStore.getConfigurationFromStore();
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java?view=diff&rev=488678&r1=488677&r2=488678
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
Tue Dec 19 05:57:36 2006
@@ -22,18 +22,19 @@
 import com.opensymphony.xwork.ModelDriven;
 import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
+import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
+import org.apache.maven.continuum.execution.maven.m2.SettingsConfigurationException;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
-import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
 import org.apache.maven.model.Model;
 import org.apache.maven.project.ProjectBuildingException;
-import org.apache.maven.shared.app.configuration.InvalidConfigurationException;
+import org.apache.maven.shared.app.company.CompanyPomHandler;
+import org.apache.maven.shared.app.configuration.CompanyPom;
 import org.apache.maven.shared.app.configuration.Configuration;
-import org.apache.maven.shared.app.configuration.ConfigurationStoreException;
 import org.apache.maven.shared.app.configuration.ConfigurationChangeException;
 import org.apache.maven.shared.app.configuration.ConfigurationStore;
-import org.apache.maven.shared.app.configuration.CompanyPom;
-import org.apache.maven.shared.app.company.CompanyPomHandler;
+import org.apache.maven.shared.app.configuration.ConfigurationStoreException;
+import org.apache.maven.shared.app.configuration.InvalidConfigurationException;
 import org.codehaus.plexus.security.rbac.Resource;
 import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
 import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
@@ -68,12 +69,14 @@
 
     private Model companyModel;
 
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private MavenBuilderHelper helper;
 
     public String execute()
         throws IOException, ConfigurationStoreException, InvalidConfigurationException, ConfigurationChangeException,
-        ArtifactInstallationException
+        ArtifactInstallationException, SettingsConfigurationException
     {
         // TODO: hack for passed in String[]
         String[] logo = (String[]) companyModel.getProperties().get( "organization.logo"
);
@@ -93,7 +96,8 @@
     }
 
     public void prepare()
-        throws ConfigurationStoreException, ProjectBuildingException, ArtifactMetadataRetrievalException
+        throws ConfigurationStoreException, ProjectBuildingException, ArtifactMetadataRetrievalException,
+        SettingsConfigurationException
     {
         configuration = configurationStore.getConfigurationFromStore();
 



Mime
View raw message