You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by EP...@upstate.com on 2002/12/04 21:40:10 UTC

How to pass properties to ant tasks?

Hi all,

I declare in my project.properties some sql login data. 

However, in my maven.xml, where I call a dbunit ant task, and pass in the
properties it gets nulls, but if I explicityly type the properties values
out, it gets them.  What am I doing wrong?

WORKS
          <dbunit 
            driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"          
 
url="jdbc:microsoft:sqlserver://dcefotest01:1433;DatabaseName=eFrontOffice;S
electMethod=cursor"          
            userid="webapp_user"          
            password="somethign">    
                <export dest="portal.dtd" format="dtd"/>
          </dbunit>
  
GETS NULLS!    
         <dbunit 
              driver="${sql.driver}"          
              url="${sql.url}"          
              userid="${sql.username}"          
              password="${sql.password}">    
                  <export dest="flat3.xml" format="flat">
                    <table name="ORD_MAIN"/>
                    <table name="CARD_TRANSACTION"/>
                    
                
                  </export>
          </dbunit>
  </goal>