来篇配置文件,共享其乐

build.xml

<!DOCTYPE project [
    <!ENTITY database SYSTEM "file:./config/database/mysql.xml">
]>

<property name="name" value="HibernateZwmRoot"/>


mysql.xml

   <!-- =================================================================== -->
   <!-- ant properties/targets for mysql                                    -->
   <!-- note: this is not a proper xml file (there is no root element)      -->
   <!--       it is intended to be imported from a *real* xml file          -->
   <!-- =================================================================== -->

   <property name="database.script.file"           value="${src.dir}/sql/${name}-mysql.sql"/>
   <!--editor by zwm
   <property name="database.driver.file"       value="${lib.dir}/mysql-connector-java-3.0.0-beta-bin.jar"/>  
   -->
   <property name="database.driver.file"           value="${lib.dir}/mysql-connector-java-3.0.17-ga-bin.jar"/>
   <property name="database.driver.classpath"      value="${database.driver.file}"/>
   <property name="database.driver"                value="org.gjt.mm.mysql.Driver"/>
  
   <!--editor by zwm  
   <property name="database.url"                   value="jdbc:mysql://localhost/airline"/>
   -->
   <property name="database.url"                   value="jdbc:mysql://localhost/ZwmRoot"/>
   <property name="database.userid"                value="root"/>
   <property name="database.password"              value=""/>
   <property name="database.schema"                value=""/>
   <property name="database.catalog"               value=""/>

   <property name="jboss.datasource.mapping"       value="mySQL"/>

你可能感兴趣的:(mysql,xml,ant)