continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r571118 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/configuration/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/configuration/ conti...
Date Thu, 30 Aug 2007 11:50:13 GMT
Author: evenisse
Date: Thu Aug 30 04:50:12 2007
New Revision: 571118

URL: http://svn.apache.org/viewvc?rev=571118&view=rev
Log:
[CONTINUUM-1207] Allow to change default build definition parameters in application.xml
Submitted by: Olivier Lamy

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    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/DefaultContinuumInitializer.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/MockConfigurationService.java
    maven/continuum/trunk/continuum-site/src/site/fml/faqs.fml
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
Thu Aug 30 04:50:12 2007
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.store.ContinuumStoreException;
+
 import java.io.File;
 
 /**
@@ -62,7 +65,7 @@
 
     File getBuildOutputFile( int buildId, int projectId )
         throws ConfigurationException;
-    
+
     File getTestReportsDirectory( int buildId, int projectId )
         throws ConfigurationException;
 
@@ -83,4 +86,25 @@
 
     void store()
         throws ConfigurationStoringException;
+
+    public BuildDefinition getDefaultAntBuildDefinition()
+        throws ContinuumStoreException;
+
+    public String getDefaultAntGoals();
+
+    public String getDefaultAntArguments();
+
+    public BuildDefinition getDefaultMavenOneBuildDefinition()
+        throws ContinuumStoreException;
+
+    public String getDefaultMavenOneGoals();
+
+    public String getDefaultMavenOneArguments();
+
+    public BuildDefinition getDefaultMavenTwoBuildDefinition()
+        throws ContinuumStoreException;
+
+    public String getDefaultMavenTwoGoals();
+
+    public String getDefaultMavenTwoArguments();
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Aug 30 04:50:12 2007
@@ -298,39 +298,28 @@
 
         if ( pg == null )
         {
+            try
+            {
+                ProjectGroup new_pg = store.addProjectGroup( projectGroup );
 
-            ProjectGroup new_pg = store.addProjectGroup( projectGroup );
-
-            addBuildDefinitionToProjectGroup( new_pg.getId(), getDefaultBuildDefinition()
);
+                addBuildDefinitionToProjectGroup( new_pg.getId(), configurationService.getDefaultMavenTwoBuildDefinition()
);
 
-            Map context = new HashMap();
-            context.put( AbstractContinuumAction.KEY_PROJECT_GROUP_ID, new Integer( new_pg.getId()
) );
-            executeAction( "add-assignable-roles", context );
+                Map context = new HashMap();
+                context.put( AbstractContinuumAction.KEY_PROJECT_GROUP_ID, new Integer( new_pg.getId()
) );
+                executeAction( "add-assignable-roles", context );
 
-            getLogger().info( "Added new project group: " + new_pg.getName() );
+                getLogger().info( "Added new project group: " + new_pg.getName() );
+            }
+            catch ( ContinuumStoreException e )
+            {
+                throw new ContinuumException( e.getMessage(), e );
+            }
         }
         else
         {
             throw new ContinuumException( "Unable to add the requested project group: groupId
already exists." );
         }
-    }
-
-    private BuildDefinition getDefaultBuildDefinition()
-        throws ContinuumException
-    {
-        BuildDefinition bd = new BuildDefinition();
-
-        bd.setDefaultForProject( true );
 
-        bd.setGoals( "clean install" );
-
-        bd.setArguments( "--batch-mode --non-recursive" );
-
-        bd.setBuildFile( "pom.xml" );
-
-        bd.setSchedule( getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
) );
-
-        return bd;
     }
 
     public Collection getAllProjectGroups()
@@ -1059,7 +1048,7 @@
     {
         BuildResult buildResult = getBuildResult( buildId );
         store.removeBuildResult( buildResult );
-        
+
         // cleanup some files
         try
         {
@@ -1084,7 +1073,7 @@
         {
             getLogger().info( "skip IOException during cleanup build files " + e.getMessage(),
e );
         }
-        
+
     }
 
     public String getBuildOutput( int projectId, int buildId )
@@ -1299,19 +1288,7 @@
         {
             try
             {
-                BuildDefinition bd = new BuildDefinition();
-
-                bd.setDefaultForProject( true );
-
-                bd.setGoals( "" );
-
-                bd.setArguments( "" );
-
-                bd.setBuildFile( "build.xml" );
-
-                Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
-
-                bd.setSchedule( schedule );
+                BuildDefinition bd = configurationService.getDefaultAntBuildDefinition();
 
                 project.addBuildDefinition( bd );
             }

Modified: 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-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Thu Aug 30 04:50:12 2007
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
@@ -37,12 +40,45 @@
     extends AbstractLogEnabled
     implements ConfigurationService
 {
+
+    // when adding requirement the template in application.xml must be updated CONTINUUM-1207
+
     /**
      * @plexus.configuration default-value="${plexus.home}"
      */
     private File applicationHome;
 
     /**
+     * @plexus.configuration default-value=""
+     */
+    private String defaultAntGoals;
+
+    /**
+     * @plexus.configuration default-value=""
+     */
+    private String defaultAntArguments;
+
+    /**
+     * @plexus.configuration default-value="clean:clean jar:install"
+     */
+    private String defaultM1Goals;
+
+    /**
+     * @plexus.configuration default-value=""
+     */
+    private String defaultM1Arguments;
+
+    /**
+     * @plexus.configuration default-value="clean install"
+     */
+    private String defaultM2Goals;
+
+    /**
+     * @plexus.configuration default-value="--batch-mode --non-recursive"
+     */
+    private String defaultM2Arguments;
+
+    /**
      * @plexus.requirement role-hint="jdo"
      */
     private ContinuumStore store;
@@ -168,7 +204,6 @@
     // ----------------------------------------------------------------------
 
 
-
     public File getBuildOutputDirectory( int projectId )
     {
         File dir = new File( getBuildOutputDirectory(), Integer.toString( projectId ) );
@@ -188,11 +223,12 @@
         throws ConfigurationException
     {
         File ouputDirectory = getBuildOutputDirectory( projectId );
-        
-        return new File( ouputDirectory.getPath() + File.separatorChar + buildId + File.separatorChar
+ "surefire-reports" );
 
-    }    
-    
+        return new File(
+            ouputDirectory.getPath() + File.separatorChar + buildId + File.separatorChar
+ "surefire-reports" );
+
+    }
+
     public File getBuildOutputFile( int buildId, int projectId )
         throws ConfigurationException
     {
@@ -282,5 +318,95 @@
         {
             throw new ConfigurationStoringException( "Error writting configuration to database.",
e );
         }
+    }
+
+    public BuildDefinition getDefaultAntBuildDefinition()
+        throws ContinuumStoreException
+    {
+        BuildDefinition bd = new BuildDefinition();
+
+        bd.setDefaultForProject( true );
+
+        bd.setGoals( getDefaultAntGoals() );
+
+        bd.setArguments( getDefaultAntArguments() );
+
+        bd.setBuildFile( "build.xml" );
+
+        bd.setSchedule( getDefaultSchedule() );
+
+        return bd;
+    }
+
+    public String getDefaultAntGoals()
+    {
+        return defaultAntGoals;
+    }
+
+    public String getDefaultAntArguments()
+    {
+        return defaultAntArguments;
+    }
+
+    public String getDefaultMavenOneGoals()
+    {
+        return defaultM1Goals;
+    }
+
+    public String getDefaultMavenOneArguments()
+    {
+        return defaultM1Arguments;
+    }
+
+    public BuildDefinition getDefaultMavenOneBuildDefinition()
+        throws ContinuumStoreException
+    {
+        BuildDefinition bd = new BuildDefinition();
+
+        bd.setDefaultForProject( true );
+
+        bd.setArguments( getDefaultMavenOneArguments() );
+
+        bd.setGoals( getDefaultMavenOneGoals() );
+
+        bd.setBuildFile( "project.xml" );
+
+        bd.setSchedule( getDefaultSchedule() );
+
+        return bd;
+    }
+
+    public String getDefaultMavenTwoArguments()
+    {
+        return this.defaultM2Arguments;
+    }
+
+    public String getDefaultMavenTwoGoals()
+    {
+        return this.defaultM2Goals;
+    }
+
+    public BuildDefinition getDefaultMavenTwoBuildDefinition()
+        throws ContinuumStoreException
+    {
+        BuildDefinition bd = new BuildDefinition();
+
+        bd.setDefaultForProject( true );
+
+        bd.setGoals( getDefaultMavenTwoGoals() );
+
+        bd.setArguments( getDefaultMavenTwoArguments() );
+
+        bd.setBuildFile( "pom.xml" );
+
+        bd.setSchedule( getDefaultSchedule() );
+
+        return bd;
+    }
+
+    private Schedule getDefaultSchedule()
+        throws ContinuumStoreException
+    {
+        return store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
     }
 }

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=571118&r1=571117&r2=571118&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
Thu Aug 30 04:50:12 2007
@@ -20,7 +20,7 @@
  */
 
 import org.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
@@ -60,6 +60,11 @@
      */
     private ContinuumStore store;
 
+    /**
+     * @plexus.requirement role-hint="default"
+     */
+    private ConfigurationService configurationService;
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -132,24 +137,6 @@
         return schedule;
     }
 
-    private BuildDefinition getDefaultBuildDefinition()
-        throws ContinuumStoreException
-    {
-        BuildDefinition bd = new BuildDefinition();
-
-        bd.setDefaultForProject( true );
-
-        bd.setGoals( "clean install" );
-
-        bd.setArguments( "--batch-mode --non-recursive" );
-
-        bd.setBuildFile( "pom.xml" );
-
-        bd.setSchedule( store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
) );
-
-        return bd;
-    }
-
     private void createDefaultProjectGroup()
         throws ContinuumStoreException
     {
@@ -168,7 +155,7 @@
 
             group.setDescription( "Contains all projects that do not have a group of their
own" );
 
-            group.getBuildDefinitions().add( getDefaultBuildDefinition() );
+            group.getBuildDefinitions().add( configurationService.getDefaultMavenTwoBuildDefinition()
);
 
             group = store.addProjectGroup( group );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
Thu Aug 30 04:50:12 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelperException;
@@ -53,6 +54,11 @@
     /**
      * @plexus.requirement
      */
+    private ConfigurationService configurationService;
+
+    /**
+     * @plexus.requirement
+     */
     private MavenOneMetadataHelper metadataHelper;
 
     /**
@@ -72,6 +78,7 @@
 
     public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username,
String password,
                                                                      boolean recursiveProjects
)
+        throws ContinuumProjectBuilderException
     {
         ContinuumProjectBuildingResult result = new ContinuumProjectBuildingResult();
 
@@ -95,26 +102,7 @@
                 return result;
             }
 
-            BuildDefinition bd = new BuildDefinition();
-
-            bd.setDefaultForProject( true );
-
-            bd.setArguments( "" );
-
-            bd.setGoals( "clean:clean jar:install" );
-
-            bd.setBuildFile( "project.xml" );
-
-            try
-            {
-                Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
-
-                bd.setSchedule( schedule );
-            }
-            catch ( ContinuumStoreException e )
-            {
-                getLogger().error( "Can't get default schedule.", e );
-            }
+            BuildDefinition bd = configurationService.getDefaultMavenOneBuildDefinition();
 
             project.addBuildDefinition( bd );
 
@@ -125,6 +113,10 @@
             getLogger().error( "Unknown error while processing metadata", e );
 
             result.addError( ContinuumProjectBuildingResult.ERROR_UNKNOWN );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumProjectBuilderException( e.getMessage(), e );
         }
 
         ProjectGroup projectGroup = new ProjectGroup();

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Thu Aug 30 04:50:12 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
@@ -68,6 +69,11 @@
     private ContinuumStore store;
 
     /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    /**
      * @plexus.configuration
      */
     private List excludedPackagingTypes = new ArrayList();
@@ -103,6 +109,7 @@
 
     private void readModules( URL url, ContinuumProjectBuildingResult result, boolean groupPom,
String username,
                               String password, String scmUrl, boolean loadRecursiveProjects
)
+        throws ContinuumProjectBuilderException
     {
 
         MavenProject mavenProject;
@@ -158,27 +165,13 @@
             // projects
             if ( projectGroup != null )
             {
-                BuildDefinition bd = new BuildDefinition();
-
-                bd.setDefaultForProject( true );
-
-                if ( loadRecursiveProjects )
-                {
-                    bd.setArguments( "--batch-mode --non-recursive" );
-                }
-                else
-                {
-                    bd.setArguments( "--batch-mode" );
-                }
-                bd.setGoals( "clean install" );
-
-                bd.setBuildFile( "pom.xml" );
+                BuildDefinition buildDefinition = getDefaultBuildDefinition( loadRecursiveProjects
);
 
                 try
                 {
                     Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
 
-                    bd.setSchedule( schedule );
+                    buildDefinition.setSchedule( schedule );
                 }
                 catch ( ContinuumStoreException e )
                 {
@@ -188,7 +181,7 @@
                 // jdo complains that Collections.singletonList(bd) is a second class object
and fails.
                 ArrayList arrayList = new ArrayList();
 
-                arrayList.add( bd );
+                arrayList.add( buildDefinition );
 
                 projectGroup.setBuildDefinitions( arrayList );
 
@@ -290,6 +283,37 @@
                     readModules( moduleUrl, result, false, username, password, scmUrl + "/"
+ module, true );
                 }
             }
+        }
+    }
+
+    private BuildDefinition getDefaultBuildDefinition( boolean loadRecursiveProjects )
+        throws ContinuumProjectBuilderException
+    {
+        try
+        {
+            // due to CONTINUUM-1207 user can do what they with arguments
+            // we must remove if exists --non-recursive or -N
+            BuildDefinition buildDefinition = configurationService.getDefaultMavenTwoBuildDefinition();
+            if ( !loadRecursiveProjects )
+            {
+                if ( StringUtils.isEmpty( buildDefinition.getArguments() ) )
+                {
+                    // strange for a mvn build 
+                    getLogger().info( "build definition has empty args" );
+                }
+                else
+                {
+                    String arguments = buildDefinition.getArguments().replace( "--non-recursive",
"" );
+                    arguments = arguments.replace( "-N", "" );
+                    buildDefinition.setArguments( arguments );
+                }
+
+            }
+            return buildDefinition;
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumProjectBuilderException( e.getMessage(), e );
         }
     }
 

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/MockConfigurationService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/MockConfigurationService.java?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/MockConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/MockConfigurationService.java
Thu Aug 30 04:50:12 2007
@@ -23,6 +23,8 @@
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 
 import java.io.File;
 import java.util.Map;
@@ -78,8 +80,8 @@
 
         if ( !dir.exists() && !dir.mkdirs() )
         {
-            throw new ConfigurationException( "Could not make the build output directory:
" + "'"
-                + dir.getAbsolutePath() + "'." );
+            throw new ConfigurationException(
+                "Could not make the build output directory: " + "'" + dir.getAbsolutePath()
+ "'." );
         }
         return new File( dir.getPath() + File.separatorChar + buildId + File.separatorChar
+ "surefire-reports " );
     }
@@ -188,5 +190,53 @@
     public void store()
         throws ConfigurationStoringException
     {
+    }
+
+    public BuildDefinition getDefaultAntBuildDefinition()
+        throws ContinuumStoreException
+    {
+        return null;
+    }
+
+    public String getDefaultAntGoals()
+    {
+        return null;
+    }
+
+    public String getDefaultAntArguments()
+    {
+        return null;
+    }
+
+    public BuildDefinition getDefaultMavenOneBuildDefinition()
+        throws ContinuumStoreException
+    {
+        return null;
+    }
+
+    public String getDefaultMavenOneGoals()
+    {
+        return null;
+    }
+
+    public String getDefaultMavenOneArguments()
+    {
+        return null;
+    }
+
+    public String getDefaultMavenTwoArguments()
+    {
+        return null;
+    }
+
+    public String getDefaultMavenTwoGoals()
+    {
+        return null;
+    }
+
+    public BuildDefinition getDefaultMavenTwoBuildDefinition()
+        throws ContinuumStoreException
+    {
+        return null;
     }
 }

Modified: maven/continuum/trunk/continuum-site/src/site/fml/faqs.fml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-site/src/site/fml/faqs.fml?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-site/src/site/fml/faqs.fml (original)
+++ maven/continuum/trunk/continuum-site/src/site/fml/faqs.fml Thu Aug 30 04:50:12 2007
@@ -198,7 +198,7 @@
       <answer>
         <p>
           If you want to build recursively from the parent, you have to remove the <code>--non-recursive</code>
or <code>-N</code> argument under the
-          "Build Definitions" section of your parent project.
+          "Build Definitions" section of your parent project. Or use the checkbox "For multi
modules project, load only root as recursive build" when adding a m2 project.
         </p>
         <p>
           Ensure that your entire project can be checked out using the SCM URL in your parent
project.
@@ -249,5 +249,39 @@
         </p>
       </answer>
     </faq>
+    <faq id="change-default-build-definition">
+      <question>When I had a maven2 project I always have goals clean install and arguments
--batch-mode --non-recursive?</question>
+      <answer>
+        <p>
+          You have to modify the file application.xml (located in WEB-INF/classes/META-INF/plexus).
+          Find the line with org.apache.maven.continuum.configuration.ConfigurationService
and the values in default-goals and default-arguments.
+          <source>
+    <component>
+      <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
+      <implementation>org.apache.maven.continuum.configuration.DefaultConfigurationService</implementation>
+      <description></description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+          <role-hint>jdo</role-hint>
+          <field-name>store</field-name>
+        </requirement>
+      </requirements>
+      <configuration>
+        <application-home>${plexus.home}</application-home>
+         uncomment the component the
+         replace here to override default-goals and default-arguments 
+        <default-ant-goals></default-ant-goals>
+        <default-ant-arguments></default-ant-arguments>
+        <default-m1-goals>clean:clean jar:install</default-m1-goals>
+        <default-m1-arguments></default-m1-arguments>
+        <default-m2-goals>clean install</default-m2-goals>
+        <default-m2-arguments>--batch-mode --non-recursive</default-m2-arguments>
+      </configuration>
+    </component>          
+          </source>
+        </p>
+      </answer>
+    </faq>    
   </part>
 </faqs>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=571118&r1=571117&r2=571118&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
Thu Aug 30 04:50:12 2007
@@ -81,6 +81,30 @@
       </configuration>
     </component>
 
+    <!-- uncomment the component the replace here to override default-goals and default-arguments

+    <component>
+      <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
+      <implementation>org.apache.maven.continuum.configuration.DefaultConfigurationService</implementation>
+      <description></description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+          <role-hint>jdo</role-hint>
+          <field-name>store</field-name>
+        </requirement>
+      </requirements>
+      <configuration>
+        <application-home>${plexus.home}</application-home>
+        <default-ant-goals></default-ant-goals>
+        <default-ant-arguments></default-ant-arguments>
+        <default-m1-goals>clean:clean jar:install</default-m1-goals>
+        <default-m1-arguments></default-m1-arguments>
+        <default-m2-goals>clean install</default-m2-goals>
+        <default-m2-arguments>--batch-mode --non-recursive</default-m2-arguments>
+      </configuration>
+    </component>    
+    -->
+
     <!--
     | The mail notifier
     |-->



Mime
View raw message