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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]