【发布时间】:2018-07-09 20:20:17
【问题描述】:
我有一个多模块 maven 项目,我正在实施一个 ant 任务以直接从 jpa 实体生成 jooq 类。
这些是我指的教程:
给我错误的我的 ant 任务是这个(我相信是因为没有设置类路径):
<target name="02-gen-jooq">
<java classname="org.jooq.util.GenerationTool"
fork="true"
failonerror="true"
logerror="true">
<arg value="/jooq-config.xml"/> <!-- my jooq config file in project root folder -->
<classpath>
<!--
<pathelement location="?"/> // what to put here??
<pathelement location="?"/>
<pathelement location="?"/>
-->
</classpath>
</java>
</target>
给出的错误是:
错误:无法找到或加载主类 org.jooq.util.GenerationTool
在教程中,classpath设置如下:
<pathelement location="/path/to/jooq-3.5.4.jar"/>
但似乎这些库是手动导入的。如果库是用maven导入的,我应该放什么?
【问题讨论】:
-
愚蠢的问题,当你有 Maven 时为什么还要使用 Ant?
-
@SimonMartinelli 我使用 Ant 创建可定制的构建步骤,而 Maven 只是用于下载库