avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 22710 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Date Thu, 08 Jul 2004 11:42:33 GMT
Author: mcconnell
Date: Thu Jul  8 04:42:32 2004
New Revision: 22710

Modified:
   avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/GumpTask.java
Log:
Add nag model.

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/GumpTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/GumpTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/GumpTask.java	Thu Jul
 8 04:42:32 2004
@@ -49,6 +49,42 @@
  */
 public class GumpTask extends SystemTask
 {
+    private static final String MAGIC_INTEGRATION =
+      "Magic Integration <dev@avalon.apache.org>";
+ 
+    public static class Nag
+    {
+        private String m_from;
+        private String m_to;
+
+        public void setFrom( String from )
+        {
+            m_from = from;
+        }
+   
+        public String getFrom()
+        {
+            if( null != m_from )
+            {
+                return m_from;
+            }
+            else
+            {
+                return MAGIC_INTEGRATION;
+            }
+        }
+
+        public void setTo( String to )
+        {
+            m_to = to;
+        }
+   
+        public String getTo()
+        {
+            return m_to;
+        }
+    }
+
     public static class Href
     {
         private String m_href;
@@ -152,6 +188,7 @@
     private License m_license;
     private Template m_template = new Template();
     private boolean m_public = false;
+    private Nag m_nag;
 
     public void setName( String name )
     {
@@ -239,6 +276,19 @@
         }
     }
 
+    public Nag createNag()
+    {
+        if( null == m_nag )
+        {
+            m_nag = new Nag();
+            return m_nag;
+        }
+        else
+        {
+            throw new BuildException( "Multiple nag entries not allowed." );
+        }
+    }
+
     public Template createTemplate()
     {
         return m_template;
@@ -554,9 +604,11 @@
               "\n    <!-- doc output is relative merlin home docs cache -->" );
         }
 
-        writer.write( "\n    <nag to=\"dev@avalon.apache.org\"" ); 
-        writer.write( "\n       from=\"Magic Integration &lt;dev@avalon.apache.org&gt;\"/>"
);
-
+        if( null != m_nag )
+        {
+            writer.write( "\n    <nag to=\"" + m_nag.getTo() + "\"" );
+            writer.write( "\n       from=\"" + m_nag.getFrom() + "\"/>" );
+        }
         writer.write( "\n  </project>" );
     }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message