[izpack-users] Updating db with INSTALL_PATH value

Yossi Baram yossiba at eldat.com
Mon Jan 9 09:52:02 CET 2006


Hi,
I need to update my db with $INSTALL_PATH value, set by the user, after
InstallPanel run (at the end of installation).
 
myAntActionsSpec.xml  (Here I get $INSTALL_PATH value)
 
<pack name="Mysql Install">
  <antcall quiet="yes"
    buildfile="$INSTALL_PATH/compile/Mysql.xml"
   order="afterpacks">
   <property name="INSTALL_PATH" value="$INSTALL_PATH"/>
   <property name="BASE_SYSTEM" value="System"/>
   <target name="compile" />
  </antcall>
 </pack>
 
 
Mysql.xml (Here I excute the query)
 
<?xml version="1.0"?>
 
<project name="AdvanTAG Installer" default="compile" basedir=".">
 
        <target name="sql">
 
                    ......

                 <exec executable="C:\mysql\bin\mysql">    
                        <arg value="-u"/>
                        <arg value="root"/>
                        <arg value="-e"/>
                        <arg value="create database advantag_Ndb"/>
                </exec>
              
                <sql driver="com.mysql.jdbc.Driver"
                        url="jdbc:mysql://localhost:3306/advantag_Ndb"
                        userid="root"
                        password=""  
                        autocommit="false">
                        
                        <classpath>
                                <pathelement
location="${BASE_SYSTEM}\Mysql\mysql-connector-java-3.1.10-bin.jar"></pa
thelement>
                        </classpath>              

                        
                        update SITE_CONFIGURATION set
value='c:\\advtemp' where SiteParameter like 'TempFolder';
                        
                </sql>  

       </target>     
        <target name="compile" depends="sql"/>
</project>
 
 
Can I set somehow the $INSTALL_PATH value into a query (kind of dynamic
query)?
 
It should be some thing like:
 
       update SITE_CONFIGURATION set value=$INSTALL_PATH  + where
SiteParameter like 'TempFolder';
 
...but id doesnt work like that because the sql tag expect to get a
simple string as aquery?
 
Please advise
 
Thanks
 
Yossi


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060109/2bd72218/attachment.html 


More information about the izpack-users mailing list