airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1484650 - in /airavata/trunk/tools: ./ registry-tool/ registry-tool/db-scripts/ registry-tool/src/main/java/org/apache/airavata/registry/tool/ registry-tool/src/main/resources/ registry-tool/src/main/resources/db-scripts/
Date Tue, 21 May 2013 03:11:04 GMT
Author: chathuri
Date: Tue May 21 03:11:04 2013
New Revision: 1484650

URL: http://svn.apache.org/r1484650
Log:
updating registry migration tool

Added:
    airavata/trunk/tools/registry-tool/src/main/resources/db-migrate.sh   (props changed)
      - copied unchanged from r1484572, airavata/trunk/tools/registry-tool/db-migrate.sh
    airavata/trunk/tools/registry-tool/src/main/resources/db-scripts/
      - copied from r1484572, airavata/trunk/tools/registry-tool/db-scripts/
Removed:
    airavata/trunk/tools/registry-tool/db-migrate.sh
    airavata/trunk/tools/registry-tool/db-scripts/
Modified:
    airavata/trunk/tools/pom.xml
    airavata/trunk/tools/registry-tool/src/main/java/org/apache/airavata/registry/tool/DBMigrator.java

Modified: airavata/trunk/tools/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/tools/pom.xml?rev=1484650&r1=1484649&r2=1484650&view=diff
==============================================================================
--- airavata/trunk/tools/pom.xml (original)
+++ airavata/trunk/tools/pom.xml Tue May 21 03:11:04 2013
@@ -31,8 +31,8 @@
             </activation>
             <modules>
                 <module>phoebus-integration</module>
-		<module>registry-tool</module>
-            </modules>
+		        <module>registry-tool</module>
+        </modules>
         </profile>
     </profiles>
     <properties>

Modified: airavata/trunk/tools/registry-tool/src/main/java/org/apache/airavata/registry/tool/DBMigrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/tools/registry-tool/src/main/java/org/apache/airavata/registry/tool/DBMigrator.java?rev=1484650&r1=1484649&r2=1484650&view=diff
==============================================================================
--- airavata/trunk/tools/registry-tool/src/main/java/org/apache/airavata/registry/tool/DBMigrator.java
(original)
+++ airavata/trunk/tools/registry-tool/src/main/java/org/apache/airavata/registry/tool/DBMigrator.java
Tue May 21 03:11:04 2013
@@ -89,12 +89,11 @@ public class DBMigrator {
             File file = null;
             if (dbType.contains("derby")){
                 jdbcDriver = "org.apache.derby.jdbc.ClientDriver";
-                file = new File(relativePath + MIGRATE_SQL_DERBY);
+                sqlStream = DBMigrator.class.getClassLoader().getResourceAsStream(relativePath
+ MIGRATE_SQL_DERBY);
             } else if (dbType.contains("mysql")){
                 jdbcDriver = "com.mysql.jdbc.Driver";
-                file = new File(relativePath + MIGRATE_SQL_MYSQL);
+                sqlStream = DBMigrator.class.getClassLoader().getResourceAsStream(relativePath
+ MIGRATE_SQL_MYSQL);
             }
-            sqlStream = readFile(file);
             Class.forName(jdbcDriver).newInstance();
             connection = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPwd);
             if (canUpdated(connection)){

Propchange: airavata/trunk/tools/registry-tool/src/main/resources/db-migrate.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message