changeset 7787:2865133eeef2

mx: When doanload fails using Java, try using python mx: Update jdt compiler preferences if it is outdates
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 13 Feb 2013 16:21:35 +0100
parents 8bbbde9d0a52
children dbbe8ce3bfa5
files mxtool/mx.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Wed Feb 13 13:34:05 2013 +0100
+++ b/mxtool/mx.py	Wed Feb 13 16:21:35 2013 +0100
@@ -1168,7 +1168,7 @@
         javaClass = join(myDir, 'URLConnectionDownload.class')
         if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource):
             subprocess.check_call([java().javac, '-d', myDir, javaSource])
-        if run([java().java, '-cp', myDir, 'URLConnectionDownload', path] + urls) == 0:
+        if run([java().java, '-cp', myDir, 'URLConnectionDownload', path] + urls, nonZeroIsFatal=False) == 0:
             return
 
     def url_open(url):
@@ -1436,7 +1436,8 @@
                          '-cp', cp, '-g', '-enableJavadoc',
                          '-d', outputDir] + javacArgs
                 jdtProperties = join(p.dir, '.settings', 'org.eclipse.jdt.core.prefs')
-                if not exists(jdtProperties):
+                rootJdtProperties = join(p.suite.dir, 'mx', 'eclipse-settings', 'org.eclipse.jdt.core.prefs')
+                if not exists(jdtProperties) or os.path.getmtime(jdtProperties) < os.path.getmtime(rootJdtProperties):
                     # Try to fix a missing properties file by running eclipseinit
                     eclipseinit([], buildProcessorJars=False)
                 if not exists(jdtProperties):