jicarilla-sandbox/buildsystem build-project.xml,1.12,1.13
| Newsgroups | gmane.comp.java.jicarilla.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jicarilla/jicarilla-sandbox/buildsystem
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv716/buildsystem
Modified Files:
build-project.xml
Log Message:
sensible error message for missing dependencies
Index: build-project.xml
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/buildsystem/build-project.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- build-project.xml 22 Feb 2004 09:31:32 -0000 1.12
+++ build-project.xml 22 Feb 2004 16:37:58 -0000 1.13
@@ -588,10 +588,43 @@
if(doDownload)
{
+ url = new java.net.URL( remoteFile );
+ try
+ {
+ conn = url.openConnection();
+ conn.connect();
+ conn.getInputStream();
+ System.out.println("connected");
+ }
+ catch( e )
+ {
+ doDownload = false;
+ if( !file.exists() )
+ {
+ fail = project.createTask("fail");
+ fail.setMessage( "\n\n" +
+"=======================================================================\n" +
+" ERROR retrieving dependency!\n\n" +
+" " + artifact + "-" + version + ".jar\n\n" +
+"does not exist in the local repository, and we can't get it from the \n" +
+"remote repository either! This can mean several things. The \n" +
+"repository may be missing some files or you may not be connected to \n" +
+"the internet. Another reason may be that you need to run the build of \n" +
+"some other project first to install the jar. The exception that was \n" +
+"thrown reads as follows:\n\n " + e + "\n" +
+"=======================================================================\n"
+ );
+ fail.execute();
+ }
+ }
+ }
+ if(doDownload)
+ {
get = project.createTask("get");
get.setSrc( new java.net.URL( remoteFile ) );
get.setDest( file );
get.setIgnoreErrors( true );
+ get.setUseTimestamp( true );
get.execute();
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click