Dan,

We do this by making the scripts resource files and filtering the files as they are copied to target and invoking them from target.

We are doing this to run test cases.

 <properties>
    <applicationHost>test1</applicationHost>
 <properties/>
:
       <testResources>
             <testResource>
               <directory>src/test/resources</directory>
               <filtering>true</filtering>
               <includes>
                   <include>**</include>
               </includes>
             </testResource>

From the file to be filtered in src/test/resources
   <row>
     <value>10</value>
     <value>*${applicationHost}*</value>
     <value>string</value>
     <null/>
     <null/>
     <value>1</value>
   </row>

The filtered file
   <row>
     <value>10</value>
     <value>*test1*</value>
     <value>string</value>
     <null/>
     <null/>
     <value>1</value>
   </row>

In our case it is a dbunit file but your can refer to the filtered file as follows

  <src>${project.build.testOutputDirectory}/equipment-sample-data.xml</src>

Hope this helps.

David Bernard

Dan Tran wrote:
It is currently not possible with sql-maven-plugin.  You may want to
try antrun to invoke sqlplus directly.

-D

On Feb 18, 2008 11:45 PM,  <[EMAIL PROTECTED]> wrote:
Hi,

in our project we have some db scripts, but all require parameters to be
passed.

for example:
sqlplus system/[EMAIL PROTECTED] @dropuser.sql %DBUSR%
sqlplus %DBUSR%/[EMAIL PROTECTED] @createschema.sql %SCR_PATH%

how can I pass those parameters?

thanx, Torsten

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply via email to