【发布时间】:2009-10-09 20:37:34
【问题描述】:
如何用ant编译SQLJ?
【问题讨论】:
标签: ant compilation sqlj
如何用ant编译SQLJ?
【问题讨论】:
标签: ant compilation sqlj
我认为没有原生的 sqlj Ant 任务。您可以使用 Ant exec task 启动 sqlj 进程,就好像您在命令提示符下执行它一样。
编辑: sqlj下载链接:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
【讨论】:
我还没有看到使用 Ant 编译 SQLj 源代码的适当任务,但是有一个旧的 ant 用户帖子,其中有人有 submitted the source 用于 ant 任务。
我不知道它的效果如何,但它至少应该指出它是如何完成的。
来自 Javadoc:
* Task to compile SQLj source files. This task can take the following
* arguments:
* <ul>
* <li>srcdir
* <li>destdir
* <li>compile
* <li>ser2class
* <li>user
* <li>url
* </ul>
* Of these arguments, the <b>srcdir</b> and <b>destdir</b> are required.
* <p>
* When this task executes, it will recursively scan the srcdir and dest
* destdir looking for sqlj files to compile. This task make its compile
* decision based on timestamp. Notice that the generated java files will
* be located at the same directory as the sqlj files, Only the binary files
* will be placed at the destdir directory.
【讨论】: