我还没有看到使用 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.
发布评论
评论(2)
我认为没有本机 sqlj Ant 任务。您可以使用 Ant
exec
任务启动 sqlj 进程 就像从命令提示符执行它一样。编辑:
下载 sqlj 的链接: http://www.oracle.com /technology/software/tech/java/sqlj_jdbc/index.html
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
我还没有看到使用 Ant 编译 SQLj 源的正确任务,但是有一个旧的 ant 用户帖子,其中有人有 提交了 ant 任务的源代码。
我不知道它的效果如何,但它至少应该指出它是如何完成的。
来自 Javadoc:
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: