ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EJ Ciramella" <ejcirame...@upromise.com>
Subject loading an xml file into properties
Date Wed, 23 Aug 2006 19:01:44 GMT
What's the easiest way (without going to custom ant libs) to load the
following style xml file into properties?
 
My problem with the XmlProperty task is it nests appserver.home together
(with a comma).  Is there a way to keep these as individual properties?
 
<profiles>
  <profile>
    <id>model-base</id>
    <activation>
      <activeByDefault/>
    </activation>
 
    <properties>
     <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
     <db.server>localhost</db.server>
     <db.port>1521</db.port>
     <db.instance>someinstance</db.instance>
     <db.username>someuser</db.username>
     <db.password>somepass</db.password>
     <connection.pool_size>1</connection.pool_size>
     <dialect>org.hibernate.dialect.Oracle9Dialect</dialect>
     <show_sql>false</show_sql>
     <default_entity_mode>pojo</default_entity_mode>
     <generate_statistics>true</generate_statistics>
     <autocommit>false</autocommit>
     <use_query_cache>true</use_query_cache>
  <lty.sh.location>/bin</lty.sh.location> 
  <lty.vm.heap.opts>-XX:MaxPermSize=128m -ms256m
-mx256m</lty.vm.heap.opts>
  <lty.vm.definition>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,address=8787,suspend=n</lty.vm.de
finition>
        <appserver.home>/path/to/another/dev/appserver1</appserver.home>
    </properties>
  </profile>
 
  <profile>
    <id>appserverConfig-dev-2</id>
    <activation>
      <property>
        <name>env</name>
        <value>dev-2</value>
      </property>
    </activation>
 
    <properties>
      <appserver.home>/path/to/another/dev/appserver2</appserver.home>
    </properties>
  </profile>
  
  
</profiles>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message