diagnostics small adjustments
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 18 Nov 2008 17:10:22 +0000
changeset 2008 026a5b1c3cde
parent 2007 1ace64f1c0c4
child 2009 260e0600baeb
diagnostics small adjustments
build.xml
src-diagnostics/build-create.xml
src-diagnostics/src/org/openbravo/task/CheckDB.java
src-diagnostics/src/org/openbravo/utils/PropertiesManager.java
--- a/build.xml	Tue Nov 18 17:06:51 2008 +0000
+++ b/build.xml	Tue Nov 18 17:10:22 2008 +0000
@@ -519,7 +519,6 @@
 	</target>
 
 	 <target name="diagnostic">
-	    <ant dir="src-diagnostics" antfile="build-create.xml" target="build"/>
 	    <ant dir="src-diagnostics" target="check.all"/>
 	  </target>
 </project>
--- a/src-diagnostics/build-create.xml	Tue Nov 18 17:06:51 2008 +0000
+++ b/src-diagnostics/build-create.xml	Tue Nov 18 17:10:22 2008 +0000
@@ -37,7 +37,7 @@
   </target>
   
   <target name="clean">
-    <delete>
+    <delete failonerror="false">
       <fileset dir="WebContent/WEB-INF/lib"/>
       <fileset dir="build/classes"/>
     </delete>
--- a/src-diagnostics/src/org/openbravo/task/CheckDB.java	Tue Nov 18 17:06:51 2008 +0000
+++ b/src-diagnostics/src/org/openbravo/task/CheckDB.java	Tue Nov 18 17:10:22 2008 +0000
@@ -41,7 +41,7 @@
             log4j.info("Checking database...");
             final Properties properties = new Properties();
             try {
-                properties.load(new FileInputStream("../config/Openbravo.properties"));
+                properties.load(new FileInputStream("config/Openbravo.properties"));
             } catch (final Exception e) {
                 throw new BuildException(e);
             }
@@ -93,9 +93,7 @@
                 log4j.info("Checking Oracle version...");
                 try {
                     st = connSystem.prepareStatement("select * from v$version where banner like '%Oracle%'");
-                
                     result = st.executeQuery();
-                    
                     while (result.next()){
                         versionString = UtilSql.getValue(result, 1);
                     }
@@ -104,9 +102,7 @@
                 } catch (final Exception e) { 
                     throw new BuildException(e.getMessage()); 
                 }  
-                
                 if (versionString.contains("Express Edition")) throw new BuildException("Express Edition not suported");
-                
                 final String version = Version.getVersion(versionString);
                 final String minVersion = new PropertiesManager().getProperty("db.ora.version");
                 String msg = "Minimum required version: "+minVersion+", current version "+version;
--- a/src-diagnostics/src/org/openbravo/utils/PropertiesManager.java	Tue Nov 18 17:06:51 2008 +0000
+++ b/src-diagnostics/src/org/openbravo/utils/PropertiesManager.java	Tue Nov 18 17:10:22 2008 +0000
@@ -37,7 +37,7 @@
     }
     
     public PropertiesManager() {
-        this("config/diagnostics.properties");
+        this("src-diagnostics/config/diagnostics.properties");
     }