avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 22574 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Date Sun, 04 Jul 2004 15:59:07 GMT
Author: mcconnell
Date: Sun Jul  4 08:59:06 2004
New Revision: 22574

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/ReactorTask.java
Log:
housekeeping

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	Sun Jul
 4 08:59:06 2004
@@ -310,6 +310,11 @@
             }
         }
 
+        if( m_public )
+        {
+             writer.write( "\n\n  <redistributable/>" );
+        }
+
         writer.write( "\n\n</module>\n" );
         return definitions.length;
     }
@@ -358,8 +363,8 @@
         throws IOException, UnknownResourceException
     {
         String path = definition.getBaseDir().getCanonicalPath();
-        int j = getProject().getBaseDir().toString().length();
-        String basedir = path.substring( j+1 ).replace( '\\', '/' );
+
+        String basedir = resolveBaseDir( project, path );
 
         writer.write( 
           "\n\n  <project name=\"" + definition.getKey() + "\">" );
@@ -491,6 +496,19 @@
         writer.write( "\n       from=\"Magic Integration &lt;dev@avalon.apache.org&gt;\"/>"
);
 
         writer.write( "\n  </project>" );
+    }
+
+    private String resolveBaseDir( Project project, String path )
+    {
+        int j = getProject().getBaseDir().toString().length();
+        if( path.length() > j )
+        {
+            return path.substring( j+1 ).replace( '\\', '/' );
+        }
+        else
+        {
+            return ".";
+        }
     }
 
     private String getKeyForResource( Resource resource )

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java	Sun Jul
 4 08:59:06 2004
@@ -93,7 +93,7 @@
     public void execute() throws BuildException 
     {
         final Project project = getProject();
-        m_defs = getDefinitions();
+        m_defs = getDefinitionList();
         final Definition[] defs = walkGraph();
 
         log( "Candidates: " + defs.length );
@@ -236,7 +236,7 @@
         return (Definition[]) list.toArray( new Definition[0] );
     }
 
-    private List getDefinitions()
+    private List getDefinitionList()
     {
         final Project project = getProject();
         final File basedir = project.getBaseDir(); 

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


Mime
View raw message