how to create an ant task which dumps a mysql dump?

I want to execute this command mysql -u root -e "source F:\dump.sql" How do i do this with the ant task?


You should use the exec task in Ant.

here is the reference on how to use it

Category:mysql Time:2011-04-06 Views:0
Tags: mysql ant

Related post

  • How can I terminate a process started from an Ant task if the script is cancelled? 2009-04-17

    I've created an Ant task to compile VB6 applications. After some preprocessing of the source files, I start VB6.exe with the appropriate parameters using Process p = Runtime.getRuntime().exec(...); p.waitFor(); But when I press Ctrl+C while Ant is ru

  • How to checkout from SVN with an ANT task? 2010-03-08

    I'm interested in any way that I can create an Ant task to checkout files from SubVersion. I "just" want to do the checkout from the command line. I've been using Eclipse with Ant and SubVersion for a while now, but my Ant and SubVersion knowledge is

  • Ant task for compiling GUI forms (Intellij IDEA) 2010-08-08

    How I can create a Ant task to compile GUI forms (XML) in Intellij IDEA? I use Scala and Java in my project. Java only for GUI class, and I create it with Intellij IDEA UI Designer. --------------Solutions------------- IDEA provides a Ant task, javac

  • SASS to CSS via an ANT task + directory creation 2011-08-31

    I recently started playing with SASS [] in a Java-based project and wanted to create an Ant task that: for each .scss file + subdirectories containing .scss files in a top-level scss directory: create the appropriate directory in

  • ANT task running SQL script with configurable database name 2011-09-06

    I'm trying to create an ANT task that takes some database properties and executes a MYSQL script. For a specific database, it's working fine, and what I have is the following: A configurable properties file: sql.driver=com.mysql.jdbc.Driver sql.url=j

  • How to create or delete a folder on the Unix machine using Ant task which runs on Windows machine 2010-03-08

    I need to delete a directory in Unix and create a new one. All should be part of Ant task in Windows machine --------------Solutions------------- Here is the SSHExec documentation: It might be worth it

  • How to create nested element for ant task? 2010-09-07

    Is it possible to create the nested element for any ant task. For e.g. <copy todir="../backup/dir"> <fileset dir="src_dir"/> <filterset> <filter token="TITLE" value="Foo Bar"/> </filterset> </copy> Here for the tas

  • Ant:create JUnit report task programmatically 2010-10-12

    I use the Ant API for creating tasks programmatically, but I have not yet found the class that create JUnit report task. in short, I want the equivalent of the code below using the Ant API: <junitreport todir=".."> <fileset dir=".."> <

  • A xml schema created by "Schemagen" of Ant task can customize any more? 2011-01-17

    Now, I have two Java classes like this. public class HogeDomain { private User userDomain; public HogeDomain() { } and getter/setter.. } public class User { public User() { } private String id; private String password; private Date userDate; and gett

  • How can I creat SCA files from EPA files manually by using ant tasks? 2012-04-12

    How can I creat SCA files from EPA files manually by using ant tasks? Thank you very much in advance --------------Solutions------------- You need to use the sapmake utility, which converts PAR and EPA files into SDAs, and SDAs into SCAs. Instruction

  • How do I dump a MySQL database using ant? 2009-09-11

    I couldn't find any information about how to dump a MySQL database with an ant task. Do I have to create my own task to do this? ANT script ===generate==> myDataBase.sql --------------Solutions------------- Create a target that runs the "mysqldump

  • Has anyone used or written an Ant task to compile (Rhino) JavaScript to Java bytecode? 2008-10-23

    I'd like to use the Rhino JavaScript compiler to compile some JavaScript to .class bytecode files for use in a project. It seems like this should already exist, since there are groovyc, netrexxc, and jythonc tasks for Groovy, NetREXX(!) and Jython, r

  • How can I provide a custom log4j.xml for different ant tasks? 2009-01-26

    I have a build file that as part of the build process relies on several taskdefs. These taskdef items (for example, webdoclet and jasper2) use log4j as a logger. Ideally, I'd like to be able to provide a different log4j configuration file for each, b

  • Ant task to run an Ant target only if a file exists? 2009-02-06

    Is there an ANT Task that would execute a block only if a given file exists? I have the problem that I have a generic ant script that should do some special processing but only if a specific configuration file is present. --------------Solutions-----

  • How to find a JNDI resource inside the hibernatetool Ant task 2009-03-17

    I want to generate my database schema with Ant. I am using hbm2ddl task. I am using Hibernate with JNDI. My hibernate.cfg.xml looks like: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate

  • Capturing Ant task output 2009-03-19

    Is it possible to capture the warnings that Javadoc prints when run via the javadoc Ant task? I don't see an output attribute such as the one in the task. There seem to be warnings that Checkstyle just isn't catching and it'd be nice to snag that out

  • flex compiler error (warning) message in flex ant task 2009-04-15

    I have following warnings if I compile our flex project with the ant task from the flex sdk. Does anyone have an idea where this comes from and why this happens and if I can safely ignore it? (The swf file itself seems to get created without an actua

  • sshexec ant task: environment variables 2009-07-02

    I'm using SSHExec ant task to connect to a remote host and I depend on the environment variables that are set on the remote host in order to be able to successfully execute some commands. <sshexec host="somehost" username="${username}" password="$

  • Maven: Java classes don't compile after Ant task 2009-07-02

    My project generates source code using the Rats! parser generator. Rats! doesn't have a Maven plugin that I'm aware of, so I'm trying to build the parser using an Ant Java task, like so: <plugin> <artifactId>maven-antrun-plugin</artifa

Copyright (C), All Rights Reserved.

processed in 0.498 (s). 13 q(s)