notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r938 - trunk/main/depot/library/console/src/main/net/dpml/library/console
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r938 - trunk/main/depot/library/console/src/main/net/dpml/library/console
- Date: Thu, 19 Jan 2006 06:15:04 +0100
Author: mcconnell
Date: 2006-01-19 06:15:02 +0100 (Thu, 19 Jan 2006)
New Revision: 938
Modified:
trunk/main/depot/library/console/src/main/net/dpml/library/console/BuilderPlugin.java
Log:
Fix issue with builder when used in a script - was not returning a fail exit
code - now returns 1 if the build fails and usage of build in a script works
as expected.
Modified:
trunk/main/depot/library/console/src/main/net/dpml/library/console/BuilderPlugin.java
===================================================================
---
trunk/main/depot/library/console/src/main/net/dpml/library/console/BuilderPlugin.java
2006-01-19 03:32:16 UTC (rev 937)
+++
trunk/main/depot/library/console/src/main/net/dpml/library/console/BuilderPlugin.java
2006-01-19 05:15:02 UTC (rev 938)
@@ -133,7 +133,15 @@
getLogger().info( "Empty selection." );
System.exit( 0 );
}
- process( line, resources );
+ boolean result = process( line, resources );
+ if( !result )
+ {
+ System.exit( 1 );
+ }
+ else
+ {
+ System.exit( 0 );
+ }
}
}
}
@@ -254,7 +262,7 @@
* @param line the commandline
* @param resources the sorted sequence of prouject to build
*/
- private void process( CommandLine line, Resource[] resources ) throws
Exception
+ private boolean process( CommandLine line, Resource[] resources ) throws
Exception
{
URI uri = (URI) line.getValue( BUILDER_URI_OPTION, ANT_BUILDER_URI );
Builder builder = createBuilder( uri );
@@ -280,10 +288,11 @@
boolean status = builder.build( resource, targets );
if( !status )
{
- return;
+ return status;
}
System.gc();
}
+ return true;
}
private static final URI ANT_BUILDER_URI;
- r938 - trunk/main/depot/library/console/src/main/net/dpml/library/console, mcconnell at BerliOS, 01/19/2006
Archive powered by MHonArc 2.6.24.