使用 Ant 编译 SQLJ

发布于 2024-08-08 04:24:30 字数 20 浏览 7 评论 0原文

如何用ant编译SQLJ?

How to compile SQLJ with ant?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

本王不退位尔等都是臣 2024-08-15 04:24:30

I don't think there is a native sqlj Ant task. You can start an sqlj process with the Ant exec task as if you were executing it from a command prompt.

Edit:
Link to download sqlj: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

‘画卷フ 2024-08-15 04:24:30

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

I haven't seen a proper task for compiling SQLj sources with Ant, however there is an old ant-user post where someone has submitted the source for an ant task.
I don't know how well it works, but it should at least point towards how it can be done.

From the 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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文