continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r494855 - in /maven/continuum/trunk: continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/ continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/ cont...
Date Wed, 10 Jan 2007 15:38:03 GMT
Author: evenisse
Date: Wed Jan 10 07:38:02 2007
New Revision: 494855

URL: http://svn.apache.org/viewvc?view=rev&rev=494855
Log:
[CONTINUUM-1117][CONTINUUM-1131][CONTINUUM-1132] Fix wagon notifier, allow configuration from
continuum pages
Submitted by: Henry S. Isidro

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
  (with props)
Modified:
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/WagonContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/WagonContinuumNotifierTest.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierSelectType.jsp

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/WagonContinuumNotifier.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/WagonContinuumNotifier.java?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/WagonContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/main/java/org/apache/maven/continuum/notification/wagon/WagonContinuumNotifier.java
Wed Jan 10 07:38:02 2007
@@ -19,12 +19,6 @@
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
 import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
@@ -68,6 +62,12 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
 /**
  * @author <a href="mailto:hisidro@exist.com">Henry Isidro</a>
  * @author <a href="mailto:nramirez@exist.com">Napoleon Esmundo C. Ramirez</a>
@@ -77,45 +77,41 @@
     extends AbstractContinuumNotifier
     implements Contextualizable
 {
-    public static final String KEY_BUILD_DEFINITION = "build-definition";
-
     public static final String BUILD_OUTPUT_FILE_NAME = "buildresult.txt";
-    
+
     private static final String CONTEXT_MAVEN_PROJECT = "CONTEXT_MAVEN_PROJECT";
-    
+
     /**
      * @plexus.requirement
      */
     private ConfigurationService configurationService;
-    
+
     /**
      * @plexus.requirement
      */
     private WagonManager wagonManager;
-    
+
     /**
      * @plexus.requirement
      */
     private MavenProjectBuilder projectBuilder;
-    
+
     /**
      * @plexus.requirement
      */
     private MavenSettingsBuilder settingsBuilder;
-    
+
     /**
      * @plexus.configuration
      */
     private String localRepository;
-    
-    
+
     private Settings settings;
-    
+
     private ProfileManager profileManager;
-    
+
     private PlexusContainer container;
-    
-    
+
     public void sendNotification( String source, Set recipients, Map configuration, Map context
)
         throws NotificationException
     {
@@ -125,9 +121,10 @@
             (ProjectNotifier) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT_NOTIFIER
);
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD
);
-        
-        BuildDefinition buildDefinition = (BuildDefinition) context.get( KEY_BUILD_DEFINITION
);
-        
+
+        BuildDefinition buildDefinition =
+            (BuildDefinition) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD_DEFINITION
);
+
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
         // ----------------------------------------------------------------------
@@ -135,7 +132,7 @@
         {
             return;
         }
-        
+
         // ----------------------------------------------------------------------
         // Deloy build result to given url 
         // ----------------------------------------------------------------------
@@ -146,7 +143,7 @@
              */
             MavenProject mavenProject = getMavenProject( project, buildDefinition );
             configuration.put( CONTEXT_MAVEN_PROJECT, mavenProject );
-            
+
             if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE
) )
             {
                 buildComplete( project, projectNotifier, build, configuration );
@@ -157,29 +154,41 @@
             throw new NotificationException( "Error while notifiying.", e );
         }
     }
-    
+
     private void buildComplete( Project project, ProjectNotifier projectNotifier, BuildResult
build, Map configuration )
         throws ContinuumException
     {
-        MavenProject mavenProject = (MavenProject) configuration.get( CONTEXT_MAVEN_PROJECT
);
-        
-        DistributionManagement distributionManagement = mavenProject.getDistributionManagement();
-        if ( distributionManagement == null )
+        String id = null;
+        String url = null;
+
+        if ( configuration.containsKey( "url" ) )
         {
-            throw new ContinuumException( "Missing distribution management information in
the project" );
+            url = (String) configuration.get( "url" );
         }
-
-        Site site = distributionManagement.getSite();
-        if ( site == null )
+        else
         {
-            throw new ContinuumException( "Missing site information in the distribution management
element in the project.." );
+            MavenProject mavenProject = (MavenProject) configuration.get( CONTEXT_MAVEN_PROJECT
);
+            DistributionManagement distributionManagement = mavenProject.getDistributionManagement();
+
+            if ( distributionManagement == null )
+            {
+                throw new ContinuumException( "Missing distribution management information
in the project." );
+            }
+
+            Site site = distributionManagement.getSite();
+            if ( site == null )
+            {
+                throw new ContinuumException(
+                    "Missing site information in the distribution management element in the
project." );
+            }
+
+            url = site.getUrl();
+            id = site.getId();
         }
 
-        String url = site.getUrl();
-        String id = site.getId();
         if ( url == null )
         {
-            throw new ContinuumException( "The URL to the site is missing in the project
descriptor." );
+            throw new ContinuumException( "The URL to the site is not defined." );
         }
 
         Repository repository = new Repository( id, url );
@@ -196,7 +205,8 @@
 
         if ( !wagon.supportsDirectoryCopy() )
         {
-            throw new ContinuumException( "Wagon protocol '" + repository.getProtocol() +
"' doesn't support directory copying" );
+            throw new ContinuumException(
+                "Wagon protocol '" + repository.getProtocol() + "' doesn't support directory
copying" );
         }
 
         try
@@ -210,7 +220,7 @@
             }
 
             ProxyInfo proxyInfo = wagonManager.getProxy( repository.getProtocol() );
-            
+
             if ( proxyInfo != null )
             {
                 wagon.connect( repository, wagonManager.getAuthenticationInfo( id ), proxyInfo
);
@@ -219,7 +229,7 @@
             {
                 wagon.connect( repository, wagonManager.getAuthenticationInfo( id ) );
             }
-            
+
             File buildOutputFile = configurationService.getBuildOutputFile( build.getId(),
build.getProject().getId() );
 
             wagon.put( buildOutputFile, BUILD_OUTPUT_FILE_NAME );
@@ -272,33 +282,34 @@
             }
         }
     }
-    
+
     public void sendNotification( String arg0, Set arg1, Properties arg2 )
         throws NotificationException
     {
         throw new NotificationException( "Not implemented." );
     }
-    
+
     private MavenProject getMavenProject( Project project, BuildDefinition buildDefinition
)
         throws ContinuumException
     {
-        File projectWorkingDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
project.getId() ) );
+        File projectWorkingDir =
+            new File( configurationService.getWorkingDirectory(), Integer.toString( project.getId()
) );
         File pomFile = new File( projectWorkingDir, buildDefinition.getBuildFile() );
-        
+
         MavenProject mavenProject = null;
-        
+
         try
         {
             mavenProject = projectBuilder.build( pomFile, getLocalRepository(), getProfileManager(
settings ) );
         }
         catch ( ProjectBuildingException e )
         {
-            throw new ContinuumException( "Unable to acquire the MavenProject in " + pomFile.getAbsolutePath(),
e);
+            throw new ContinuumException( "Unable to acquire the MavenProject in " + pomFile.getAbsolutePath(),
e );
         }
-        
+
         return mavenProject;
     }
-    
+
     private Settings getSettings()
     {
         if ( settings == null )
@@ -309,26 +320,26 @@
             }
             catch ( IOException e )
             {
-                getLogger().error( "Failed to get Settings" , e);
+                getLogger().error( "Failed to get Settings", e );
             }
             catch ( XmlPullParserException e )
             {
-                getLogger().error( "Failed to get Settings" , e);
+                getLogger().error( "Failed to get Settings", e );
             }
         }
-    
+
         return settings;
     }
-    
+
     private ArtifactRepository getLocalRepository()
     {
         String repo = localRepository;
-        
+
         if ( getSettings() != null && !StringUtils.isEmpty( getSettings().getLocalRepository()
) )
         {
             repo = getSettings().getLocalRepository();
         }
-        
+
         return new DefaultArtifactRepository( "local-repository", "file://" + repo, new DefaultRepositoryLayout()
);
     }
 
@@ -341,7 +352,7 @@
 
         return profileManager;
     }
-    
+
     public void contextualize( Context context )
         throws ContextException
     {

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/WagonContinuumNotifierTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/WagonContinuumNotifierTest.java?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/WagonContinuumNotifierTest.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-wagon/src/test/java/org/apache/maven/continuum/wagon/WagonContinuumNotifierTest.java
Wed Jan 10 07:38:02 2007
@@ -19,19 +19,18 @@
  * under the License.
  */
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.notification.wagon.WagonContinuumNotifier;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.notification.notifier.Notifier;
 
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:nramirez@exist">Napoleon Esmundo C. Ramirez</a>
  */
@@ -39,29 +38,29 @@
     extends PlexusTestCase
 {
     private ServletServer server;
-    
+
     private Notifier notifier;
-    
+
     private Project project;
-    
+
     private BuildResult build;
-    
+
     private BuildDefinition buildDefinition;
-    
+
     private Map context;
-    
-    
+
+
     public void setUp()
         throws Exception
     {
         super.setUp();
-        
+
         server = (ServletServer) lookup( ServletServer.ROLE );
         notifier = (Notifier) lookup( Notifier.ROLE, "wagon" );
-        
+
         project = new Project();
         project.setId( 2 );
-        
+
         build = new BuildResult();
         build.setId( 1 );
         build.setProject( project );
@@ -70,33 +69,34 @@
         build.setState( ContinuumProjectState.OK );
         build.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
         build.setExitCode( 0 );
-        
+
         buildDefinition = new BuildDefinition();
         buildDefinition.setBuildFile( "pom.xml" );
-        
+
         context = new HashMap();
         context.put( ContinuumNotificationDispatcher.CONTEXT_PROJECT, project );
         context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD, build );
-        context.put( WagonContinuumNotifier.KEY_BUILD_DEFINITION, buildDefinition );
-        
+        context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_DEFINITION, buildDefinition
);
+
         String basedir = System.getProperty( "basedir" );
         if ( basedir == null )
         {
             throw new Exception( "basedir must be defined" );
         }
     }
-    
+
     public void testSendNotification()
         throws Exception
     {
-        notifier.sendNotification( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE,
new HashSet(), new HashMap(), context );
+        notifier.sendNotification( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE,
new HashSet(),
+                                   new HashMap(), context );
     }
-    
+
     protected void tearDown()
         throws Exception
     {
         release( server );
     }
-    
-    
+
+
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
Wed Jan 10 07:38:02 2007
@@ -145,7 +145,7 @@
         // Source the recipient 
         Map configuration = notifier.getConfiguration();
         
-        String recipient = "unknowm";
+        String recipient = "unknown";
 
         if ( ( "mail".equals( notifier.getType() ) ) || 
              ( "msn".equals( notifier.getType() ) ) ||
@@ -164,6 +164,11 @@
             }
                 
             recipient = recipient + ":" + (String) configuration.get( "channel" );
+        }
+        
+        if ( "wagon".equals( notifier.getType() ) )
+        {
+            recipient = (String) configuration.get( "url" );
         }
         
         ns.setRecipient( recipient );

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java?view=auto&rev=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
Wed Jan 10 07:38:02 2007
@@ -0,0 +1,67 @@
+package org.apache.maven.continuum.web.action.notifier;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+import java.util.HashMap;
+
+import org.apache.maven.continuum.model.project.ProjectGroup;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
+
+/**
+ * Action that deletes a {@link ProjectNotifier} of type 'Wagon' from the 
+ * specified {@link ProjectGroup}.
+ * 
+ * @author <a href="mailto:hisidro@exist.com">Henry Isidro</a>
+ * 
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="wagonGroupNotifierEdit"
+ */
+
+public class WagonGroupNotifierEditAction
+    extends AbstractGroupNotifierEditAction
+{
+    private String url;
+    
+    protected void initConfiguration( Map configuration )
+    {     
+        url = (String) configuration.get( "url" );
+    }
+    
+    protected void setNotifierConfiguration( ProjectNotifier notifier )
+    {
+        HashMap configuration = new HashMap();
+
+        configuration.put( "url", url );
+
+        notifier.setConfiguration( configuration );
+    }
+
+    public String getUrl() 
+    {
+        return url;
+    }
+
+    public void setUrl( String url ) 
+    {
+        this.url = url;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonGroupNotifierEditAction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java?view=auto&rev=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
Wed Jan 10 07:38:02 2007
@@ -0,0 +1,67 @@
+package org.apache.maven.continuum.web.action.notifier;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectNotifier;
+
+/**
+ * Action that deletes a {@link ProjectNotifier} of type 'Wagon' from the 
+ * specified {@link Project}.
+ * 
+ * @author <a href="mailto:hisidro@exist.com">Henry Isidro</a>
+ * 
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="wagonProjectNotifierEdit"
+ */
+
+public class WagonProjectNotifierEditAction 
+    extends AbstractProjectNotifierEditAction
+{
+private String url;
+    
+    protected void initConfiguration( Map configuration )
+    {     
+        url = (String) configuration.get( "url" );
+    }
+    
+    protected void setNotifierConfiguration( ProjectNotifier notifier )
+    {
+        HashMap configuration = new HashMap();
+
+        configuration.put( "url", url );
+
+        notifier.setConfiguration( configuration );
+    }
+
+    public String getUrl() 
+    {
+        return url;
+    }
+
+    public void setUrl( String url ) 
+    {
+        this.url = url;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/WagonProjectNotifierEditAction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
Wed Jan 10 07:38:02 2007
@@ -63,6 +63,11 @@
         }
         else
         {
+            if ( "wagon".equals( notifier.getType() ) )
+            {
+                return notifier.getConfiguration().get( "url" ).toString(); 
+            }
+            
             if ( notifier.getConfiguration().get( "address" ) == null )
             {
                 return "";

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Jan 10 07:38:02 2007
@@ -374,6 +374,7 @@
 notifier.msn.login.label = MSN login
 notifier.msn.password.label = MSN Password
 notifier.msn.address.label = MSN Recipient Address
+notifier.wagon.url.label = Project Site URL
 notifier.event.sendOnSuccess = Send on Success
 notifier.event.sendOnFailure = Send on Failure
 notifier.event.sendOnError = Send on Error

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Jan 10 07:38:02
2007
@@ -514,6 +514,7 @@
       <result name="irc_input">/WEB-INF/jsp/notifier/notifierIrc.jsp</result>
       <result name="msn_input">/WEB-INF/jsp/notifier/notifierMsn.jsp</result>
       <result name="jabber_input">/WEB-INF/jsp/notifier/notifierJabber.jsp</result>
+      <result name="wagon_input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
     </action>
 
     <action name="editProjectNotifier" class="addProjectNotifier">
@@ -521,6 +522,7 @@
       <result name="irc_input" type="chain">ircProjectNotifierEdit</result>
       <result name="msn_input" type="chain">msnProjectNotifierEdit</result>
       <result name="jabber_input" type="chain">jabberProjectNotifierEdit</result>
+      <result name="wagon_input" type="chain">WagonProjectNotifierEdit</result>
     </action>
 
     <action name="mailProjectNotifierEdit" class="mailProjectNotifierEdit" method="edit">
@@ -558,6 +560,15 @@
       <result name="input">/WEB-INF/jsp/notifier/notifierMsn.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
+    
+    <action name="wagonProjectNotifierEdit" class="wagonProjectNotifierEdit" method="edit">
+      <result name="success">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
+    </action>
+    
+    <action name="wagonProjectNotifierSave" class="wagonProjectNotifierEdit" method="save">
+      <result name="input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
+      <result name="success" type="chain">projectView</result>
+    </action>
 
     <!--
     * notifier actions :: Project Group
@@ -574,6 +585,7 @@
       <result name="irc_input">/WEB-INF/jsp/notifier/notifierIrc.jsp</result>
       <result name="msn_input">/WEB-INF/jsp/notifier/notifierMsn.jsp</result>
       <result name="jabber_input">/WEB-INF/jsp/notifier/notifierJabber.jsp</result>
+      <result name="wagon_input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
     </action>
 
     <action name="editProjectGroupNotifier" class="addGroupNotifier">
@@ -581,6 +593,7 @@
       <result name="irc_input" type="chain">ircProjectGroupNotifierEdit</result>
       <result name="msn_input" type="chain">msnProjectGroupNotifierEdit</result>
       <result name="jabber_input" type="chain">jabberProjectGroupNotifierEdit</result>
+      <result name="wagon_input" type="chain">wagonProjectGroupNotifierEdit</result>
     </action>
 
     <action name="mailProjectGroupNotifierEdit" class="mailGroupNotifierEdit" method="edit">
@@ -616,6 +629,15 @@
 
     <action name="msnProjectGroupNotifierSave" class="msnGroupNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierMsn.jsp</result>
+      <result name="success" type="chain">projectGroupNotifier</result>
+    </action>
+    
+    <action name="wagonProjectGroupNotifierEdit" class="wagonGroupNotifierEdit" method="edit">
+      <result name="success">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
+    </action>
+
+    <action name="wagonProjectGroupNotifierSave" class="wagonGroupNotifierEdit" method="save">
+      <result name="input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
       <result name="success" type="chain">projectGroupNotifier</result>
     </action>
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierSelectType.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierSelectType.jsp?view=diff&rev=494855&r1=494854&r2=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierSelectType.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierSelectType.jsp
Wed Jan 10 07:38:02 2007
@@ -44,7 +44,7 @@
             <table>
               <tbody>
                 <ww:select label="%{getText('notifier.type.label')}" name="notifierType"
-                           list="#@java.util.LinkedHashMap@{'mail':'Mail', 'irc':'IRC', 'jabber':'Jabber',
'msn':'MSN'}"/>
+                           list="#@java.util.LinkedHashMap@{'mail':'Mail', 'irc':'IRC', 'jabber':'Jabber',
'msn':'MSN', 'wagon':'Wagon'}"/>
               </tbody>
             </table>
             <div class="functnbar3">

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp?view=auto&rev=494855
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
Wed Jan 10 07:38:02 2007
@@ -0,0 +1,71 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="continuum" prefix="c1" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title>
+            <ww:text name="notifier.page.title">
+                <ww:param>Wagon</ww:param>
+            </ww:text>
+        </title>
+    </head>
+    <body>
+      <div id="axial" class="h3">
+        <ww:if test="${projectId > 0}">
+            <ww:url id="actionUrl" action="wagonProjectNotifierSave" includeContext="false"
includeParams="none" />
+        </ww:if>
+        <ww:else>
+            <ww:url id="actionUrl" action="wagonProjectGroupNotifierSave" includeContext="false"
includeParams="none"/>
+        </ww:else>
+        
+        <h3>
+            <ww:text name="notifier.section.title">
+                <ww:param>Wagon</ww:param>
+            </ww:text>
+        </h3>
+
+        <div class="axial">
+          <ww:form action="%{actionUrl}" method="post" validate="true">
+            <ww:hidden name="notifierId"/>
+            <ww:hidden name="projectId"/>
+            <ww:hidden name="projectGroupId"/>
+            <ww:hidden name="notifierType"/>
+
+            <table>
+              <tbody>
+                <ww:textfield label="%{getText('notifier.wagon.url.label')}" name="url"
required="true" />
+                <ww:checkbox label="%{getText('notifier.event.sendOnSuccess')}" name="sendOnSuccess"
value="sendOnSuccess" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnFailure')}" name="sendOnFailure"
value="sendOnFailure" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnError')}" name="sendOnError"
value="sendOnError" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnWarning')}" name="sendOnWarning"
value="sendOnWarning" fieldValue="true"/>
+              </tbody>
+            </table>
+
+            <div class="functnbar3">
+              <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
+            </div>
+          </ww:form>
+        </div>
+      </div>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message