用Ant编译SQLJ

时间:2009-10-09 20:37:35

标签: ant compilation sqlj

如何使用ant编译SQLJ?

2 个答案:

答案 0 :(得分:1)

我认为没有本机sqlj Ant任务。您可以使用Ant exec task启动sqlj进程,就像从命令提示符执行它一样。

编辑: 链接下载sqlj:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

答案 1 :(得分:1)

我没有看到使用Ant编译SQLj源的正确任务,但是有一个旧的ant-user帖子,其中某人有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.