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/23 07:48:38 UTC

svn commit: rev 20234 - avalon/trunk/tools/magic/artifact/src/dist

Author: niclas
Date: Sat May 22 22:48:38 2004
New Revision: 20234

Modified:
   avalon/trunk/tools/magic/artifact/src/dist/build.bsh
Log:
Fixed a bug, not to freak if the definition file is not found.

Modified: avalon/trunk/tools/magic/artifact/src/dist/build.bsh
==============================================================================
--- avalon/trunk/tools/magic/artifact/src/dist/build.bsh	(original)
+++ avalon/trunk/tools/magic/artifact/src/dist/build.bsh	Sat May 22 22:48:38 2004
@@ -32,16 +32,20 @@
     {
         File definitionsDir = new File( m_Context.getProjectSystemDir(), "definitions" );
         File file = new File( definitionsDir, artifactId );
-        FileInputStream fis = new FileInputStream( file );
         Properties p = new Properties();
-        try
+        if( file.exists() )
         {
-            p.load( fis );
-        } finally
-        {
-            if( fis != null )
-                fis.close();
+            FileInputStream fis = new FileInputStream( file );
+            try
+            {
+                p.load( fis );
+            } finally
+            {
+                if( fis != null )
+                    fis.close();
+            }
         }
+        
         String repository = p.getProperty( "artifact.repository" );
         if( repository == null )
             repository = m_Context.getProperty( "artifact.repository" );

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