You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/05/22 19:13:05 UTC

svn commit: rev 20218 - avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic

Author: niclas
Date: Sat May 22 10:13:04 2004
New Revision: 20218

Modified:
   avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginContext.java
   avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginServiceManager.java
Log:
Introduction of a ProjectSystem directory. A projects-global directory, which must be specified in the build.properties file.

Modified: avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginContext.java
==============================================================================
--- avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginContext.java	(original)
+++ avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginContext.java	Sat May 22 10:13:04 2004
@@ -21,6 +21,7 @@
     private String m_PluginClassname;    
     private String m_PluginName;
     private File m_PluginDir;
+    private File m_ProjectSystemDir;
     private File m_SystemDir;
     private File m_TempDir;
    
@@ -29,13 +30,13 @@
     
     PluginContext( File scriptDir )
     {
-        this( "virtual", new File( "." ), new PluginProperties(), "virtual plugin", 
+        this( "virtual", new File( "." ), new File( "../system" ), new PluginProperties(), "virtual plugin", 
               scriptDir, new File( "." ), new File( "." ), new Project() );
     }
     
-    PluginContext( String projectName, File projectDir, PluginProperties projectProps,
-                   String pluginName, File pluginDir, File systemDir, File tempDir,
-                   Project ant )
+    PluginContext( String projectName, File projectDir, File projectSystemDir, 
+                   PluginProperties projectProps, String pluginName, 
+                   File pluginDir, File systemDir, File tempDir, Project ant )
     {
         if( projectName == null )
             throw new IllegalArgumentException( "Null argument: projectName" );
@@ -64,6 +65,7 @@
         m_SystemDir = systemDir;
         m_TempDir = tempDir;
         m_AntProject = ant;
+        m_ProjectSystemDir = projectSystemDir;
     }
 
     public Object get( Object entry )
@@ -117,6 +119,11 @@
     public File getSystemDir()
     {
         return m_SystemDir;
+    }
+    
+    public File getProjectSystemDir()
+    {
+        return m_ProjectSystemDir;
     }
     
     public File getTempDir()

Modified: avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginServiceManager.java
==============================================================================
--- avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginServiceManager.java	(original)
+++ avalon/trunk/tools/magic/engine/src/java/org/apache/merlin/magic/PluginServiceManager.java	Sat May 22 10:13:04 2004
@@ -173,10 +173,24 @@
         PluginProperties props = new PluginProperties( m_GlobalProperties );
         
         appendProperties( props, m_ProjectDir );
+        
         String projectName = props.getProperty( "project.name" );
+        String psLoc = props.getProperty( "project.system" ) ;
+        File projectSystemDir;
+        
+        if( psLoc != null )
+        {
+            projectSystemDir = new File( m_ProjectDir, psLoc );
+        }
+        else
+        {
+            projectSystemDir = new File( m_ProjectDir, "../system" );
+        }
+        projectSystemDir.mkdirs();
         
         PluginContext ctx = new PluginContext( projectName, m_ProjectDir, 
-            props, service, pluginDir, m_SystemDir, m_TempDir, m_AntProject );
+            projectSystemDir.getAbsoluteFile(), props, service, pluginDir, 
+            m_SystemDir, m_TempDir, m_AntProject );
         
         try
         {

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