Skip to Content.
Sympa Menu

notify-dpml - r1963 - trunk/main/depot/build/src/main/dpml/build

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1963 - trunk/main/depot/build/src/main/dpml/build
  • Date: Mon, 16 Apr 2007 17:12:23 +0200

Author: mcconnell
Date: 2007-04-16 17:12:23 +0200 (Mon, 16 Apr 2007)
New Revision: 1963

Modified:
trunk/main/depot/build/src/main/dpml/build/Main.java
Log:
fix builder implementation such that the loading of the library index occurs
during the run method and not during instantiation

Modified: trunk/main/depot/build/src/main/dpml/build/Main.java
===================================================================
--- trunk/main/depot/build/src/main/dpml/build/Main.java 2007-04-13
18:13:08 UTC (rev 1962)
+++ trunk/main/depot/build/src/main/dpml/build/Main.java 2007-04-16
15:12:23 UTC (rev 1963)
@@ -57,6 +57,7 @@
import net.dpml.lang.Strategy;
import net.dpml.lang.ServiceRegistry;
import net.dpml.lang.SimpleServiceRegistry;
+import net.dpml.lang.DecodingException;

import dpml.library.Module;
import dpml.library.Resource;
@@ -87,11 +88,11 @@
//
------------------------------------------------------------------------

private final Logger m_logger;
- private final DefaultLibrary m_library;
private final Map m_map = new Hashtable();

private boolean m_verbose;
private boolean m_expand = false;
+ private DefaultLibrary m_library;

//
------------------------------------------------------------------------
// constructors
@@ -107,7 +108,6 @@
public Main( Logger logger ) throws Exception
{
m_logger = logger;
- m_library = new DefaultLibrary( logger );
}

//
------------------------------------------------------------------------
@@ -135,13 +135,31 @@
*/
public int run( InputStream in, OutputStream out, OutputStream err,
String... arguments )
{
+ // setup the project/resource index
+
try
{
+ m_library = new DefaultLibrary( m_logger );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Unable to load library index.";
+ m_logger.error( message, e );
+ return -1;
+ }
+
+ // execute the build
+
+ try
+ {
return execute( arguments );
}
catch( Throwable e )
{
- m_logger.error( "Build error.", e );
+ final String error =
+ "Build error.";
+ m_logger.error( message, e );
return -1;
}
}




  • r1963 - trunk/main/depot/build/src/main/dpml/build, mcconnell at BerliOS, 04/16/2007

Archive powered by MHonArc 2.6.24.

Top of Page