You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Medicherla Lakshmi <la...@yahoo.co.in> on 2006/10/13 08:28:05 UTC

Application setup using Ant

Hi All,
   
  Can anyone tell me how to include classpath in build.xml file.
  Actually i want to run database script file using build.xml file for which i need to set the classpath with .jar file of the particular database java connector.
   
   <target name="classpath">
 <path>
 <pathelement location="${dbconnectorname}"/>
  <fileset dir="${dbconnectorname}">
   <include name="*.jar"/>
  </fileset> 
 </path> 
 </target>
   
  where dbconnectorname is the path of the directory where this .jar file is located.
   
  Please tel me how to run database scripts using build.xml file.
   
  Thanks in Advance.
   
  Thanks and Regards,
  Lakshmi MSV.

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Application setup using Ant

Posted by Medicherla Lakshmi <la...@yahoo.co.in>.
Thank you very much.  Its working now, but can u tel me one thing
  wht is classname u gave in the taskdef.
   
  one more doubt, am writing the task for running the databasescript file using the classname and url.  am trying to get these using a properties file, so that i do not hardcode those values in the build.xml as am doing now, i pasted my code here.  Can u tell me how to get the classname and other details of <sql> task from a properties file.
   
   <target name="classpath">
 <path id="db.class.path">
 <pathelement location="${dbconnectorname}"/>
  <fileset dir="${dbconnectorname}">
   <include name="*.jar"/>
  </fileset> 
 </path> 
 </target> 
   <target name="runscript">
  <sql classpathref="db.class.path"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/tms"
    userid="root"
    password="mysql"
    src="databasescript.sql">
  </sql>
 </target>

   
  
Manfred Wolff <wo...@manfred-wolff.de> wrote:
  
You can specify e.g. a lib directory with a classpath id.









In other sections you can reference this id.

classname="xdoclet.modules.ejb.EjbDocletTask"/>

Manfred

Struts goes mobile: http://www.strutsme.org. Now 1.0Beta3 available.

Medicherla Lakshmi wrote:
> Hi All,
> 
> Can anyone tell me how to include classpath in build.xml file.
> Actually i want to run database script file using build.xml file for which i need to set the classpath with .jar file of the particular database java connector.
> 
> 
> 

> 

> 
> 
> 
> 

> 
> 
> where dbconnectorname is the path of the directory where this .jar file is located.
> 
> Please tel me how to run database scripts using build.xml file.
> 
> Thanks in Advance.
> 
> Thanks and Regards,
> Lakshmi MSV.
>
> 
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India 
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Application setup using Ant

Posted by Manfred Wolff <wo...@manfred-wolff.de>.
You can specify e.g. a lib directory with a classpath id.

    <path id="xdoclet.class.path">
      <fileset dir="./lib">
        <include name="**/*.jar"/>
      </fileset>
    </path>

In other sections you can reference this id.

<taskdef name="ejbdoclet" classpathref="xdoclet.class.path" 
classname="xdoclet.modules.ejb.EjbDocletTask"/>

Manfred

Struts goes mobile: http://www.strutsme.org. Now 1.0Beta3 available.

Medicherla Lakshmi wrote:
> Hi All,
>    
>   Can anyone tell me how to include classpath in build.xml file.
>   Actually i want to run database script file using build.xml file for which i need to set the classpath with .jar file of the particular database java connector.
>    
>    <target name="classpath">
>  <path>
>  <pathelement location="${dbconnectorname}"/>
>   <fileset dir="${dbconnectorname}">
>    <include name="*.jar"/>
>   </fileset> 
>  </path> 
>  </target>
>    
>   where dbconnectorname is the path of the directory where this .jar file is located.
>    
>   Please tel me how to run database scripts using build.xml file.
>    
>   Thanks in Advance.
>    
>   Thanks and Regards,
>   Lakshmi MSV.
>
>  				
> ---------------------------------
>  Find out what India is talking about on  - Yahoo! Answers India 
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org