You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2006/05/16 12:27:16 UTC

svn commit: r406895 [3/7] - in /maven/continuum/trunk: ./ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/configuration/ continuum-api/src/main/java/org/apache/maven/continuum/execution/ co...

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/ContinuumAuthenticator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/ContinuumAuthenticator.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/ContinuumAuthenticator.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/ContinuumAuthenticator.java Tue May 16 03:26:59 2006
@@ -17,75 +17,79 @@
  *
  */
 
+import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.model.system.ContinuumUser;
-
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.security.Authentication;
+import org.codehaus.plexus.security.Authenticator;
+import org.codehaus.plexus.security.exception.AuthenticationException;
+import org.codehaus.plexus.security.exception.UnauthorizedException;
+import org.codehaus.plexus.security.exception.UnknownEntityException;
 
-import com.opensymphony.user.authenticator.AbstractAuthenticator;
-import com.opensymphony.user.authenticator.AuthenticationException;
-
-import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
 
 /**
+ * TODO: Move this to o.a.m.c.security once plexus-security doesn't depend on plexus-summit.
+ *
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
  */
 public class ContinuumAuthenticator
-    extends AbstractAuthenticator
+    implements Authenticator
 {
+    /**
+     * @plexus.requirement
+     */
+    private ContinuumStore store;
+
     // ----------------------------------------------------------------------
     // Authenticator Implementation
     // ----------------------------------------------------------------------
 
-    public boolean login(String username, String password, HttpServletRequest req)
-        throws AuthenticationException
+    public Authentication authenticate( Map tokens )
+        throws UnknownEntityException, AuthenticationException, UnauthorizedException
     {
-        PlexusContainer container = (PlexusContainer) req.getAttribute( PlexusConstants.PLEXUS_KEY );
+        String username = (String) tokens.get( "username" );
+        String password = (String) tokens.get( "password" );
+
+        ContinuumUser user = getUser( username );
 
-        if ( container == null )
+        if ( user == null )
         {
-            throw new AuthenticationException( "Can't get plexus container in request." );
+            throw new UnknownEntityException();
         }
 
-        ContinuumUser user = getUser( container, username );
-
         System.err.println( "username: " + username );
+        //System.err.println( "password: " + password );
+        //System.err.println( "user.password: " + user.getPassword() );
 
-        if ( user != null && user.equalsPassword( password ) )
+        if ( !user.equalsPassword( password ) )
         {
-            return true;
-        }
-        else
-        {
-            return false;
+            throw new AuthenticationException( "Invalid password." );
         }
+
+        return null;
+    }
+
+    public Authentication getAnonymousEntity()
+    {
+        throw new RuntimeException( "Not implemented" );
     }
 
     // ----------------------------------------------------------------------
     // Private
     // ----------------------------------------------------------------------
 
-    private ContinuumUser getUser( PlexusContainer container, String username )
+    private ContinuumUser getUser( String username )
         throws AuthenticationException
     {
         try
         {
-            ContinuumStore store = (ContinuumStore) container.lookup( ContinuumStore.ROLE );
-
             return store.getUserByUsername( username );
         }
         catch ( ContinuumStoreException e )
         {
-            throw new AuthenticationException( "Error while retreiving user." + e.getMessage() );
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new AuthenticationException( "Can't get store component." + e.getMessage() );
+            throw new AuthenticationException( "Error while retreiving user.", e );
         }
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java Tue May 16 03:26:59 2006
@@ -18,7 +18,6 @@
 
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 import java.io.File;
@@ -31,11 +30,6 @@
     extends AbstractLogEnabled
     implements WorkingDirectoryService
 {
-    /**
-     * @plexus.requirement
-     */
-    private ContinuumStore store;
-
     /**
      * @plexus.requirement
      */

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/PlexusContainerManager.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/PlexusContainerManager.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/PlexusContainerManager.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/PlexusContainerManager.java Tue May 16 03:26:59 2006
@@ -51,4 +51,4 @@
     {
         this.container = container;
     }
-}
\ No newline at end of file
+}

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java Tue May 16 03:26:59 2006
@@ -38,10 +38,8 @@
     // ShellCommandHelper Implementation
     // ----------------------------------------------------------------------
 
-    public ExecutionResult executeShellCommand( File workingDirectory,
-                                                String executable,
-                                                String arguments,
-                                                File output )
+    public ExecutionResult executeShellCommand( File workingDirectory, String executable, String arguments, File output,
+                                                long idCommand )
         throws Exception
     {
         Commandline cl = new Commandline();
@@ -50,16 +48,11 @@
 
         argument.setLine( arguments );
 
-        return executeShellCommand( workingDirectory,
-                                    executable,
-                                    argument.getParts(),
-                                    output );
+        return executeShellCommand( workingDirectory, executable, argument.getParts(), output, idCommand );
     }
 
-    public ExecutionResult executeShellCommand( File workingDirectory,
-                                                String executable,
-                                                String[] arguments,
-                                                File output )
+    public ExecutionResult executeShellCommand( File workingDirectory, String executable, String[] arguments,
+                                                File output, long idCommand )
         throws Exception
     {
         // ----------------------------------------------------------------------
@@ -68,6 +61,8 @@
 
         Commandline cl = new Commandline();
 
+        cl.setPid( idCommand );
+
         cl.addSystemEnvironment();
 
         cl.addEnvironment( "MAVEN_TERMINATE_CMD", "on" );
@@ -78,11 +73,14 @@
 
         for ( int i = 0; i < arguments.length; i++ )
         {
-            String argument = arguments[ i ];
+            String argument = arguments[i];
 
             cl.createArgument().setValue( argument );
         }
 
+        getLogger().info( "Executing: " + cl );
+        getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() );
+
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -104,5 +102,15 @@
         // ----------------------------------------------------------------------
 
         return new ExecutionResult( exitCode );
+    }
+
+    public boolean isRunning( long idCommand )
+    {
+        return CommandLineUtils.isAlive( idCommand );
+    }
+
+    public void killProcess( long idCommand )
+    {
+        CommandLineUtils.killProcess( idCommand );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java Tue May 16 03:26:59 2006
@@ -26,15 +26,15 @@
 {
     String ROLE = ShellCommandHelper.class.getName();
 
-    ExecutionResult executeShellCommand( File workingDirectory,
-                                         String executable,
-                                         String arguments,
-                                         File output )
+    ExecutionResult executeShellCommand( File workingDirectory, String executable, String arguments, File output,
+                                         long idCommand )
         throws Exception;
 
-    ExecutionResult executeShellCommand( File workingDirectory,
-                                         String executable,
-                                         String[] arguments,
-                                         File output)
+    ExecutionResult executeShellCommand( File workingDirectory, String executable, String[] arguments, File output,
+                                         long idCommand )
         throws Exception;
+
+    boolean isRunning( long idCommand );
+
+    void killProcess( long idCommand );
 }

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Tue May 16 03:26:59 2006
@@ -36,6 +36,9 @@
         <requirement>
           <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
+        </requirement>
       </requirements>
       <configuration>
         <working-directory>${plexus.home}/temp</working-directory>
@@ -83,7 +86,7 @@
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
+          <role>org.codehaus.plexus.scheduler.Scheduler</role>
         </requirement>
       </requirements>
     </component>
@@ -163,6 +166,15 @@
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
+      <configuration>
+        <updateProperties>
+          <property>
+            <name>maven.scm.starteam.deleteLocal</name>
+            <value>true</value>
+          </property>
+        </updateProperties>
+      </configuration>
+      
     </component>
 
     <component>
@@ -170,9 +182,6 @@
       <implementation>org.apache.maven.continuum.utils.DefaultWorkingDirectoryService</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.store.ContinuumStore</role>
-        </requirement>
-        <requirement>
           <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
         </requirement>
       </requirements>
@@ -234,6 +243,9 @@
         <requirement>
           <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.project.MavenProjectHelper</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -365,7 +377,7 @@
       <configuration>
         <excludedPackagingTypes>
           <!--
-          <packaging implementation="java.lang.String">pom</packaging>
+          <packaging>pom</packaging>
           -->
         </excludedPackagingTypes>
       </configuration>
@@ -411,9 +423,6 @@
         <requirement>
           <role>org.apache.maven.continuum.buildcontroller.BuildController</role>
         </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.store.ContinuumStore</role>
-        </requirement>
       </requirements>
     </component>
 
@@ -456,6 +465,9 @@
         <requirement>
           <role>org.codehaus.plexus.action.ActionManager</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -645,6 +657,31 @@
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
+      <role-hint>deploy-artifact</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.DeployArtifactContinuumAction</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.artifact.deployer.ArtifactDeployer</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.action.Action</role>
       <role-hint>store-checkout-scm-result</role-hint>
       <implementation>org.apache.maven.continuum.core.action.StoreCheckOutScmResultAction</implementation>
       <requirements>
@@ -742,45 +779,5 @@
         </requirement>
       </requirements>
     </component>
-
-    <!--
-     |
-     | Scheduler
-     |
-     -->
-
-    <component>
-      <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
-      <implementation>org.apache.maven.continuum.scheduler.DefaultContinuumScheduler</implementation>
-      <configuration>
-        <properties>
-          <property>
-            <name>org.quartz.scheduler.instanceName</name>
-            <value>scheduler1</value>
-          </property>
-          <property>
-            <name></name>
-            <value></value>
-          </property>
-          <property>
-            <name>org.quartz.threadPool.class</name>
-            <value>org.quartz.simpl.SimpleThreadPool</value>
-          </property>
-          <property>
-            <name>org.quartz.threadPool.threadCount</name>
-            <value>15</value>
-          </property>
-          <property>
-            <name>org.quartz.threadPool.threadPriority</name>
-            <value>4</value>
-          </property>
-          <property>
-            <name>org.quartz.jobStore.class</name>
-            <value>org.quartz.simpl.RAMJobStore</value>
-          </property>
-        </properties>
-      </configuration>
-    </component>
-
   </components>
 </component-set>

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Tue May 16 03:26:59 2006
@@ -46,18 +46,18 @@
 
         int projectId = project.getId();
 
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
 
         assertNextBuildIs( projectId );
 
         assertNextBuildIsNull();
 
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
 
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
-        buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
 
         assertNextBuildIs( projectId );
 
@@ -71,9 +71,9 @@
 
         int projectId2 = addProject( getStore(), "Build Queue Project 3" ).getId();
 
-        buildProject( projectId1, ContinuumProjectState.TRIGGER_UNKNOWN );
+        buildProject( projectId1, ContinuumProjectState.TRIGGER_SCHEDULED );
 
-        buildProject( projectId2, ContinuumProjectState.TRIGGER_UNKNOWN );
+        buildProject( projectId2, ContinuumProjectState.TRIGGER_SCHEDULED );
 
         assertNextBuildIs( projectId1 );
 
@@ -83,8 +83,8 @@
 
         for ( int i = 0; i < 5; i++ )
         {
-            buildProject( projectId1, ContinuumProjectState.TRIGGER_UNKNOWN );
-            buildProject( projectId2, ContinuumProjectState.TRIGGER_UNKNOWN );
+            buildProject( projectId1, ContinuumProjectState.TRIGGER_SCHEDULED );
+            buildProject( projectId2, ContinuumProjectState.TRIGGER_SCHEDULED );
         }
 
         assertNextBuildIs( projectId1 );

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java Tue May 16 03:26:59 2006
@@ -34,19 +34,24 @@
 public class MavenOneBuildExecutorTest
     extends AbstractContinuumTest
 {
-    public void testUpdatingAProjectFromScmWithAExistingProjectAndAEmptyMaven1Pom()
+    private File checkOut;
+
+    private MavenOneBuildExecutor executor;
+
+    protected void setUp()
         throws Exception
     {
+        super.setUp();
+
         BuildExecutorManager builderManager = (BuildExecutorManager) lookup( BuildExecutorManager.ROLE );
 
-        MavenOneBuildExecutor executor = (MavenOneBuildExecutor) builderManager.getBuildExecutor(
-            MavenOneBuildExecutor.ID );
+        executor = (MavenOneBuildExecutor) builderManager.getBuildExecutor( MavenOneBuildExecutor.ID );
 
         // ----------------------------------------------------------------------
         // Make a checkout
         // ----------------------------------------------------------------------
 
-        File checkOut = getTestFile( "target/test-checkout" );
+        checkOut = getTestFile( "target/test-checkout" );
 
         if ( !checkOut.exists() )
         {
@@ -55,6 +60,11 @@
 
         FileUtils.cleanDirectory( checkOut );
 
+    }
+
+    public void testUpdatingAProjectFromScmWithAExistingProjectAndAEmptyMaven1Pom()
+        throws Exception
+    {
         FileUtils.fileWrite( new File( checkOut, "project.xml" ).getAbsolutePath(), "<project/>" );
 
         // ----------------------------------------------------------------------
@@ -79,6 +89,8 @@
 
         notifier.setConfiguration( props );
 
+        notifier.setFrom( ProjectNotifier.FROM_USER );
+
         List notifiers = new ArrayList();
 
         notifiers.add( notifier );
@@ -108,5 +120,221 @@
         assertEquals( "dev@maven.apache.org", actualNotifier.getConfiguration().get( "address" ) );
 
         assertEquals( "1.1-SNAPSHOT", project.getVersion() );
+    }
+
+    public void testUpdatingAProjectWithNagEMailAddress()
+        throws Exception
+    {
+        FileUtils.fileWrite( new File( checkOut, "project.xml" ).getAbsolutePath(),
+                             "<project><build><nagEmailAddress>myuser@myhost.org</nagEmailAddress></build></project>" );
+
+        // ----------------------------------------------------------------------
+        // Make the "existing" project
+        // ----------------------------------------------------------------------
+
+        Project project = new Project();
+
+        project.setName( "Maven" );
+
+        project.setGroupId( "org.apache.maven" );
+
+        project.setArtifactId( "maven" );
+
+        project.setScmUrl( "scm:svn:http://svn.apache.org/repos/asf:maven/maven-1/core/trunk/" );
+
+        project.setVersion( "1.1-SNAPSHOT" );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertNotNull( project );
+
+        assertEquals( "Maven", project.getName() );
+
+        assertEquals( 1, project.getNotifiers().size() );
+
+        ProjectNotifier actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "myuser@myhost.org", actualNotifier.getConfiguration().get( "address" ) );
+
+        // ----------------------------------------------------------------------
+        // Updating a new time to prevent duplicated notifiers
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertEquals( 1, project.getNotifiers().size() );
+
+        actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "myuser@myhost.org", actualNotifier.getConfiguration().get( "address" ) );
+    }
+
+    public void testUpdatingAProjectWithNagEMailAddressAndOneNotifier()
+        throws Exception
+    {
+        FileUtils.fileWrite( new File( checkOut, "project.xml" ).getAbsolutePath(),
+                             "<project><build><nagEmailAddress>myuser@myhost.org</nagEmailAddress></build></project>" );
+
+        // ----------------------------------------------------------------------
+        // Make the "existing" project
+        // ----------------------------------------------------------------------
+
+        Project project = new Project();
+
+        project.setName( "Maven" );
+
+        project.setGroupId( "org.apache.maven" );
+
+        project.setArtifactId( "maven" );
+
+        project.setScmUrl( "scm:svn:http://svn.apache.org/repos/asf:maven/maven-1/core/trunk/" );
+
+        ProjectNotifier notifier = new ProjectNotifier();
+
+        Properties props = new Properties();
+
+        props.put( "address", "dev@maven.apache.org" );
+
+        notifier.setConfiguration( props );
+
+        notifier.setFrom( ProjectNotifier.FROM_USER );
+
+        List notifiers = new ArrayList();
+
+        notifiers.add( notifier );
+
+        project.setNotifiers( notifiers );
+
+        project.setVersion( "1.1-SNAPSHOT" );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertNotNull( project );
+
+        assertEquals( "Maven", project.getName() );
+
+        assertEquals( 2, project.getNotifiers().size() );
+
+        ProjectNotifier actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "myuser@myhost.org", actualNotifier.getConfiguration().get( "address" ) );
+
+        actualNotifier = (ProjectNotifier) project.getNotifiers().get( 1 );
+
+        assertEquals( "dev@maven.apache.org", actualNotifier.getConfiguration().get( "address" ) );
+
+        // ----------------------------------------------------------------------
+        // Updating a new time to prevent duplicated notifiers
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertEquals( 2, project.getNotifiers().size() );
+
+        actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "myuser@myhost.org", actualNotifier.getConfiguration().get( "address" ) );
+
+        actualNotifier = (ProjectNotifier) project.getNotifiers().get( 1 );
+
+        assertEquals( "dev@maven.apache.org", actualNotifier.getConfiguration().get( "address" ) );
+    }
+
+    public void testUpdatingAProjectWithOneNotifier()
+        throws Exception
+    {
+        FileUtils.fileWrite( new File( checkOut, "project.xml" ).getAbsolutePath(), "<project/>" );
+
+        // ----------------------------------------------------------------------
+        // Make the "existing" project
+        // ----------------------------------------------------------------------
+
+        Project project = new Project();
+
+        project.setName( "Maven" );
+
+        project.setGroupId( "org.apache.maven" );
+
+        project.setArtifactId( "maven" );
+
+        project.setScmUrl( "scm:svn:http://svn.apache.org/repos/asf:maven/maven-1/core/trunk/" );
+
+        ProjectNotifier notifier = new ProjectNotifier();
+
+        Properties props = new Properties();
+
+        props.put( "address", "dev@maven.apache.org" );
+
+        notifier.setConfiguration( props );
+
+        notifier.setFrom( ProjectNotifier.FROM_USER );
+
+        List notifiers = new ArrayList();
+
+        notifiers.add( notifier );
+
+        project.setNotifiers( notifiers );
+
+        project.setVersion( "1.1-SNAPSHOT" );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertNotNull( project );
+
+        assertEquals( "Maven", project.getName() );
+
+        assertEquals( 1, project.getNotifiers().size() );
+
+        ProjectNotifier actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "dev@maven.apache.org", actualNotifier.getConfiguration().get( "address" ) );
+
+        // ----------------------------------------------------------------------
+        // Updating a new time to prevent duplicated notifiers
+        // ----------------------------------------------------------------------
+
+        executor.updateProjectFromCheckOut( checkOut, project, null );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        assertEquals( 1, project.getNotifiers().size() );
+
+        actualNotifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "dev@maven.apache.org", actualNotifier.getConfiguration().get( "address" ) );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Tue May 16 03:26:59 2006
@@ -39,13 +39,15 @@
 
         Project project = addProject( store, "Notification Dispatcher Test Project" );
 
+        project = store.getProjectWithBuildDetails( project.getId() );
+
         BuildResult build = new BuildResult();
 
         build.setStartTime( System.currentTimeMillis() );
  
         build.setState( ContinuumProjectState.BUILDING );
  
-        build.setTrigger( ContinuumProjectState.TRIGGER_UNKNOWN );
+        build.setTrigger( ContinuumProjectState.TRIGGER_SCHEDULED );
 
         store.addBuildResult( project, build );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Tue May 16 03:26:59 2006
@@ -22,6 +22,7 @@
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -41,8 +42,8 @@
     public void testGetEmailAddressWhenTypeIsSetToEmail()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
-                                                                                   MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder =
+            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-1.xml" );
 
@@ -72,8 +73,8 @@
     public void testGetEmailAddressWhenTypeIsntSet()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
-                                                                                   MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder =
+            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-2.xml" );
 
@@ -100,11 +101,50 @@
         assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );
     }
 
+    public void testGetScmUrlWithParams()
+        throws Exception
+    {
+        ContinuumProjectBuilder projectBuilder =
+            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+
+        File pom = getTestFile( "src/test/repository/maven-builder-helper-3.xml" );
+
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null );
+
+        assertNotNull( result.getWarnings() );
+
+        assertEquals( 0, result.getWarnings().size() );
+
+        assertNotNull( result.getProjects() );
+
+        assertEquals( 1, result.getProjects().size() );
+
+        Project project = (Project) result.getProjects().get( 0 );
+
+        assertNotNull( project.getNotifiers() );
+
+        assertEquals( 1, project.getNotifiers().size() );
+
+        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );
+
+        assertEquals( "mail", notifier.getType() );
+
+        assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );
+
+        String username = System.getProperty( "user.name" );
+
+        String scmUrl = "scm:cvs:ext:${user.name}@company.org:/home/company/cvs:project/foo";
+
+        scmUrl = StringUtils.replace( scmUrl, "${user.name}", username );
+
+        assertEquals( scmUrl, project.getScmUrl() );
+    }
+
     public void testCreateProjectsWithModules()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
-                                                                                   MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder =
+            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
 
         String url = getTestFile( "src/test/resources/projects/continuum/pom.xml" ).toURL().toExternalForm();
 

Added: maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml?rev=406895&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml Tue May 16 03:26:59 2006
@@ -0,0 +1,22 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>continuum</groupId>
+  <artifactId>foo</artifactId>
+  <version>1.0</version>
+  <ciManagement>
+    <notifiers>
+      <notifier>
+        <configuration>
+          <address>foo@bar</address>
+        </configuration>
+      </notifier>
+    </notifiers>
+  </ciManagement>
+  <scm>
+    <connection>scm:cvs:ext:${user.name}@company.org:/home/company/cvs:${moduleName}/${pom.artifactId}</connection>
+    <developerConnection>scm:cvs:ext:${user.name}@company.org:/home/company/cvs:${moduleName}/${pom.artifactId}</developerConnection>
+  </scm>
+  <properties>
+    <moduleName>project</moduleName>
+  </properties>
+</project>
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/pom.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/pom.xml (original)
+++ maven/continuum/trunk/continuum-model/pom.xml Tue May 16 03:26:59 2006
@@ -13,7 +13,7 @@
       <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
-        <version>1.0-alpha-5</version>
+        <version>1.0-alpha-9</version>
         <executions>
           <execution>
             <goals>
@@ -30,8 +30,8 @@
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
-        <artifactId>maven-jpox-plugin</artifactId>
-        <version>1.0.1</version>
+        <artifactId>jpox-maven-plugin</artifactId>
+        <version>1.0.2</version>
         <executions>
           <execution>
             <goals>
@@ -42,4 +42,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
\ No newline at end of file
+</project>

Modified: maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java (original)
+++ maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java Tue May 16 03:26:59 2006
@@ -56,20 +56,28 @@
     /**
      * This state indicates that a project is currently beeing build.
      */
-//    public final static ContinuumProjectState BUILDING = new ContinuumProjectState( "building" );
     public final static int BUILDING = 6;
 
     public final static int CHECKING_OUT = 7;
 
     public final static int UPDATING = 8;
 
+    public final static int WARNING = 9;
+
+    /**
+     * This state indicates that sources are checkouted.
+     */
+    public final static int CHECKEDOUT = 10;
+
     private String name;
 
     // TODO: maybe move these to another class
     public static final int TRIGGER_FORCED = 1;
 
     // TODO: remove
-    public static final int TRIGGER_UNKNOWN = 0;
+    public static final int TRIGGER_SCHEDULED = 0;
+
+    public static final int TRIGGER_UNKNOWN = TRIGGER_SCHEDULED;
 
     protected ContinuumProjectState( String name )
     {

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Tue May 16 03:26:59 2006
@@ -39,10 +39,10 @@
           <version>1.0.0+</version>
           <type>String</type>
         </field>
-        <field jpox.mappedBy="projectGroup">
+        <field jpox.mappedBy="projectGroup" jpox.fetchGroupNames="projectgroup-projects project-build-details">
           <name>projects</name>
           <version>1.0.0+</version>
-          <association stash.part="true" jpox.join="false">
+          <association jpox.join="false">
             <type>Project</type>
             <multiplicity>*</multiplicity>
           </association>
@@ -184,17 +184,17 @@
             <multiplicity>*</multiplicity>
           </association>
         </field>
-        <field jpox.fetchGroupNames="project-all-details">
+        <field jpox.fetchGroupNames="project-all-details project-dependencies">
           <name>parent</name>
           <version>1.0.0+</version>
-          <association stash.part="true" jpox.join="false">
+          <association jpox.join="false">
             <type>ProjectDependency</type>
           </association>
         </field>
-        <field jpox.fetchGroupNames="project-all-details">
+        <field jpox.fetchGroupNames="project-all-details project-dependencies">
           <name>dependencies</name>
           <version>1.0.0+</version>
-          <association stash.part="true" jpox.join="false">
+          <association jpox.join="false">
             <type>ProjectDependency</type>
             <multiplicity>*</multiplicity>
           </association>
@@ -516,6 +516,62 @@
           </association>
         </field>
       </fields>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0+</version>
+          <code><![CDATA[
+            /**
+             * @return Returns string representation of the changeset
+             */
+            public String toString()
+            {
+                String result = author + "\n" + date + "\n";
+
+                if ( files != null )
+                {
+                    for ( java.util.Iterator i = files.iterator(); i.hasNext(); )
+                    {
+                        ChangeFile file = (ChangeFile) i.next();
+
+                        result += file + "\n";
+                    }
+                }
+
+                result += comment;
+
+                return result;
+            }
+
+            /**
+             * @see java.lang.Object#equals(java.lang.Object)
+             */
+            public boolean equals( Object obj )
+            {
+                if ( obj instanceof ChangeSet )
+                {
+                    ChangeSet changeSet = (ChangeSet) obj;
+
+                    if ( toString().equals( changeSet.toString() ) )
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            public java.util.Date getDateAsDate()
+            {
+                if ( date > 0 )
+                {
+                    return new java.util.Date( date );
+                }
+
+                return null;
+            }
+          ]]></code>
+        </codeSegment>
+      </codeSegments>
     </class>
 
     <class>
@@ -539,6 +595,29 @@
           <type>String</type>
         </field>
       </fields>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0+</version>
+          <code><![CDATA[
+            /**
+             * Provide a version of the object as a string for debugging purposes
+             *
+             * @return a {@link String}made up of the properties of the object
+             */
+            public String toString()
+            {
+                StringBuffer buffer = new StringBuffer( getName() );
+
+                if ( getRevision() != null )
+                {
+                    buffer.append( ", " ).append( getRevision() );
+                }
+
+                return buffer.toString();
+            }
+          ]]></code>
+        </codeSegment>
+      </codeSegments>
     </class>
 
     <class>
@@ -587,6 +666,12 @@
             <type>Profile</type>
           </association>
         </field>
+        <field jpox.nullValue="default">
+          <name>latestBuildId</name>
+          <version>1.0.0</version>
+          <type>int</type>
+          <defaultValue>0</defaultValue>
+        </field>
       </fields>
     </class>
 
@@ -743,6 +828,11 @@
           <version>1.0.0+</version>
           <type>String</type>
           <defaultValue>build-output-directory</defaultValue>
+        </field>
+        <field>
+          <name>deploymentRepositoryDirectory</name>
+          <version>1.0.0+</version>
+          <type>String</type>
         </field>
         <field>
           <name>baseUrl</name>

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java Tue May 16 03:26:59 2006
@@ -21,25 +21,35 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.notification.notifier.AbstractNotifier;
 
+import java.util.Map;
+
 public abstract class AbstractContinuumNotifier
     extends AbstractNotifier
 {
     /**
+     * @plexus.configuration
+     */
+    private boolean alwaysSend = false;
+
+    /**
      * Returns url of the last build
      *
      * @param project The project
-     * @param build The build
+     * @param build   The build
      */
     public String getReportUrl( Project project, BuildResult build, ConfigurationService configurationService )
         throws ContinuumException
     {
         try
         {
-            //TODO it's bad to load always the conf when we want read a value
-            configurationService.load();
+            if ( !configurationService.isLoaded() )
+            {
+                configurationService.load();
+            }
 
             StringBuffer buf = new StringBuffer( configurationService.getUrl() );
 
@@ -62,15 +72,50 @@
         }
     }
 
+    /**
+     * Determine if message must be sent
+     *
+     * @param build         The current build result
+     * @param previousBuild The previous build result
+     * @return True if a message must be sent
+     * @deprecated
+     */
     public boolean shouldNotify( BuildResult build, BuildResult previousBuild )
     {
+        return shouldNotify( build, previousBuild, null );
+    }
+
+    /**
+     * Determine if message must be sent
+     *
+     * @param build         The current build result
+     * @param previousBuild The previous build result
+     * @param projectNotifier The project notifier
+     * @return True if a message must be sent
+     */
+    public boolean shouldNotify( BuildResult build, BuildResult previousBuild, ProjectNotifier projectNotifier )
+    {
+        if ( projectNotifier == null )
+        {
+            projectNotifier = new ProjectNotifier();
+        }
+
         if ( build == null )
         {
             return false;
         }
 
-        // Always send if the project failed
-        if ( build.getState() == ContinuumProjectState.FAILED || build.getState() == ContinuumProjectState.ERROR )
+        if ( alwaysSend )
+        {
+            return true;
+        }
+
+        if ( build.getState() == ContinuumProjectState.FAILED && projectNotifier.isSendOnFailure() )
+        {
+            return true;
+        }
+
+        if ( build.getState() == ContinuumProjectState.ERROR && projectNotifier.isSendOnError() )
         {
             return true;
         }
@@ -82,11 +127,31 @@
         }
 
         // Send if the state has changed
-        getLogger().info(
+        getLogger().debug(
             "Current build state: " + build.getState() + ", previous build state: " + previousBuild.getState() );
 
         if ( build.getState() != previousBuild.getState() )
         {
+            if ( build.getState() == ContinuumProjectState.ERROR )
+            {
+                return projectNotifier.isSendOnError();
+            }
+
+            if ( build.getState() == ContinuumProjectState.FAILED )
+            {
+                return projectNotifier.isSendOnFailure();
+            }
+
+            if ( build.getState() == ContinuumProjectState.OK )
+            {
+                return projectNotifier.isSendOnSuccess();
+            }
+
+            if ( build.getState() == ContinuumProjectState.WARNING )
+            {
+                return projectNotifier.isSendOnWarning();
+            }
+
             return true;
         }
 

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java Tue May 16 03:26:59 2006
@@ -20,6 +20,7 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -69,6 +70,9 @@
     {
         Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
+        ProjectNotifier projectNotifier =
+            (ProjectNotifier) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT_NOTIFIER );
+
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
@@ -88,7 +92,7 @@
         {
             if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
             {
-                buildComplete( project, build, configuration );
+                buildComplete( project, projectNotifier, build, configuration );
             }
         }
         catch ( ContinuumException e )
@@ -97,7 +101,7 @@
         }
     }
 
-    private void buildComplete( Project project, BuildResult build, Map configuration )
+    private void buildComplete( Project project, ProjectNotifier projectNotifier, BuildResult build, Map configuration )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
@@ -106,7 +110,7 @@
 
         BuildResult previousBuild = getPreviousBuild( project, build );
 
-        if ( !shouldNotify( build, previousBuild ) )
+        if ( !shouldNotify( build, previousBuild, projectNotifier ) )
         {
             return;
         }

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/pom.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/pom.xml (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/pom.xml Tue May 16 03:26:59 2006
@@ -17,7 +17,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-jabber</artifactId>
-      <version>1.0-alpha-3</version>
+      <version>1.0-alpha-4</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java Tue May 16 03:26:59 2006
@@ -20,6 +20,7 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -104,6 +105,9 @@
     {
         Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
+        ProjectNotifier projectNotifier =
+            (ProjectNotifier) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT_NOTIFIER );
+
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
@@ -132,7 +136,7 @@
 
         if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
         {
-            sendMessage( project, build, recipients, configuration );
+            sendMessage( project, projectNotifier, build, recipients, configuration );
         }
     }
 
@@ -174,7 +178,8 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void sendMessage( Project project, BuildResult build, Set recipients, Map configuration )
+    private void sendMessage( Project project, ProjectNotifier projectNotifier, BuildResult build, Set recipients,
+                              Map configuration )
         throws NotificationException
     {
         String message;
@@ -185,7 +190,7 @@
 
         BuildResult previousBuild = getPreviousBuild( project, build );
 
-        if ( !shouldNotify( build, previousBuild ) )
+        if ( !shouldNotify( build, previousBuild, projectNotifier ) )
         {
             return;
         }
@@ -327,7 +332,7 @@
         {
             return port;
         }
-        else if ( isSslConnection ( configuration ) )
+        else if ( isSslConnection( configuration ) )
         {
             return 5223;
         }
@@ -368,7 +373,7 @@
     {
         if ( configuration.containsKey( "sslConnection" ) )
         {
-            return convertBoolean( (String ) configuration.get( "sslConnection" ) );
+            return convertBoolean( (String) configuration.get( "sslConnection" ) );
         }
 
         return sslConnection;

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java Tue May 16 03:26:59 2006
@@ -20,6 +20,7 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -88,6 +89,9 @@
     {
         Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
+        ProjectNotifier projectNotifier =
+            (ProjectNotifier) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT_NOTIFIER );
+
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
@@ -116,7 +120,7 @@
 
         if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
         {
-            buildComplete( project, build, recipients, configuration );
+            buildComplete( project, projectNotifier, build, recipients, configuration );
         }
     }
 
@@ -150,15 +154,16 @@
         }
         else
         {
-            getLogger().warn( "Unknown build state " + build.getState() + " for project " + project.getId() );
+            getLogger().warn( "Unknown build state " + state + " for project " + project.getId() );
 
-            message = "ERROR: Unknown build state " + build.getState() + " for " + project.getName() + " project";
+            message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
         }
 
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void buildComplete( Project project, BuildResult build, Set recipients, Map configuration )
+    private void buildComplete( Project project, ProjectNotifier projectNotifier, BuildResult build, Set recipients,
+                                Map configuration )
         throws NotificationException
     {
         String message;
@@ -169,7 +174,7 @@
 
         BuildResult previousBuild = getPreviousBuild( project, build );
 
-        if ( !shouldNotify( build, previousBuild ) )
+        if ( !shouldNotify( build, previousBuild, projectNotifier ) )
         {
             return;
         }

Modified: maven/continuum/trunk/continuum-plexus-application/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-plexus-application/pom.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-plexus-application/pom.xml (original)
+++ maven/continuum/trunk/continuum-plexus-application/pom.xml Tue May 16 03:26:59 2006
@@ -93,24 +93,77 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>plexus</groupId>
-      <artifactId>plexus-container-artifact</artifactId>
+      <groupId>jpox</groupId>
+      <artifactId>jpox-dbcp</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-perforce</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-mail-sender-api</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-web</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-service-xmlrpc</artifactId>
       <version>1.0-alpha-3</version>
+      <type>plexus-service</type>
       <exclusions>
         <exclusion>
-          <artifactId>plexus-container-default</artifactId>
-          <groupId>plexus</groupId>
+          <artifactId>log4j</artifactId>
+          <groupId>log4j</groupId>
         </exclusion>
       </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-bazaar</artifactId>
+      <artifactId>maven-scm-provider-local</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-ssh</artifactId>
       <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-perforce</artifactId>
+      <artifactId>maven-scm-provider-cvsexe</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>plexus</groupId>
+      <artifactId>plexus-container-artifact</artifactId>
+      <version>1.0-alpha-3</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>plexus-container-default</artifactId>
+          <groupId>plexus</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-artifact</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>wagon-provider-api</artifactId>
+          <groupId>org.apache.maven.wagon</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-file</artifactId>
       <scope>runtime</scope>
     </dependency>
     <dependency>
@@ -119,6 +172,11 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-svnexe</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-velocity</artifactId>
     </dependency>
@@ -128,13 +186,13 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-starteam</artifactId>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-mail-sender-javamail</artifactId>
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-mail-sender-javamail</artifactId>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-starteam</artifactId>
       <scope>runtime</scope>
     </dependency>
     <dependency>
@@ -143,6 +201,11 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-provider-api</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-service-jetty</artifactId>
       <version>1.0-alpha-3</version>
@@ -160,11 +223,6 @@
       <version>1.2.8</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-mail-sender-api</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.maven.continuum</groupId>
       <artifactId>continuum-notifier-msn</artifactId>
     </dependency>
@@ -173,8 +231,8 @@
       <artifactId>continuum-notifier-jabber</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.continuum</groupId>
-      <artifactId>continuum-web</artifactId>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-bazaar</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.continuum</groupId>
@@ -182,39 +240,8 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-service-xmlrpc</artifactId>
-      <version>1.0-alpha-3</version>
-      <type>plexus-service</type>
-      <exclusions>
-        <exclusion>
-          <artifactId>log4j</artifactId>
-          <groupId>log4j</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-local</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-appserver</artifactId>
       <version>1.0-alpha-5</version>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-cvsexe</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-svnexe</artifactId>
-      <scope>runtime</scope>
-    </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml (original)
+++ maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml Tue May 16 03:26:59 2006
@@ -95,6 +95,7 @@
         <from-name>@mail.override.from.name@</from-name>
         <timestamp-format>EEE, d MMM yyyy HH:mm:ss Z</timestamp-format>
         <includeBuildResult>true</includeBuildResult>
+        <alwaysSend>false</alwaysSend>
       </configuration>
     </component>
 
@@ -144,6 +145,9 @@
           <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
         </requirement>
       </requirements>
+      <configuration>
+        <alwaysSend>false</alwaysSend>
+      </configuration>
     </component>
 
     <component>
@@ -169,13 +173,14 @@
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
-      <!-- configuration>
-        <from-address/>
+      <configuration>
+        <alwaysSend>false</alwaysSend>
+        <!-- from-address/>
         <from-password/>
         <host/>
         <port/>
-        <sslConnection>true</sslConnection>
-      </configuration -->
+        <sslConnection>true</sslConnection -->
+      </configuration>
     </component>
 
     <component>
@@ -201,10 +206,11 @@
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
-      <!-- configuration>
-        <from-address/>
-        <from-password/>
-      </configuration -->
+      <configuration>
+        <alwaysSend>false</alwaysSend>
+        <!-- from-address/>
+        <from-password/ -->
+      </configuration>
     </component>
 
     <component>
@@ -257,6 +263,22 @@
             <value>true</value>
           </property>
           <property>
+            <name>org.jpox.autoCreateColumns</name>
+            <value>true</value>
+          </property>
+          <property>
+            <name>org.jpox.validateTables</name>
+            <value>true</value>
+          </property>
+          <property>
+            <name>org.jpox.validateColumns</name>
+            <value>true</value>
+          </property>
+          <property>
+            <name>org.jpox.validateConstraints</name>
+            <value>true</value>
+          </property>
+          <property>
             <name>org.jpox.autoStartMechanism</name>
             <value>SchemaTable</value>
           </property>
@@ -264,6 +286,11 @@
             <name>org.jpox.autoStartMechanismMode</name>
             <value>Ignored</value>
           </property>
+          <!-- This property is for compatibility with database created with old jpox because rc2 use 256 as default (jdo standard) -->
+          <property>
+            <name>org.jpox.rdbms.stringDefaultLength</name>
+            <value>255</value>
+          </property>
           <!-- Apache Derby Configuration -->
           <property>
             <name>javax.jdo.option.ConnectionDriverName</name>
@@ -426,10 +453,10 @@
       <implementation>org.codehaus.plexus.formica.validation.UrlValidator</implementation>
       <configuration>
         <allowedSchemes>
-          <allowedScheme implementation="java.lang.String">http</allowedScheme>
-          <allowedScheme implementation="java.lang.String">https</allowedScheme>
-          <allowedScheme implementation="java.lang.String">ftp</allowedScheme>
-          <!-- <allowedScheme implementation="java.lang.String">file</allowedScheme> -->
+          <allowedScheme>http</allowedScheme>
+          <allowedScheme>https</allowedScheme>
+          <allowedScheme>ftp</allowedScheme>
+          <!-- <allowedScheme>file</allowedScheme> -->
         </allowedSchemes>
       </configuration>
     </component>
@@ -493,6 +520,10 @@
           </appender>
         </appenders>
         <levels>
+          <level>
+            <hierarchy>org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper</hierarchy>
+            <level>INFO</level>
+          </level>
           <level>
             <hierarchy>org.codehaus.plexus.velocity</hierarchy>
             <level>WARN</level>

Propchange: maven/continuum/trunk/continuum-rpc-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 16 03:26:59 2006
@@ -0,0 +1 @@
+*.iml

Added: maven/continuum/trunk/continuum-rpc-client/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-rpc-client/pom.xml?rev=406895&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-rpc-client/pom.xml (added)
+++ maven/continuum/trunk/continuum-rpc-client/pom.xml Tue May 16 03:26:59 2006
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?><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">
+  <parent>
+    <artifactId>continuum-parent</artifactId>
+    <groupId>org.apache.maven.continuum</groupId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>continuum-rpc-client</artifactId>
+  <name>Continuum client XML-RPC</name>
+  <version>1.1-SNAPSHOT</version>
+  <description>XML-RPC client code for accessing Apache Continuum servers</description>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <version>1.0-alpha-9</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>java</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <version>1.0.0</version>
+          <packageWithVersion>false</packageWithVersion>
+          <model>../continuum-model/src/main/mdo/continuum.mdo</model>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>xmlrpc</groupId>
+      <artifactId>xmlrpc</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.2</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.3</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+      <version>2.0.2</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

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

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