Ant
Talks about:
Ant
In order to use the YoSQL tooling for Ant
, follow these steps:
- Download the
yosql-tooling-anttask zip file from the latest release (or any prior version). - Define a task in your build.xml. The
libfolder of theyosql-tooling-antzip file contains all jar files that are required for the task. - Write
.sqlfiles in a directory of your choice (e.g./path/to/your/sql/files). - Adjust the configuration
of the
YoSQLtask. - Execute the
YoSQLtask in order to generate Java code.
An example build.xml file could look like this:
<project name="YourProject">
<description>
example showing how to use YoSQL with Ant
</description>
<!-- define YoSQL task -->
<taskdef name="yosql"
classname="wtf.metio.yosql.tooling.ant.YoSQLGenerateTask"
classpath="/path/of/all/yosql/jar/files"/>
<!-- configure YoSQL -->
<yosql>
<files inputBaseDirectory="/path/to/your/sql/files"
outputBaseDirectory="/path/for/writing/java/code"/>
<repositories generateInterfaces="true"/>
<converter defaultConverter="com.example.YourConverter"/>
</yosql>
</project>