作者qrtt1 (null)
站内java
标题Re: [文件] xdoclet简介 - 使用XDcolet
时间Mon Jun 9 21:23:49 2008
: <target name="compile" depends="ejbdoclet">
: <!-- Compile EJBs -->
: <javac
: srcdir="${java.dir}:${generated.java.dir}"
: destdir="${build.dir}/ejb"
: includes="test/ejb/*.java, test/interfaces/*.java"
: >
: </target>
: ────────────────────────────────
: Here the compile target depends on the ejbdoclet target. This means that
: before compiling anything all home/local/remote interfaces, primary key,
: data-objects and deployment descriptors are generated. The first thing you
: have to do is define the ejbdoclet task for Ant.
: (Tony按:不懂again)
: 编译 target 依赖着 ejbdoclet target ,
: 这代表着在编译前任何 home/local/remote 介面,p k,资料物件,
: 以及开发叙述已经被产生。
: 第一件你必需要做的事情就是定义ant的 ejbdoclet task.
[语法与结构]
<target name="rz" depends="囧">
...
</target>
ant 里的 depends 是说,现在这个 target 是相依於 囧 target
如果 囧 target 没有满足,那就会自动先执行 囧 target
所以会先 囧 了才有 rz
===========================================================
[语意]
上面的 code 是说,你使用了 xdoclet 帮你生 EJB 相关的档案
所以有一些档案是你要先生好,才能去 compile 专案的
如果你没有先生好这些 EJB 相关的档案,就先 compile
那可能因缺少档案而出错,或是完全看不出使用 xdoclet 的效果
因为产生档案的工作要发生在 compile 所有相关的档案之前
<target name="compile" depends="ejbdoclet">
</target>
所以当你 ant compile
其实也就是执行了 ejbdoclet target 与 compile target
如果你不写 depends 那你要自己打二个
ant ejbdoclet compile
如果少打了可能因缺少档案而 compile 不过的可能性存在
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.133.80.216
1F:推 cklonger:冏rz 06/09 21:37
2F:推 TonyQ:原来如此 感恩o(_ _)o 06/09 21:37